amplab / snap

Scalable Nucleotide Alignment Program -- a fast and accurate read aligner for high-throughput sequencing data
https://www.microsoft.com/en-us/research/project/snap/
Apache License 2.0
287 stars 66 forks source link

fixing off by one bug in BAM reader decodeSeqRC #98

Open sbyma opened 7 years ago

sbyma commented 7 years ago

If decodeSeqRC() receives a read with an odd number of bases, the loop will write into position o_sequence[0] instead of leaving it empty for the final if to fill it in. This commit fixes the bug by adjusting o_sequence_pairs to point one byte beyond the start of o_sequence if the read length is odd numbered.

AmplabJenkins commented 7 years ago

Can one of the admins verify this patch?