statgen / demuxlet

Genetic multiplexing of barcoded single cell RNA-seq
Apache License 2.0
116 stars 25 forks source link

[bugfix] variant sites may be skipped #85

Closed nh13 closed 3 years ago

nh13 commented 3 years ago

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 at chr4: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!

nh13 commented 3 years ago

@yimmieg or @hyunminkang any thoughts on this bug?

yimmieg commented 3 years ago

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.

hyunminkang commented 3 years ago

Sorry for my delayed response, and thanks very much for spotting the bug and for fixing it @nh13!