Consider the following short indel polymorphism rs59679400 on chr7.
$ rsidx search dbSNP/dbSNP_GRCh38.{vcf.gz,rsidx} rs59679400 | cut -f 1-7
[rsidx] running version 0.3
NC_000007.14 12510038 rs59679400 GAAAA G,GA,GAA,GAAA,GAAAAA . .
In the Phase III (2015) 1000 Genomes VCFs (GRCh37), I see the following record for the variant.
$ rsidx search 1000GenomesPhaseIII/ALL.chr7.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.{vcf.gz,rsidx} rs59679400 | cut -f 1-7
[rsidx] running version 0.3
7 12549664 rs59679400 GA G 100 PASS
That's easy enough to interpret, although it looks like only two of the several possible alleles at that locus are represented.
When I look at the VCFs from the latest NYGC update to the 1000 Genomes data, I see the following. (I'll note that it's really inconvenient that RS numbers are no longer included for any variants.)
$ tabix 1000GenomesNYGC/1kGP_high_coverage_Illumina.chr7.filtered.SNV_INDEL_SV_phased_panel.vcf.gz chr7:12510038-12510038 | cut -f 1-7
chr7 12474780 HGSV_106040 G <DUP> . .
chr7 12510038 7:12510038:GA:G GA G . .
chr7 12510038 7:12510039:GAA:G GAA G . .
Ignoring the first record, which is a larger structural variant, we see two records at the position in question. My initial question is why they've used two records to encode variation for a single indel variant? As shown in the dbSNP record in the first snippet, VCF allows one to encode an arbitrary number of alternate alleles in a single record.
My second—and more important—question is how one is to interpret these records and resolve the sequence for any particular individual genotyped at the locus? Selecting an arbitrary sample HG00103
, I get the following allele calls for the two records? What am I to make of this?
>>> from pysam import VariantFile
>>> vcf = VariantFile("1000GenomesNYGC/1kGP_high_coverage_Illumina.chr7.filtered.SNV_INDEL_SV_phased_panel.vcf.gz")
>>> records = list(vcf.fetch("chr7", 12510037, 12510038))
>>> len(records)
3
>>> records[1].samples["HG00103"].alleles
('G', 'G')
>>> records[2].samples["HG00103"].alleles
('GAA', 'GAA')