Skip to content
Snippets Groups Projects
Commit 5555a57f authored by Sander Bollen's avatar Sander Bollen
Browse files

Merge branch 'fix-varscan' into 'develop'

Fix reference in varscan

Fixes #205 

See merge request !239
parents f4063de9 a2c583e8
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,16 +28,13 @@ 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"
@Input(doc = "Input BAM file", required = true)
var input: File = null
@Input(doc = "Reference FASTA file", required = true)
var reference: File = config("reference")
@Output(doc = "Output VCF file", required = true)
var output: File = null
......@@ -49,7 +46,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 +88,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")
deps :+= 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