From a5a41b68a404e5f147951b2f987c32e9f46a0336 Mon Sep 17 00:00:00 2001 From: tfenne Date: Tue, 31 Oct 2023 08:45:34 -0600 Subject: [PATCH] Restore consensus calling for pairs with only one mapped read. --- .../com/fulcrumgenomics/umi/ConsensusCallingIterator.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/scala/com/fulcrumgenomics/umi/ConsensusCallingIterator.scala b/src/main/scala/com/fulcrumgenomics/umi/ConsensusCallingIterator.scala index d99c7559c..17b68df87 100644 --- a/src/main/scala/com/fulcrumgenomics/umi/ConsensusCallingIterator.scala +++ b/src/main/scala/com/fulcrumgenomics/umi/ConsensusCallingIterator.scala @@ -53,9 +53,9 @@ class ConsensusCallingIterator[ConsensusRead <: SimpleRead](sourceIterator: Iter private var collectedStats: Boolean = false protected val iter: Iterator[SamRecord] = { - val filteredIterator = sourceIterator.filterNot { r => - r.secondary || r.supplementary || r.unmapped || (r.paired && r.mateUnmapped) - } + val filteredIterator = sourceIterator + .filterNot (r => r.secondary || r.supplementary) + .filter(r => r.mapped || (r.paired && r.mateMapped)) // Wrap our input iterator in a progress logging iterator if we have a progress logger val progressIterator = progress match {