Commit f4d7e851 authored by bow's avatar bow
Browse files

Fix incorrectly passed java flags for piped VarScan command

parent 5bd4ef22
......@@ -63,20 +63,27 @@ class CustomVarScan(val root: Configurable) extends BiopetCommandLineFunction {
override def cmdLine: String = required(executable) + required("-vP") + required("""\t\t""")
}
private def varscan = new Mpileup2cns(wrapper.root) {
private val varscan = new Mpileup2cns(wrapper.root) {
strandFilter = Option(0)
outputVcf = Option(1)
}
private def compress = new Bgzip(wrapper.root) {
this.output = wrapper.output
}
private val compress = new Bgzip(wrapper.root)
private def index = new Tabix(wrapper.root) {
private val index = new Tabix(wrapper.root) {
input = compress.output
p = Option("vcf")
}
override def freezeFieldValues(): Unit = {
varscan.output = Option(new File(wrapper.output.toString.stripSuffix(".gz")))
compress.input = List(varscan.output.get)
compress.output = this.output
super.freezeFieldValues()
varscan.qSettings = this.qSettings
varscan.freezeFieldValues()
}
override def beforeGraph: Unit = {
require(output.toString.endsWith(".gz"), "Output must have a .gz file extension")
}
......@@ -85,6 +92,6 @@ class CustomVarScan(val root: Configurable) extends BiopetCommandLineFunction {
// FIXME: manual trigger of commandLine for version retrieval
mpileup.commandLine
mpileup.cmdPipe + " | " + fixMpileup.commandLine + " | " + removeEmptyPile.commandLine + " | " +
varscan.commandLine + " | " + compress.commandLine + " && " + index.commandLine
varscan.commandLine + " && " + compress.commandLine + " && " + index.commandLine
}
}
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