Skip to content

Commit

Permalink
2.0.5: fix bug where -f would result in reads being unaligned
Browse files Browse the repository at this point in the history
  • Loading branch information
bolosky committed Feb 23, 2025
2 parents 24d4749 + da7a4a6 commit 374f259
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SNAPLib/AlignerOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ AlignerOptions::usage()
" -x explore some hits of overly popular seeds (useful for filtering)\n"
" -S suppress additional processing (sorted BAM output only)\n"
" i=index, d=duplicate marking\n"
" -f stop on first match within edit distance limit (filtering mode)\n"
" -f stop on first match within edit distance limit (filtering mode, single-end only)\n"
" -F filter output (a=aligned only, s=single hit only (MAPQ >= %d), u=unaligned only, l=long enough to align (see -mrl))\n"
" -E an alternate (and fully general) way to specify filter options. Emit only these types s = single hit (MAPQ >= %d), m = multiple hit (MAPQ < %d),\n"
" x = not long enough to align, u = unaligned, b = filter must apply to both ends of a paired-end read. Combine the letters after\n"
Expand Down
7 changes: 7 additions & 0 deletions SNAPLib/BaseAligner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1492,8 +1492,15 @@ Return Value:
// care about the best alignment. Stop now but mark the result as MultipleHits because we're not
// confident that it's the best one. We don't support mapq in this secnario, because we haven't
// explored enough to compute it.


(altAwareness ? scoresForNonAltAlignments : scoresForAllAlignments).fillInSingleAlignmentResult(primaryResult, popularSeedsSkipped);
//
// Force MAPQ 0 in this case, since we didn't explore the whole space and can't say.
//
primaryResult->status = MultipleHits;
primaryResult->mapq = 0;
firstALTResult->status = NotFound;
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion SNAPLib/CommandProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Revision History:
#include "Compat.h"
#include "HitDepth.h"

const char *SNAP_VERSION = "2.0.4";
const char *SNAP_VERSION = "2.0.5";

static void usage()
{
Expand Down
Binary file modified docs/SNAP User Manual.docx
Binary file not shown.
Binary file modified docs/SNAP User Manual.pdf
Binary file not shown.

0 comments on commit 374f259

Please sign in to comment.