jacquard/utils/vcf.py
def _sample_tag_values(cls, sample_names, rformat, sample_fields):
        """Creates a sample dict of tag-value dicts for a single variant record.

        Args:
            sample_names: list of sample name strings.
            rformat: record format string (from VCF record).
            sample_fields: list of strings where each string is the ';'
                seperated format values for an individual sample.

        Returns:
            An dict of samples, where each key is a sample and each value
                is an dict of format-values. See attribute below for example.
                Will return '.' if no values for sampe field.
        """
        sample_tag_values = OrderedDict()
        tag_names = VcfRecord._format_list(rformat)
        for i, sample_field in enumerate(sample_fields):
            tag_values = sample_field.split(":") if sample_field else "."
            sample_tag_values[sample_names[i]] = OrderedDict(zip(tag_names,
                                                                 tag_values))
        return sample_tag_values
def _sample_tag_values(cls, sample_names, rformat, sample_fields):
        """Creates a sample dict of tag-value dicts for a single variant record.

        Args:
            sample_names: list of sample name strings.
            rformat: record format string (from VCF record).
            sample_fields: list of strings where each string is the ';'
                seperated format values for an individual sample.

        Returns:
            An dict of samples, where each key is a sample and each value
                is an dict of format-values. See attribute below for example.
                Will return '.' if no values for sampe field.
        """
        sample_tag_values = OrderedDict()
        tag_names = VcfRecord._format_list(rformat)
        for i, sample_field in enumerate(sample_fields):
            tag_values = sample_field.split(":") if sample_field else "."
            sample_tag_values[sample_names[i]] = OrderedDict(zip(tag_names,
                                                                 tag_values))
        return sample_tag_values
Creates a sample dict of tag-value dicts for a single variant record.

        Args:
            sample_names: list of sample name strings.
            rformat: record format string (from VCF record).
            sample_fields: list of strings where each string is the ';'
                seperated format values for an individual sample.

        Returns:
            An dict of samples, where each key is a sample and each value
                is an dict of format-values. See attribute below for example.
                Will return '.' if no values for sampe field.