Commit fcb1e2f5 authored by Sander van der Zeeuw's avatar Sander van der Zeeuw
Browse files

Merge remote-tracking branch 'origin/feature-VarscanIntoShiva' into feature-VarscanIntoShiva

parents 6073f6aa 30696cab
......@@ -15,20 +15,15 @@
*/
package nl.lumc.sasc.biopet.extensions.varscan
import nl.lumc.sasc.biopet.core.BiopetJavaCommandLineFunction
import nl.lumc.sasc.biopet.core.{ Version, BiopetJavaCommandLineFunction }
abstract class Varscan extends BiopetJavaCommandLineFunction {
abstract class Varscan extends BiopetJavaCommandLineFunction with Version {
override def subPath = "varscan" :: super.subPath
jarFile = config("varscan_jar")
/**
* TODO: test version
* override def versionCommand = super.commandLine
* override val versionRegex = """VarScan v(.*)""".r
*/
override def defaultCoreMemory = 5.0
def versionCommand = super.commandLine
def versionRegex = """VarScan v(.*)""".r
}
......@@ -39,6 +39,8 @@ class VarscanMpileup2cns(val root: Configurable) extends Varscan {
var vcfSampleList: Option[File] = config("vcf_sample_list")
var variants: Option[Int] = config("variants")
override def defaultCoreMemory = 6.0
override def beforeGraph(): Unit = {
val validValues: Set[Int] = Set(0, 1)
// check for boolean vars that are passed as ints
......
......@@ -5,7 +5,7 @@ import java.io.PrintWriter
import nl.lumc.sasc.biopet.extensions.gatk.CombineVariants
import nl.lumc.sasc.biopet.extensions.samtools.SamtoolsMpileup
import nl.lumc.sasc.biopet.extensions.varscan.{ FixMpileup, VarscanMpileup2cns }
import nl.lumc.sasc.biopet.extensions.{Bgzip, Tabix}
import nl.lumc.sasc.biopet.extensions.{ Bgzip, Tabix }
import nl.lumc.sasc.biopet.utils.config.Configurable
/**
......
......@@ -77,7 +77,7 @@ class ShivaVariantcallingTest extends TestNGSuite with Matchers {
pipeline.inputBams = (for (n <- 1 to bams) yield n.toString -> ShivaVariantcallingTest.inputTouch("bam_" + n + ".bam")).toMap
val illegalArgumentException = pipeline.inputBams.isEmpty || (!raw && !bcftools && !bcftoolsSinglesample && !freebayes)
val illegalArgumentException = pipeline.inputBams.isEmpty || (!raw && !bcftools && !bcftoolsSinglesample && !freebayes && !varscanCnsSinglesample)
if (illegalArgumentException) intercept[IllegalArgumentException] {
pipeline.script()
......@@ -86,7 +86,7 @@ class ShivaVariantcallingTest extends TestNGSuite with Matchers {
if (!illegalArgumentException) {
pipeline.script()
pipeline.functions.count(_.isInstanceOf[CombineVariants]) shouldBe 1 + (if (raw) 1 else 0)
pipeline.functions.count(_.isInstanceOf[CombineVariants]) shouldBe (1 + (if (raw) 1 else 0) + (if (varscanCnsSinglesample) 1 else 0))
//pipeline.functions.count(_.isInstanceOf[Bcftools]) shouldBe (if (bcftools) 1 else 0)
//FIXME: Can not check for bcftools because of piping
pipeline.functions.count(_.isInstanceOf[Freebayes]) shouldBe (if (freebayes) 1 else 0)
......@@ -133,6 +133,7 @@ object ShivaVariantcallingTest {
"freebayes" -> Map("exe" -> "test"),
"md5sum" -> Map("exe" -> "test"),
"bgzip" -> Map("exe" -> "test"),
"tabix" -> Map("exe" -> "test")
"tabix" -> Map("exe" -> "test"),
"varscan_jar" -> "test"
)
}
\ No newline at end of file
Supports Markdown
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