Skip to content

Commit

Permalink
Update src/main/scala/com/fulcrumgenomics/bam/Bams.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
nh13 authored Dec 27, 2023
1 parent 6aa20ab commit 7e33b82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/scala/com/fulcrumgenomics/bam/Bams.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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") = _))
}
}

Expand Down

0 comments on commit 7e33b82

Please sign in to comment.