Closed nh13 closed 3 years ago
@yimmieg or @hyunminkang any thoughts on this bug?
Hyun, can you address this pull request? I’m fine with it.
Sent from a phone. Excuse the typos.
On Feb 9, 2021, at 11:41 PM, Nils Homer notifications@github.com wrote: @yimmieg or @hyunminkang any thoughts on this bug?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Sorry for my delayed response, and thanks very much for spotting the bug and for fixing it @nh13!
If the BAM file has reads from contigs/chromosomes prior to the first variant in the VCF, but those reads have position greater than the first variant in the VCF, then the first variant may be skipped. For example, if the BAM file has a read from
chr3:100-200
while the VCF has a variant atchr4:50
. The variant is latter in the genome by coordinate, but if we only compare the position (i.e. 100 for the read and 50 for the variant), it is "earlier".The issue stemmed from the fact that read's contig was not used when clearing the variant buffer, but instead the variant itself!