Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


#299 bug in detection of redundant alignments with soft-clipping

Jeff Hussmann

I think I have found a bug in how bowtie2.1.0 detects whether an alignment that contains soft-clipping is redundant or not. Alignments are defined to be redundant if they share any cell in the dynamic programming table. The current code does not appear to correctly take soft-clipping into account when identifying which cells are involved in an alignment. The code that registers cells as having been seen in a database and that checks new cells against this database (starting at line 929 in aligner_result.cpp) uses row indices from 0 to res.readExtentRows() - 1; that is, indices relative to the start of the aligned portion of a read, rather than absolute positions in the read. This means that two alignments that don't actually involve the same read position being aligned to the same reference position can be incorrectly flagged as redundant, and, when both the --local and --all flags are on, can rarely cause the best alignment of a read to be discarded.

If my understanding of the code is correct, this is straightforward to fix by changing how the row indices in RedundantAlns::add and RedundantAlns::overlap are calculated. A patch to aligner_result.cpp that does this is attached.

1 Attachments