mgymrek/lobstr-code — pull request #31 by tfwillems (2014-03-19 21:26:28+00:00)
Title: New Alignment Filter

Added a new alignment filter option --maximal-end-match that filters out reads prior to allelotyping. In essence, this option requires that a read's alignment have the largest matching prefix when compared to alignments shifted by [-INT, INT] bp from the alignment start position. Similarly, it requires that a read's alignment have the the largest matching suffix when compared to alignments shifted by [-INT,-INT] bp from the alignment end position. This option is intended to ensure that reads are well-anchored and that potential insertions or deletions near the ends of reads associated with STRs are unlikely.

By default, the window size is set to 0 so that no reads are filtered by this new feature unless specified on the command line. This feature is implemented using the z-algorithm. As a result, for each read, it only takes time linear in the read length and window size and shouldn't significantly increase the allelotyper's runtime.

Also added a FilterCounter class to keep track of the number of times a read is filtered out by each filter type. This information is now output to the allelotype stats file upon completion of the allelotyper.