]> git.donarmstrong.com Git - bamtools.git/commit
Remove heavy-handed failure mode in BamMultiReader::SetRegion
authorErik Garrison <erik.garrison@bc.edu>
Wed, 7 Jul 2010 19:32:48 +0000 (15:32 -0400)
committerErik Garrison <erik.garrison@bc.edu>
Wed, 7 Jul 2010 19:32:48 +0000 (15:32 -0400)
commit2ffdeb8efe1f8e7b3f3152034ee6ea643200dbb3
treee56ddda939894dc8385549379d4103d3e4f29ad4
parent4f2d10233ddb00dc6f1bc39150bd3b8aa3052418
Remove heavy-handed failure mode in BamMultiReader::SetRegion

In practice a failure of BamReader::SetRegion means that we can't get
alignments from the specified region.  It is simpler to ignore failures
of SetRegion as they are gracefully handled by UpdateAlignments, which
simply doesn't add alignments from the readers which don't have
alignments in the target region.

This resolves a bug in which bamtools count (and any other utility using
BamMultiReader::SetRegion) would crash when provided a target region
with no alignments.
BamMultiReader.cpp