Commit 3c83710e authored by Peter van 't Hof's avatar Peter van 't Hof Committed by GitHub

Merge pull request #49 from biopet/fix-pipes

Fix pipes
parents 23dbd3ee 8d5a16f5
...@@ -28,7 +28,9 @@ class SamtoolsFlagstat(val root: Configurable) extends Samtools { ...@@ -28,7 +28,9 @@ class SamtoolsFlagstat(val root: Configurable) extends Samtools {
var output: File = _ var output: File = _
/** Returns command to execute */ /** Returns command to execute */
def cmdLine = required(executable) + required("flagstat") + required(input) + " > " + required(output) def cmdLine = required(executable) + required("flagstat") +
(if (inputAsStdin) "-" else required(input)) +
(if (outputAsStsout) "" else " > " + required(output))
} }
object SamtoolsFlagstat { object SamtoolsFlagstat {
......
...@@ -33,18 +33,20 @@ class SamtoolsView(val root: Configurable) extends Samtools { ...@@ -33,18 +33,20 @@ class SamtoolsView(val root: Configurable) extends Samtools {
var f: List[String] = config("f", default = List.empty[String]) var f: List[String] = config("f", default = List.empty[String])
var F: List[String] = config("F", default = List.empty[String]) var F: List[String] = config("F", default = List.empty[String])
def cmdBase = required(executable) + @Input(required = false)
var L: Option[File] = None
/** Returns command to execute */
def cmdLine = required(executable) +
required("view") + required("view") +
optional("-q", q) + optional("-q", q) +
optional("-L", L) +
repeat("-f", f) + repeat("-f", f) +
repeat("-F", F) + repeat("-F", F) +
conditional(b, "-b") + conditional(b, "-b") +
conditional(h, "-h") conditional(h, "-h") +
def cmdPipeInput = cmdBase + "-" (if (inputAsStdin) "-" else required(input)) +
def cmdPipe = cmdBase + required(input) (if (outputAsStsout) "" else " > " + required(output))
/** Returns command to execute */
def cmdLine = cmdPipe + " > " + required(output)
} }
object SamtoolsView { object SamtoolsView {
......
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