Commit d3a453a1 authored by bow's avatar bow
Browse files

Add cutadapt statistics output to flexiprep runs

parent 748d9525
......@@ -19,6 +19,9 @@ class Cutadapt(val root: Configurable) extends BiopetCommandLineFunction {
@Output(doc = "Output fastq file")
var fastq_output: File = _
@Output(doc = "Output statistics file")
var stats_output: File = _
executable = config("exe", default = "cutadapt")
override def versionCommand = executable + " --version"
override val versionRegex = """(.*)""".r
......@@ -49,7 +52,8 @@ class Cutadapt(val root: Configurable) extends BiopetCommandLineFunction {
optional("-M", opt_maximum_length) +
// input / output
required(fastq_input) +
" > " + required(fastq_output)
required("--output", fastq_output) +
" > " + required(stats_output)
} else {
analysisName = getClass.getSimpleName + "-ln"
"ln -sf " +
......
......@@ -128,13 +128,19 @@ class Flexiprep(val root: Configurable) extends QScript with BiopetQScript {
var R2: File = new File(R2_in)
if (!skipClip) { // Adapter clipping
val cutadapt_R1 = new Cutadapt(this)
if (!skipTrim || paired) cutadapt_R1.isIntermediate = true
cutadapt_R1.fastq_input = R1
cutadapt_R1.fastq_output = swapExt(outDir, R1, R1_ext, ".clip" + R1_ext)
cutadapt_R1.stats_output = swapExt(outDir, R1, R1_ext, ".clip.stats")
if (outputFiles.contains("contams_R1")) cutadapt_R1.contams_file = outputFiles("contams_R1")
add(cutadapt_R1)
R1 = cutadapt_R1.fastq_output
if (paired) {
val cutadapt_R2 = new Cutadapt(this)
if (!skipTrim || paired) cutadapt_R2.isIntermediate = true
......
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