Beispiel #1
0
    def genotypes(self):
        """
        Extracts the genotypes from a VCF record 
        """
        alleles = vcf_allele_parser(self.data, self.field_format)

        return alleles
Beispiel #2
0
def test_vcf_allele_parser():
    format = 'GT:DP:SOMETHING:SOMETHINGELSE'
    a = "0|0:48:1:51,51 1|0:48:8:51,51 1/1:43:5:.,."
    expected = list(reversed([(2,1), (4,1), (5, 1)])) # stacks are FILO
    observed = vcf_allele_parser(a, format)
    assert observed.tolist() == expected
Beispiel #3
0
def test_vcf_allele_parser():
    format = 'GT:DP:SOMETHING:SOMETHINGELSE'
    a = "0|0:48:1:51,51 1|0:48:8:51,51 1/1:43:5:.,."
    expected = list(reversed([(2, 1), (4, 1), (5, 1)]))  # stacks are FILO
    observed = vcf_allele_parser(a, format)
    assert observed.tolist() == expected
Beispiel #4
0
    def genotypes(self):
        ''' Extract the genotypes from a VCF record '''
        alleles = vcf_allele_parser(self.data, self.format)

        return alleles