From fd13448dba036ac7b0c2599e09c5e1bca76bde8c Mon Sep 17 00:00:00 2001
From: bow <bow@bow.web.id>
Date: Fri, 31 Oct 2014 15:57:12 +0100
Subject: [PATCH] Code cleanup

---
 .../nl/lumc/sasc/biopet/tools/WipeReads.scala |  4 ++--
 .../sasc/biopet/tools/WipeReadsUnitTest.scala | 20 +++++++------------
 2 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/WipeReads.scala b/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/WipeReads.scala
index f28f61256..704b203ec 100644
--- a/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/WipeReads.scala
+++ b/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/tools/WipeReads.scala
@@ -378,11 +378,11 @@ object WipeReads extends ToolCommand {
 
     opt[Long]("bloom_size") optional () action { (x, c) =>
       c.copy(bloomSize = x)
-    } text "expected maximum number of reads in target regions (default: 7e7)"
+    } text "Expected maximum number of reads in target regions (default: 7e7)"
 
     opt[Double]("false_positive") optional () action { (x, c) =>
       c.copy(bloomFp = x)
-    } text "false positive rate (default: 4e-7)"
+    } text "False positive rate (default: 4e-7)"
 
     note(
       """
diff --git a/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/tools/WipeReadsUnitTest.scala b/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/tools/WipeReadsUnitTest.scala
index 9523ba2bb..48f8a1c8d 100644
--- a/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/tools/WipeReadsUnitTest.scala
+++ b/biopet-framework/src/test/scala/nl/lumc/sasc/biopet/tools/WipeReadsUnitTest.scala
@@ -44,12 +44,6 @@ class WipeReadsUnitTest extends TestNGSuite with MockitoSugar with Matchers {
   private def makeSams(raws: String*): Seq[SAMRecord] =
     raws.map(s => samP.parseLine(s))
 
-  private def makeTempBam(): File =
-    File.createTempFile("WipeReads", java.util.UUID.randomUUID.toString + ".bam")
-
-  private def makeTempBamIndex(bam: File): File =
-    new File(bam.getAbsolutePath.stripSuffix(".bam") + ".bai")
-
   private def makeSamReader(f: File): SamReader = SamReaderFactory
     .make()
     .validationStringency(ValidationStringency.LENIENT)
@@ -144,15 +138,15 @@ class WipeReadsUnitTest extends TestNGSuite with MockitoSugar with Matchers {
   @Test def testMakeIntervalFromRefFlat() = {
     val intervals: List[Interval] = makeIntervalFromFile(RefFlatFile1)
     intervals.length shouldBe 5
-    intervals.last.getSequence should ===("chrQ")
-    intervals.last.getStart shouldBe 100
-    intervals.last.getEnd shouldBe 200
-    intervals(2).getSequence should ===("chrQ")
-    intervals(2).getStart shouldBe 800
-    intervals(2).getEnd shouldBe 1000
     intervals.head.getSequence should ===("chrS")
     intervals.head.getStart shouldBe 100
     intervals.head.getEnd shouldBe 500
+    intervals(2).getSequence should ===("chrQ")
+    intervals(2).getStart shouldBe 800
+    intervals(2).getEnd shouldBe 1000
+    intervals.last.getSequence should ===("chrQ")
+    intervals.last.getStart shouldBe 100
+    intervals.last.getEnd shouldBe 200
   }
 
   @Test def testSingleBamDefault() = {
@@ -282,7 +276,7 @@ class WipeReadsUnitTest extends TestNGSuite with MockitoSugar with Matchers {
     filterNotFunc(sBamRecs2(2)) shouldBe false
     filterNotFunc(sBamRecs2(3)) shouldBe true
     filterNotFunc(sBamRecs2(4)) shouldBe true
-    // this r07 is not in since filterOuMulti is false
+    // this r07 is not in since filterOutMulti is false
     filterNotFunc(sBamRecs2(5)) shouldBe false
     filterNotFunc(sBamRecs2(6)) shouldBe false
     filterNotFunc(sBamRecs2(7)) shouldBe false
-- 
GitLab