From 7e33b829742e47c85c50e86a1a2048d2caa7a6c1 Mon Sep 17 00:00:00 2001 From: Nils Homer Date: Wed, 27 Dec 2023 16:34:14 -0700 Subject: [PATCH] Update src/main/scala/com/fulcrumgenomics/bam/Bams.scala --- src/main/scala/com/fulcrumgenomics/bam/Bams.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/scala/com/fulcrumgenomics/bam/Bams.scala b/src/main/scala/com/fulcrumgenomics/bam/Bams.scala index 8a422e468..6cf89eee7 100644 --- a/src/main/scala/com/fulcrumgenomics/bam/Bams.scala +++ b/src/main/scala/com/fulcrumgenomics/bam/Bams.scala @@ -110,16 +110,16 @@ case class Template(r1: Option[SamRecord], // Developer note: the mate score ("ms") tag is used by samtools markdup for (primary <- r1; supp <- r2Supplementals) { SamPairUtil.setMateInformationOnSupplementalAlignment(supp.asSam, primary.asSam, true) - supp("ms") = primary[Int]("AS") + primary.get[Int]("AS").foreach(supp("ms") = _)) } for (primary <- r2; supp <- r1Supplementals) { SamPairUtil.setMateInformationOnSupplementalAlignment(supp.asSam, primary.asSam, true) - supp("ms") = primary[Int]("AS") + primary.get[Int]("AS").foreach(supp("ms") = _)) } for (first <- r1; second <- r2) { SamPairUtil.setMateInfo(first.asSam, second.asSam, true) - first("ms") = second[Int]("AS") - second("ms") = first[Int]("AS") + first.get[Int]("AS").foreach(second("ms") = _)) + second.get[Int]("AS").foreach(first("ms") = _)) } }