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 @@ ...@@ -15,20 +15,15 @@
*/ */
package nl.lumc.sasc.biopet.extensions.varscan 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 override def subPath = "varscan" :: super.subPath
jarFile = config("varscan_jar") jarFile = config("varscan_jar")
/** def versionCommand = super.commandLine
* TODO: test version def versionRegex = """VarScan v(.*)""".r
* override def versionCommand = super.commandLine
* override val versionRegex = """VarScan v(.*)""".r
*/
override def defaultCoreMemory = 5.0
} }
...@@ -39,6 +39,8 @@ class VarscanMpileup2cns(val root: Configurable) extends Varscan { ...@@ -39,6 +39,8 @@ class VarscanMpileup2cns(val root: Configurable) extends Varscan {
var vcfSampleList: Option[File] = config("vcf_sample_list") var vcfSampleList: Option[File] = config("vcf_sample_list")
var variants: Option[Int] = config("variants") var variants: Option[Int] = config("variants")
override def defaultCoreMemory = 6.0
override def beforeGraph(): Unit = { override def beforeGraph(): Unit = {
val validValues: Set[Int] = Set(0, 1) val validValues: Set[Int] = Set(0, 1)
// check for boolean vars that are passed as ints // check for boolean vars that are passed as ints
......
...@@ -5,7 +5,7 @@ import java.io.PrintWriter ...@@ -5,7 +5,7 @@ import java.io.PrintWriter
import nl.lumc.sasc.biopet.extensions.gatk.CombineVariants import nl.lumc.sasc.biopet.extensions.gatk.CombineVariants
import nl.lumc.sasc.biopet.extensions.samtools.SamtoolsMpileup import nl.lumc.sasc.biopet.extensions.samtools.SamtoolsMpileup
import nl.lumc.sasc.biopet.extensions.varscan.{ FixMpileup, VarscanMpileup2cns } 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 import nl.lumc.sasc.biopet.utils.config.Configurable
/** /**
......
...@@ -77,7 +77,7 @@ class ShivaVariantcallingTest extends TestNGSuite with Matchers { ...@@ -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 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] { if (illegalArgumentException) intercept[IllegalArgumentException] {
pipeline.script() pipeline.script()
...@@ -86,7 +86,7 @@ class ShivaVariantcallingTest extends TestNGSuite with Matchers { ...@@ -86,7 +86,7 @@ class ShivaVariantcallingTest extends TestNGSuite with Matchers {
if (!illegalArgumentException) { if (!illegalArgumentException) {
pipeline.script() 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) //pipeline.functions.count(_.isInstanceOf[Bcftools]) shouldBe (if (bcftools) 1 else 0)
//FIXME: Can not check for bcftools because of piping //FIXME: Can not check for bcftools because of piping
pipeline.functions.count(_.isInstanceOf[Freebayes]) shouldBe (if (freebayes) 1 else 0) pipeline.functions.count(_.isInstanceOf[Freebayes]) shouldBe (if (freebayes) 1 else 0)
...@@ -133,6 +133,7 @@ object ShivaVariantcallingTest { ...@@ -133,6 +133,7 @@ object ShivaVariantcallingTest {
"freebayes" -> Map("exe" -> "test"), "freebayes" -> Map("exe" -> "test"),
"md5sum" -> Map("exe" -> "test"), "md5sum" -> Map("exe" -> "test"),
"bgzip" -> 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