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

Fix reference in varscan

parent f4063de9
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ package nl.lumc.sasc.biopet.pipelines.gentrap.extensions
import java.io.File
import nl.lumc.sasc.biopet.core.BiopetCommandLineFunction
import nl.lumc.sasc.biopet.core.{ Reference, BiopetCommandLineFunction }
import nl.lumc.sasc.biopet.core.extensions.PythonCommandLineFunction
import nl.lumc.sasc.biopet.utils.config.Configurable
import nl.lumc.sasc.biopet.extensions.samtools.SamtoolsMpileup
......@@ -28,7 +28,7 @@ import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
/** Ad-hoc extension for VarScan variant calling that involves 6-command pipe */
// FIXME: generalize piping instead of building something by hand like this!
// Better to do everything quick and dirty here rather than something half-implemented with the objects
class CustomVarScan(val root: Configurable) extends BiopetCommandLineFunction { wrapper =>
class CustomVarScan(val root: Configurable) extends BiopetCommandLineFunction with Reference { wrapper =>
override def configName = "customvarscan"
......@@ -36,7 +36,7 @@ class CustomVarScan(val root: Configurable) extends BiopetCommandLineFunction {
var input: File = null
@Input(doc = "Reference FASTA file", required = true)
var reference: File = config("reference")
var reference: File = null
@Output(doc = "Output VCF file", required = true)
var output: File = null
......@@ -49,7 +49,6 @@ class CustomVarScan(val root: Configurable) extends BiopetCommandLineFunction {
this.input = List(wrapper.input)
override def configName = wrapper.configName
disableBaq = true
reference = config("reference")
depth = Option(1000000)
outputMappingQuality = true
}
......@@ -92,7 +91,9 @@ class CustomVarScan(val root: Configurable) extends BiopetCommandLineFunction {
}
override def beforeGraph(): Unit = {
super.beforeGraph()
require(output.toString.endsWith(".gz"), "Output must have a .gz file extension")
if (reference == null) reference = referenceFasta()
}
def cmdLine: String = {
......
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