Bug in BamTools::BamReader::GetTag() affecting allelotype.
Closed this issue · 1 comments
I have found a bug in lobSTR, or more exactly BamTools that affects lobSTR. When it comes to optional integer fields, the GetTag()
function used in ReadContainer.cpp
will sometimes not find a correct number if it is a negative one. Instead it will find an arbitrary positive number. I have pointed out this in an issue in BamTools (pezmaster31/bamtools#90). There is a suggestion of how to write a function that works correctly. I suggest that you take a look at that and rewrite the function ReadContainer::AddReadsFromFile()
. This should circumvent the bug in BamTools.
Thanks for pointing this out.
This should be addressed in this commit. Hopefully it gets fixed in BamTools and we can change to using the GitTag()
function by itself. I'm closing the issue since it's fixed now, but note to anyone using lobSTR v2.0.3 or lower this bug affects BAM files that have been modified after running lobSTR
before inputting them to allelotype
.