Skip to content
Snippets Groups Projects
Commit 4194de0a authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Added testing for delly options

parent 08bedeee
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,8 @@ class Delly(val root: Configurable) extends SvCaller {
add(delly)
}
require(catVariants.inputFiles.nonEmpty, "Must atleast 1 SV-type be selected for Delly")
add(catVariants)
}
}
......
......@@ -61,10 +61,10 @@ class ShivaSvCallingTest extends TestNGSuite with Matchers {
}
@Test(dataProvider = "shivaSvCallingOptions")
def testShivaSvCcalling(bams: Int,
delly: Boolean,
clever: Boolean,
breakdancer: Boolean) = {
def testShivaSvCalling(bams: Int,
delly: Boolean,
clever: Boolean,
breakdancer: Boolean) = {
val callers: ListBuffer[String] = ListBuffer()
if (delly) callers.append("delly")
if (clever) callers.append("clever")
......@@ -94,6 +94,40 @@ class ShivaSvCallingTest extends TestNGSuite with Matchers {
}
}
@DataProvider(name = "dellyOptions")
def dellyOptions = {
val bool = Array(true, false)
(for (
del <- bool;
dup <- bool;
inv <- bool;
tra <- bool
) yield Array(1, del, dup, inv, tra)).toArray
}
@Test(dataProvider = "dellyOptions")
def testShivaDelly(bams: Int, del: Boolean, dup: Boolean, inv: Boolean, tra: Boolean): Unit = {
val map = Map("variantcallers" -> List("delly"), "delly" ->
Map("DEL" -> del, "DUP" -> dup, "INV" -> inv, "TRA" -> tra)
)
val pipeline = initPipeline(map)
pipeline.inputBams = Map("bam" -> ShivaVariantcallingTest.inputTouch("bam" + ".bam"))
if (!del && !dup && !inv && !tra) intercept[IllegalArgumentException] {
pipeline.init()
pipeline.script()
}
else {
pipeline.init()
pipeline.script()
pipeline.functions.count(_.isInstanceOf[DellyCaller]) shouldBe
((if (del) 1 else 0) + (if (dup) 1 else 0) + (if (inv) 1 else 0) + (if (tra) 1 else 0))
}
}
@AfterClass def removeTempOutputDir() = {
FileUtils.deleteDirectory(ShivaSvCallingTest.outputDir)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment