Commit 074d8d3b authored by Peter van 't Hof's avatar Peter van 't Hof

Fixed unit tests

parent 8ad8f6c9
......@@ -17,7 +17,7 @@ package nl.lumc.sasc.biopet.pipelines.gears
import java.io.File
import com.google.common.io.Files
import nl.lumc.sasc.biopet.core.BiopetPipe
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import nl.lumc.sasc.biopet.extensions.centrifuge.{ Centrifuge, CentrifugeKreport }
import nl.lumc.sasc.biopet.extensions.kraken.{ Kraken, KrakenReport }
import nl.lumc.sasc.biopet.extensions.picard.SamToFastq
......@@ -106,7 +106,8 @@ abstract class TestGearsSingle extends TestNGSuite with Matchers {
gears.outputName shouldBe (if (inputMode == Some("bam")) "bamfile" else "R1")
}
val pipesJobs = gears.functions.filter(_.isInstanceOf[BiopetPipe]).flatMap(_.asInstanceOf[BiopetPipe].pipesJobs)
val pipesJobs = gears.functions.filter(_.isInstanceOf[BiopetCommandLineFunction])
.flatMap(_.asInstanceOf[BiopetCommandLineFunction].pipesJobs)
gears.summarySettings("gears_use_kraken") shouldBe kraken.getOrElse(false)
gears.summarySettings("gear_use_qiime_rtax") shouldBe qiimeRtax
......
......@@ -14,10 +14,10 @@
*/
package nl.lumc.sasc.biopet.pipelines.mapping
import java.io.{ File, FileOutputStream }
import java.io.{File, FileOutputStream}
import com.google.common.io.Files
import nl.lumc.sasc.biopet.core.BiopetPipe
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import nl.lumc.sasc.biopet.extensions.centrifuge.Centrifuge
import nl.lumc.sasc.biopet.pipelines.flexiprep.Fastqc
import nl.lumc.sasc.biopet.utils.ConfigUtils
......@@ -86,7 +86,8 @@ abstract class AbstractTestMapping(val aligner: String) extends TestNGSuite with
mapping.libId = Some("1")
mapping.script()
val pipesJobs = mapping.functions.filter(_.isInstanceOf[BiopetPipe]).flatMap(_.asInstanceOf[BiopetPipe].pipesJobs)
val pipesJobs = mapping.functions.filter(_.isInstanceOf[BiopetCommandLineFunction])
.flatMap(_.asInstanceOf[BiopetCommandLineFunction].pipesJobs)
//Flexiprep
mapping.functions.count(_.isInstanceOf[Fastqc]) shouldBe (if (skipFlexiprep) 0 else if (paired) 4 else 2)
......
......@@ -14,13 +14,13 @@
*/
package nl.lumc.sasc.biopet.pipelines.mapping
import java.io.{File, FileOutputStream}
import java.io.{ File, FileOutputStream }
import com.google.common.io.Files
import nl.lumc.sasc.biopet.core.BiopetPipe
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import nl.lumc.sasc.biopet.extensions.centrifuge.Centrifuge
import nl.lumc.sasc.biopet.extensions.picard.{ MarkDuplicates, MergeSamFiles }
import nl.lumc.sasc.biopet.utils.{ConfigUtils, Logging}
import nl.lumc.sasc.biopet.utils.{ ConfigUtils, Logging }
import nl.lumc.sasc.biopet.utils.config.Config
import org.broadinstitute.gatk.queue.QSettings
import org.scalatest.Matchers
......@@ -88,7 +88,8 @@ trait MultisampleMappingTestTrait extends TestNGSuite with Matchers {
val numberFastqLibs = (if (sample1) 1 else 0) + (if (sample2) 2 else 0) + (if (sample3 && bamToFastq) 1 else 0) + (if (sample4 && bamToFastq) 1 else 0)
val numberSamples = (if (sample1) 1 else 0) + (if (sample2) 1 else 0)
val pipesJobs = pipeline.functions.filter(_.isInstanceOf[BiopetPipe]).flatMap(_.asInstanceOf[BiopetPipe].pipesJobs)
val pipesJobs = pipeline.functions.filter(_.isInstanceOf[BiopetCommandLineFunction])
.flatMap(_.asInstanceOf[BiopetCommandLineFunction].pipesJobs)
import MultisampleMapping.MergeStrategy
pipeline.functions.count(_.isInstanceOf[MarkDuplicates]) shouldBe (numberFastqLibs +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment