ness-lab / recombinant-reads

1 stars 0 forks source link

Check to see if single base offset needed in `check_snps` #4

Closed aays closed 4 years ago

aays commented 4 years ago

This is probably some funky 0-based/1-based issue - snp.start - record.reference_start will sometimes return -1, which shouldn't happen.

jiyvliu commented 4 years ago

VCFs are 1-indexed while bams are 0-indexed. I have decided to change the check_snp() function to add a 1 to the left-bound and right-bound input in order to try and keep the code consistent although extra has to be taken if working more directly with SNPs (using snp.start instead of snp.POS).