Skip to content
Snippets Groups Projects
Commit b996ef68 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Piping compliant

parent 747bb560
No related branches found
No related tags found
No related merge requests found
......@@ -28,11 +28,11 @@ import org.broadinstitute.gatk.utils.commandline.{ Input, Output }
class SeqtkSeq(val root: Configurable) extends Seqtk {
/** input file */
@Input(doc = "Input file (FASTQ or FASTA)")
@Input(doc = "Input file (FASTQ or FASTA)", required = !inputAsStdin)
var input: File = _
/** output file */
@Output(doc = "Output file")
@Output(doc = "Output file", required = !outputAsStsout)
var output: File = _
/** mask bases with quality lower than INT [0] */
......@@ -106,8 +106,8 @@ class SeqtkSeq(val root: Configurable) extends Seqtk {
conditional(flag1, "-1") +
conditional(flag2, "-2") +
conditional(V, "-V") +
required(input) +
" > " + required(output)
(if (inputAsStdin) "" else required(input)) +
(if (outputAsStsout) "" else " > " + required(output))
}
/**
......
......@@ -18,7 +18,7 @@ package nl.lumc.sasc.biopet.pipelines.flexiprep
import java.io.File
import nl.lumc.sasc.biopet.core.config.Configurable
import nl.lumc.sasc.biopet.extensions.Ln
import nl.lumc.sasc.biopet.extensions.{Cat, Ln}
class SeqtkSeq(root: Configurable) extends nl.lumc.sasc.biopet.extensions.seqtk.SeqtkSeq(root) {
var fastqc: Fastqc = _
......@@ -48,13 +48,22 @@ class SeqtkSeq(root: Configurable) extends nl.lumc.sasc.biopet.extensions.seqtk.
analysisName = getClass.getSimpleName
super.cmdLine
} else {
analysisName = getClass.getSimpleName + "-ln"
Ln(this, input, output).cmd
analysisName = getClass.getSimpleName + "-skip"
(inputAsStdin, outputAsStsout) match {
case (true, true) => super.cmdLine
case _ => Ln(this, input, output).cmd
}
}
}
}
object SeqtkSeq {
def apply(root: Configurable, fastqc: Fastqc = null): SeqtkSeq = {
val seqtkSeq = new SeqtkSeq(root)
seqtkSeq.fastqc = fastqc
seqtkSeq
}
def apply(root: Configurable, input: File, output: File, fastqc: Fastqc = null): SeqtkSeq = {
val seqtkSeq = new SeqtkSeq(root)
seqtkSeq.input = input
......
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