Add Trimgalore output for unpaired reads (#1568)

* Add Trimgalore output for unpaired reads

* Use glob instead of outprefix
This commit is contained in:
Harshil Patel 2022-04-26 19:15:24 +01:00 committed by GitHub
parent 1f77bc130b
commit 85ec13ff1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 5 deletions

View file

@ -11,12 +11,13 @@ process TRIMGALORE {
tuple val(meta), path(reads) tuple val(meta), path(reads)
output: output:
tuple val(meta), path("*.fq.gz") , emit: reads tuple val(meta), path("*{trimmed,val}*.fq.gz"), emit: reads
tuple val(meta), path("*report.txt") , emit: log tuple val(meta), path("*report.txt") , emit: log
path "versions.yml" , emit: versions path "versions.yml" , emit: versions
tuple val(meta), path("*.html"), emit: html optional true tuple val(meta), path("*unpaired*.fq.gz") , emit: unpaired, optional: true
tuple val(meta), path("*.zip") , emit: zip optional true tuple val(meta), path("*.html") , emit: html , optional: true
tuple val(meta), path("*.zip") , emit: zip , optional: true
when: when:
task.ext.when == null || task.ext.when task.ext.when == null || task.ext.when
@ -52,6 +53,7 @@ process TRIMGALORE {
$c_r1 \\ $c_r1 \\
$tpc_r1 \\ $tpc_r1 \\
${prefix}.fastq.gz ${prefix}.fastq.gz
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":
trimgalore: \$(echo \$(trim_galore --version 2>&1) | sed 's/^.*version //; s/Last.*\$//') trimgalore: \$(echo \$(trim_galore --version 2>&1) | sed 's/^.*version //; s/Last.*\$//')
@ -73,6 +75,7 @@ process TRIMGALORE {
$tpc_r2 \\ $tpc_r2 \\
${prefix}_1.fastq.gz \\ ${prefix}_1.fastq.gz \\
${prefix}_2.fastq.gz ${prefix}_2.fastq.gz
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":
trimgalore: \$(echo \$(trim_galore --version 2>&1) | sed 's/^.*version //; s/Last.*\$//') trimgalore: \$(echo \$(trim_galore --version 2>&1) | sed 's/^.*version //; s/Last.*\$//')

View file

@ -37,6 +37,11 @@ output:
List of input adapter trimmed FastQ files of size 1 and 2 for List of input adapter trimmed FastQ files of size 1 and 2 for
single-end and paired-end data, respectively. single-end and paired-end data, respectively.
pattern: "*.{fq.gz}" pattern: "*.{fq.gz}"
- unpaired:
type: file
description: |
FastQ files containing unpaired reads from read 1 or read 2
pattern: "*unpaired*.fq.gz"
- html: - html:
type: file type: file
description: FastQC report (optional) description: FastQC report (optional)