Skip to content

Commit

Permalink
add unit tests for soft-clipped positions
Browse files Browse the repository at this point in the history
Co-authored-by: Clint Valentine <[email protected]>
  • Loading branch information
jrm5100 and clintval authored Jan 17, 2024
1 parent 7b91eb6 commit a17217d
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,19 @@ class PileupBuilderTest extends UnitSpec {
p4.iterator.collect{ case x: InsertionEntry => x }.map(_.rec.name).next() shouldBe "q5"
p4.baseIterator.toSeq should contain theSameElementsAs p4.withoutIndels.iterator.toSeq

// Locus with the end of a read that is soft-clipped
// Locus with the remainder of a read that is soft-clipped
val p5 = piler.pileup(Chr1, 247)
p5.depth shouldBe 1
p5.iterator.size shouldBe 1 // should not report an insertion due to the remaining bases
p5.iterator.size shouldBe 1 // should not report an insertion due to the remaining soft-clipped bases
p5.baseIterator.size shouldBe 1
p5.baseIterator.toSeq should contain theSameElementsAs p5.withoutIndels.iterator.toSeq

// Locus at the site of a single read that is soft-clipped
val p6 = piler.pileup(Chr1, 248)
p6.depth shouldBe 0
p6.iterator.size shouldBe 0
p6.baseIterator.size shouldBe 0
p6.baseIterator.toSeq should contain theSameElementsAs p5.withoutIndels.iterator.toSeq
source.safelyClose()
piler.safelyClose()
}
Expand Down

0 comments on commit a17217d

Please sign in to comment.