Skip to content

Commit 46c60c8

Browse files
committed
feat: add a tool to do a simple local pairwise alignment
1 parent 5894742 commit 46c60c8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/test/scala/com/fulcrumgenomics/bam/pileup/PileupBuilderTest.scala

+17
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,23 @@ class PileupBuilderTest extends UnitSpec {
323323
piler.safelyClose()
324324
}
325325

326+
it should "exclude records that appear to be in an FR pair but are on different chromosomes" in {
327+
val builder = new SamBuilder(readLength = ReadLength, sd = Some(TestSequenceDictionary), sort = Some(Coordinate))
328+
329+
builder.addPair(name = "q1", contig1 = Chr1, contig2 = Chr2, start1 = 101, start2 = 300)
330+
331+
val source = builder.toSource
332+
val piler = PileupBuilder(source, accessPattern = accessPattern)
333+
334+
piler.pileup(Chr1, 100).depth shouldBe 0
335+
piler.pileup(Chr1, 101).depth shouldBe 0
336+
piler.pileup(Chr1, 100 + ReadLength - 1).depth shouldBe 0
337+
piler.pileup(Chr1, 101 + ReadLength - 1).depth shouldBe 0
338+
339+
source.safelyClose()
340+
piler.safelyClose()
341+
}
342+
326343
it should "not filter out records where a position is outside what might look like an 'insert' for a non-FR pair" in {
327344
val builder = new SamBuilder(readLength = ReadLength, sd = Some(TestSequenceDictionary), sort = Some(Coordinate))
328345

0 commit comments

Comments
 (0)