Commit e4acdd30 authored by Peter van 't Hof's avatar Peter van 't Hof

Adding testing on number of jobs

parent 59bb7750
......@@ -140,8 +140,8 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum
/**
* Performs the varda import and activate for one sample
*
* @param sampleID the sampleID to be used
*
* @param sampleID the sampleID to be used
* @param inputVcf the input VCF
* @param gVCF the gVCF for coverage
* @param annotation: ManweDownloadAnnotateVcf object of annotated vcf
......@@ -210,8 +210,8 @@ class Toucan(val root: Configurable) extends QScript with BiopetQScript with Sum
/**
* Perform varda analysis
*
* @param vcf input vcf
*
* @param vcf input vcf
* @param gVcf The gVCF to be used for coverage calculations
* @return return vcf
*/
......
......@@ -4,6 +4,8 @@ import java.io.File
import java.nio.file.Paths
import com.google.common.io.Files
import nl.lumc.sasc.biopet.extensions.VariantEffectPredictor
import nl.lumc.sasc.biopet.extensions.tools.VcfWithVcf
import nl.lumc.sasc.biopet.utils.config.Config
import org.broadinstitute.gatk.queue.QSettings
import org.scalatest.Matchers
......@@ -11,8 +13,8 @@ import org.scalatest.testng.TestNGSuite
import org.testng.annotations.Test
/**
* Created by pjvan_thof on 4/11/16.
*/
* Created by pjvan_thof on 4/11/16.
*/
class ToucanTest extends TestNGSuite with Matchers {
def initPipeline(map: Map[String, Any]): Toucan = {
new Toucan {
......@@ -28,6 +30,19 @@ class ToucanTest extends TestNGSuite with Matchers {
val pipeline = initPipeline(ToucanTest.config)
pipeline.inputVcf = new File(ToucanTest.resourcePath("/chrQ2.vcf.gz"))
pipeline.script()
pipeline.functions.count(_.isInstanceOf[VariantEffectPredictor]) shouldBe 1
pipeline.functions.count(_.isInstanceOf[VcfWithVcf]) shouldBe 0
}
@Test
def testBinning(): Unit = {
val pipeline = initPipeline(ToucanTest.config ++ Map("bin_size" -> 4000))
pipeline.inputVcf = new File(ToucanTest.resourcePath("/chrQ2.vcf.gz"))
pipeline.script()
pipeline.functions.count(_.isInstanceOf[VariantEffectPredictor]) shouldBe 4
pipeline.functions.count(_.isInstanceOf[VcfWithVcf]) shouldBe 0
}
@Test
......@@ -35,6 +50,9 @@ class ToucanTest extends TestNGSuite with Matchers {
val pipeline = initPipeline(ToucanTest.config ++ Map("gonl_vcf" -> ToucanTest.gonlVcfFile))
pipeline.inputVcf = new File(ToucanTest.resourcePath("/chrQ2.vcf.gz"))
pipeline.script()
pipeline.functions.count(_.isInstanceOf[VariantEffectPredictor]) shouldBe 1
pipeline.functions.count(_.isInstanceOf[VcfWithVcf]) shouldBe 1
}
@Test
......@@ -42,6 +60,9 @@ class ToucanTest extends TestNGSuite with Matchers {
val pipeline = initPipeline(ToucanTest.config ++ Map("exac_vcf" -> ToucanTest.exacVcfFile))
pipeline.inputVcf = new File(ToucanTest.resourcePath("/chrQ2.vcf.gz"))
pipeline.script()
pipeline.functions.count(_.isInstanceOf[VariantEffectPredictor]) shouldBe 1
pipeline.functions.count(_.isInstanceOf[VcfWithVcf]) shouldBe 1
}
@Test
......@@ -51,6 +72,9 @@ class ToucanTest extends TestNGSuite with Matchers {
pipeline.inputVcf = new File(ToucanTest.resourcePath("/chrQ2.vcf.gz"))
pipeline.inputGvcf = Some(gvcfFile)
pipeline.script()
pipeline.functions.count(_.isInstanceOf[VariantEffectPredictor]) shouldBe 1
pipeline.functions.count(_.isInstanceOf[VcfWithVcf]) shouldBe 0
}
}
......@@ -68,7 +92,6 @@ object ToucanTest {
val exacVcfFile: File = File.createTempFile("exac.", ".vcf.gz")
exacVcfFile.deleteOnExit()
val config = Map(
"reference_fasta" -> resourcePath("/fake_chrQ.fa"),
"output_dir" -> outputDir,
......
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