Skip to content

Commit

Permalink
review fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
nh13 committed Aug 16, 2023
1 parent 279dfcf commit a789098
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/test/scala/com/fulcrumgenomics/fastq/TrimFastqTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ class TrimFastqTest extends UnitSpec {
r2Map("20x20").length shouldBe 15
}

it should "trim each FASTQ independently to a FASTQ-specific length" in {
it should "trim each FASTQ independently to a FASTQ-specific length and not discard reads" in {
val (r1, r2) = fqFiles
val (r1Out, r2Out) = (makeTempFile("r1out.", ".fq"), makeTempFile("r2out.", ".fq"))
new TrimFastq(input = Seq(r1, r2), output=Seq(r1Out, r2Out), length = Seq(10, 15), exclude = false).execute()
new TrimFastq(input = Seq(r1, r2), output = Seq(r1Out, r2Out), length = Seq(10, 15), exclude = false).execute()
val r1Map = FastqSource(r1Out).map(r => r.name -> r).toMap
val r2Map = FastqSource(r2Out).map(r => r.name -> r).toMap
r1Map.size shouldBe 3
Expand All @@ -148,4 +148,16 @@ class TrimFastqTest extends UnitSpec {
r2Map("10x20").length shouldBe 15
r2Map("20x20").length shouldBe 15
}

it should "trim each FASTQ independently to a FASTQ-specific length and discard reads" in {
val (r1, r2) = fqFiles
val (r1Out, r2Out) = (makeTempFile("r1out.", ".fq"), makeTempFile("r2out.", ".fq"))
new TrimFastq(input = Seq(r1, r2), output=Seq(r1Out, r2Out), length = Seq(20, 20), exclude = true).execute()
val r1Map = FastqSource(r1Out).map(r => r.name -> r).toMap
val r2Map = FastqSource(r2Out).map(r => r.name -> r).toMap
r1Map.size shouldBe 1
r2Map.size shouldBe r1Map.size
r1Map("20x20").length shouldBe 20
r2Map("20x20").length shouldBe 20
}
}

0 comments on commit a789098

Please sign in to comment.