Commit 66e90444 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Fixed unit tests

parent a4553c54
...@@ -27,19 +27,19 @@ class Centrifuge(val root: Configurable) extends BiopetCommandLineFunction with ...@@ -27,19 +27,19 @@ class Centrifuge(val root: Configurable) extends BiopetCommandLineFunction with
var report: Option[File] = None var report: Option[File] = None
@Output(required = false) @Output(required = false)
var un: Option[File] = _ var un: Option[File] = None
@Output(required = false) @Output(required = false)
var al: Option[File] = _ var al: Option[File] = None
@Output(required = false) @Output(required = false)
var unConc: Option[File] = _ var unConc: Option[File] = None
@Output(required = false) @Output(required = false)
var alConc: Option[File] = _ var alConc: Option[File] = None
@Output(required = false) @Output(required = false)
var metFile: Option[File] = _ var metFile: Option[File] = None
// Input args // Input args
var q: Boolean = config("q", default = false) var q: Boolean = config("q", default = false)
......
...@@ -108,12 +108,12 @@ abstract class TestGearsSingle extends TestNGSuite with Matchers { ...@@ -108,12 +108,12 @@ abstract class TestGearsSingle extends TestNGSuite with Matchers {
val pipesJobs = gears.functions.filter(_.isInstanceOf[BiopetPipe]).flatMap(_.asInstanceOf[BiopetPipe].pipesJobs) val pipesJobs = gears.functions.filter(_.isInstanceOf[BiopetPipe]).flatMap(_.asInstanceOf[BiopetPipe].pipesJobs)
gears.summarySettings("gears_use_kraken") shouldBe kraken.getOrElse(true) gears.summarySettings("gears_use_kraken") shouldBe kraken.getOrElse(false)
gears.summarySettings("gear_use_qiime_rtax") shouldBe qiimeRtax gears.summarySettings("gear_use_qiime_rtax") shouldBe qiimeRtax
gears.summarySettings("gear_use_qiime_closed") shouldBe qiimeClosed gears.summarySettings("gear_use_qiime_closed") shouldBe qiimeClosed
gears.summarySettings("gear_use_qiime_open") shouldBe qiimeOpen gears.summarySettings("gear_use_qiime_open") shouldBe qiimeOpen
gears.krakenScript.isDefined shouldBe kraken.getOrElse(true) gears.krakenScript.isDefined shouldBe kraken.getOrElse(false)
gears.centrifugeScript.isDefined shouldBe centrifuge gears.centrifugeScript.isDefined shouldBe centrifuge
gears.qiimeClosed.isDefined shouldBe qiimeClosed gears.qiimeClosed.isDefined shouldBe qiimeClosed
gears.qiimeOpen.isDefined shouldBe qiimeOpen gears.qiimeOpen.isDefined shouldBe qiimeOpen
...@@ -124,10 +124,10 @@ abstract class TestGearsSingle extends TestNGSuite with Matchers { ...@@ -124,10 +124,10 @@ abstract class TestGearsSingle extends TestNGSuite with Matchers {
gears.functions.count(_.isInstanceOf[SamtoolsView]) shouldBe (if (inputMode == Some("bam")) 1 else 0) gears.functions.count(_.isInstanceOf[SamtoolsView]) shouldBe (if (inputMode == Some("bam")) 1 else 0)
gears.functions.count(_.isInstanceOf[SamToFastq]) shouldBe (if (inputMode == Some("bam")) 1 else 0) gears.functions.count(_.isInstanceOf[SamToFastq]) shouldBe (if (inputMode == Some("bam")) 1 else 0)
gears.functions.count(_.isInstanceOf[Kraken]) shouldBe (if (kraken.getOrElse(true)) 1 else 0) gears.functions.count(_.isInstanceOf[Kraken]) shouldBe (if (kraken.getOrElse(false)) 1 else 0)
gears.functions.count(_.isInstanceOf[KrakenReport]) shouldBe (if (kraken.getOrElse(true)) 1 else 0) gears.functions.count(_.isInstanceOf[KrakenReport]) shouldBe (if (kraken.getOrElse(false)) 1 else 0)
gears.functions.count(_.isInstanceOf[KrakenReportToJson]) shouldBe gears.functions.count(_.isInstanceOf[KrakenReportToJson]) shouldBe
((if (kraken.getOrElse(true)) 1 else 0) + (if (centrifuge) 2 else 0)) ((if (kraken.getOrElse(false)) 1 else 0) + (if (centrifuge) 2 else 0))
gears.functions.count(_.isInstanceOf[Centrifuge]) shouldBe (if (centrifuge) 1 else 0) gears.functions.count(_.isInstanceOf[Centrifuge]) shouldBe (if (centrifuge) 1 else 0)
gears.functions.count(_.isInstanceOf[CentrifugeKreport]) shouldBe (if (centrifuge) 2 else 0) gears.functions.count(_.isInstanceOf[CentrifugeKreport]) shouldBe (if (centrifuge) 2 else 0)
......
...@@ -130,7 +130,10 @@ object GearsTest { ...@@ -130,7 +130,10 @@ object GearsTest {
"seqtk" -> Map("exe" -> "test"), "seqtk" -> Map("exe" -> "test"),
"sickle" -> Map("exe" -> "test"), "sickle" -> Map("exe" -> "test"),
"cutadapt" -> Map("exe" -> "test"), "cutadapt" -> Map("exe" -> "test"),
"pickopenreferenceotus" -> Map("exe" -> "test") "centrifuge" -> Map("exe" -> "test"),
"centrifuge_index" -> "test",
"pickopenreferenceotus" -> Map("exe" -> "test"),
"centrifugekreport" -> Map("exe" -> "test")
) )
val sample1 = Map( val sample1 = Map(
......
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