Commit 091cde73 authored by akaljuvee's avatar akaljuvee

the same but with scala's multi-line string

parent 12da2fa8
......@@ -47,17 +47,19 @@ class DellyCaller(val root: Configurable) extends BiopetCommandLineFunction with
}
def cmdLine = required(executable) +
"-t" + required(analysistype) +
"-o" + required(outputvcf) +
required("-t", analysistype) +
required("-o", outputvcf) +
required(input) +
createEmptyOutputIfNeeded
// when no variants are found then the tool doesn't generate the output file either, in Biopet it's needed that the empty file would be there
def createEmptyOutputIfNeeded = Array("c=$?",
"if [ $c -eq 0 ] && [ ! -f " + outputvcf + " ]; then",
"echo '##fileformat=VCFv4.2' > " + outputvcf,
"echo '#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO' >> " + outputvcf,
"fi",
"exit $c").mkString("\n", "\n", "\n")
private def createEmptyOutputIfNeeded =
s"""
|c=$$?
|if [ $$c -eq 0 ] && [ ! -f $outputvcf ]; then
| echo '##fileformat=VCFv4.2' > $outputvcf
| echo '#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO' >> $outputvcf
|fi
|exit $$c""".stripMargin
}
Markdown is supported
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