Commit 0cef5b4b authored by Ruben Vorderman's avatar Ruben Vorderman
Browse files

Merge remote-tracking branch 'origin/develop' into fix-BIOPET-593

parents 23e9a4a8 8f638fe4
......@@ -149,7 +149,7 @@ trait BiopetCommandLineFunction extends CommandLineResources { biopetFunction =>
private[core] var _inputAsStdin = false
def inputAsStdin = _inputAsStdin
private[core] var _outputAsStdout = false
def outputAsStsout = _outputAsStdout
def outputAsStdout = _outputAsStdout
/**
* This operator sends stdout to `that` and combine this into 1 command line function
......
......@@ -27,7 +27,7 @@ class BiopetPipeTest extends TestNGSuite with Matchers {
def cmdLine =
"pipe1" +
(if (!inputAsStdin) " input1 " else "") +
(if (!outputAsStsout) " output1 " + "")
(if (!outputAsStdout) " output1 " + "")
}
class Pipe2 extends BiopetCommandLineFunction {
......@@ -35,7 +35,7 @@ class BiopetPipeTest extends TestNGSuite with Matchers {
def cmdLine =
"pipe2" +
(if (!inputAsStdin) " input2 " else "") +
(if (!outputAsStsout) " output2 " + "")
(if (!outputAsStdout) " output2 " + "")
}
@Test def testPipeCommands: Unit = {
......
......@@ -44,7 +44,7 @@ class Awk(val parent: Configurable) extends BiopetCommandLineFunction with Versi
executable +
required(command) +
(if (inputAsStdin) "" else required(input)) +
(if (outputAsStsout) "" else " > " + required(output))
(if (outputAsStdout) "" else " > " + required(output))
}
object Awk {
......
......@@ -36,12 +36,12 @@ class Bgzip(val parent: Configurable) extends BiopetCommandLineFunction {
override def beforeGraph(): Unit = {
super.beforeGraph()
if (input.isEmpty && !inputAsStdin) Logging.addError("Input is missing for Bgzip")
if (output == null && !outputAsStsout) Logging.addError("Output is missing for Bgzip")
if (output == null && !outputAsStdout) Logging.addError("Output is missing for Bgzip")
}
def cmdLine =
required(executable) +
conditional(f, "-f") +
" -c " + repeat(input) +
(if (outputAsStsout) "" else " > " + required(output))
(if (outputAsStdout) "" else " > " + required(output))
}
......@@ -38,7 +38,7 @@ class Cat(val parent: Configurable) extends BiopetCommandLineFunction {
def cmdLine =
required(executable) +
(if (inputAsStdin) "" else repeat(input)) +
(if (outputAsStsout) "" else (if (appending) " >> " else " > ") + required(output))
(if (outputAsStdout) "" else (if (appending) " >> " else " > ") + required(output))
}
/**
......
......@@ -34,5 +34,5 @@ class Curl(val parent: Configurable) extends BiopetCommandLineFunction with Vers
def versionRegex = """curl (\w+\.\w+\.\w+) .*""".r
def cmdLine: String =
required(executable) + required(url) + (if (outputAsStsout) "" else " > " + required(output))
required(executable) + required(url) + (if (outputAsStdout) "" else " > " + required(output))
}
......@@ -165,7 +165,7 @@ class Cutadapt(val parent: Configurable)
optional("--untrimmed-paired-output", untrimmedPairedOutput) +
// input / output
required(fastqInput) +
(if (outputAsStsout) ""
(if (outputAsStdout) ""
else
required("--output", fastqOutput) +
" > " + required(statsOutput))
......
......@@ -206,5 +206,5 @@ class Freebayes(val parent: Configurable)
conditional(debug, "--debug") +
optional("--haplotype-length", haplotypeLength) +
(if (inputAsStdin) required("--stdin") else "") +
(if (outputAsStsout) "" else optional("--vcf", outputVcf))
(if (outputAsStdout) "" else optional("--vcf", outputVcf))
}
......@@ -38,6 +38,6 @@ class GffRead(val parent: Configurable) extends BiopetCommandLineFunction {
def cmdLine =
executable +
(if (inputAsStdin) "" else required(input)) +
(if (outputAsStsout) "" else required("-o", output)) +
(if (outputAsStdout) "" else required("-o", output)) +
conditional(T, "-T")
}
......@@ -46,7 +46,7 @@ class Grep(val parent: Configurable) extends BiopetCommandLineFunction {
conditional(perlRegexp, "-P") +
required(grepFor) +
(if (inputAsStdin) "" else required(input)) +
(if (outputAsStsout) "" else " > " + required(output))
(if (outputAsStdout) "" else " > " + required(output))
}
object Grep {
......
......@@ -51,5 +51,5 @@ class GtfToGenePred(val parent: Configurable) extends BiopetCommandLineFunction
conditional(simple, "-simple") +
conditional(geneNameAsName2, "-geneNameAsName2") +
repeat(inputGtfs) +
(if (outputAsStsout) required("/dev/stdout") else required(outputGenePred))
(if (outputAsStdout) required("/dev/stdout") else required(outputGenePred))
}
......@@ -35,7 +35,7 @@ class Gzip(val parent: Configurable) extends BiopetCommandLineFunction with Vers
def cmdLine =
required(executable) + " -c " +
(if (inputAsStdin) "" else repeat(input)) +
(if (outputAsStsout) "" else " > " + required(output))
(if (outputAsStdout) "" else " > " + required(output))
}
object Gzip {
......
......@@ -46,6 +46,6 @@ class Sed(val parent: Configurable) extends BiopetCommandLineFunction with Versi
executable +
repeat("-e", expressions) +
(if (inputAsStdin) "" else required(inputFile)) +
(if (outputAsStsout) "" else " > " + required(outputFile))
(if (outputAsStdout) "" else " > " + required(outputFile))
}
......@@ -78,13 +78,13 @@ class Sickle(val parent: Configurable)
cmd +
(if (inputAsStdin) required("-f", new File("/dev/stdin")) else required("-f", inputR1)) +
required("-t", qualityType) +
(if (outputAsStsout) required("-o", new File("/dev/stdout")) else required("-o", outputR1)) +
(if (outputAsStdout) required("-o", new File("/dev/stdout")) else required("-o", outputR1)) +
optional("-q", qualityThreshold) +
optional("-l", lengthThreshold) +
conditional(noFiveprime, "-x") +
conditional(discardN, "-n") +
conditional(quiet || outputAsStsout, "--quiet") +
(if (outputAsStsout) "" else " > " + required(outputStats))
conditional(quiet || outputAsStdout, "--quiet") +
(if (outputAsStdout) "" else " > " + required(outputStats))
}
override def summaryDeps = outputStats :: super.summaryDeps
......
......@@ -39,7 +39,7 @@ class Zcat(val parent: Configurable) extends BiopetCommandLineFunction with Vers
def cmdLine =
required(executable) +
(if (inputAsStdin) "" else repeat(input)) +
(if (outputAsStsout) "" else (if (appending) " >> " else " > ") + required(output))
(if (outputAsStdout) "" else (if (appending) " >> " else " > ") + required(output))
}
object Zcat {
......
......@@ -82,6 +82,6 @@ class BcftoolsCall(val parent: Configurable) extends Bcftools {
optional("-P", P) +
conditional(X, "-X") +
conditional(Y, "-Y") +
(if (outputAsStsout) "" else required("-o", output)) +
(if (outputAsStdout) "" else required("-o", output)) +
(if (inputAsStdin) "-" else required(input))
}
......@@ -49,7 +49,7 @@ class BcftoolsMerge(val parent: Configurable) extends Bcftools {
def cmdLine =
required(executable) +
required("merge") +
(if (outputAsStsout) "" else required("-o", output)) +
(if (outputAsStdout) "" else required("-o", output)) +
conditional(forcesamples, "--force-samples") +
conditional(printheader, "--print-header") +
optional("--use-header", useheader) +
......
......@@ -59,7 +59,7 @@ class BedtoolsCoverage(val parent: Configurable) extends Bedtools with Reference
conditional(sorted, "-sorted") +
(if (sorted) required("-g", BedtoolsCoverage.getGenomeFile(referenceFai, jobTempDir))
else "") +
(if (outputAsStsout) "" else " > " + required(output))
(if (outputAsStdout) "" else " > " + required(output))
}
......
......@@ -37,6 +37,6 @@ class BedtoolsSort(val parent: Configurable) extends Bedtools with Reference {
def cmdLine =
required(executable) + required("sort") + required("-i", input) +
optional("-faidx", faidx) +
(if (outputAsStsout) "" else " > " + required(output))
(if (outputAsStdout) "" else " > " + required(output))
}
......@@ -256,5 +256,5 @@ class Bowtie2(val parent: Configurable)
optional("-2", r2)
case _ => required("-U", R1)
}) +
(if (outputAsStsout) "" else required("-S", output))
(if (outputAsStdout) "" else required("-S", output))
}
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