From ee3efdd08aa8ab404b009d95f7547b44d874f6db Mon Sep 17 00:00:00 2001 From: Bill Bolosky Date: Wed, 4 Nov 2015 13:20:35 -0800 Subject: [PATCH] 1.0beta.22: Paired read matcher doesn't drop reads where both mates are unaligned in the input --- SNAPLib/CommandProcessor.cpp | 2 +- SNAPLib/PairedReadMatcher.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SNAPLib/CommandProcessor.cpp b/SNAPLib/CommandProcessor.cpp index 97876d2f..40d6c928 100644 --- a/SNAPLib/CommandProcessor.cpp +++ b/SNAPLib/CommandProcessor.cpp @@ -35,7 +35,7 @@ Pulled from the main program and expanded to handle daemon mode #include "Error.h" #include "Compat.h" -const char *SNAP_VERSION = "1.0beta.21"; +const char *SNAP_VERSION = "1.0beta.22"; static void usage() { diff --git a/SNAPLib/PairedReadMatcher.cpp b/SNAPLib/PairedReadMatcher.cpp index cd0cb551..0641cb05 100644 --- a/SNAPLib/PairedReadMatcher.cpp +++ b/SNAPLib/PairedReadMatcher.cpp @@ -246,7 +246,7 @@ PairedReadMatcher::getNextReadPair( } if (quicklyDropUnpairedReads) { - if (localRead.getOriginalPNEXT() == 0 || localRead.getOriginalRNEXTLength() == 1 && localRead.getOriginalRNEXT()[0] == '*') { + if (((localRead.getOriginalSAMFlags() & SAM_NEXT_UNMAPPED) == 0) && (localRead.getOriginalPNEXT() == 0 || localRead.getOriginalRNEXTLength() == 1 && localRead.getOriginalRNEXT()[0] == '*')) { nReadsQuicklyDropped++; skipped--; continue;