Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions modules/nf-core/elprep/filter/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ output:
type: file
description: BAM/SAM file
pattern: "*.{bam,sam}"
ontologies: []
logs:
- - meta:
type: map
Expand All @@ -125,6 +126,7 @@ output:
type: file
description: Log file
pattern: "elprep-*.log"
ontologies: []
metrics:
- - meta:
type: map
Expand All @@ -135,6 +137,7 @@ output:
type: file
description: Metrics file
pattern: "*.{metrics.txt}"
ontologies: []
recall:
- - meta:
type: map
Expand All @@ -145,6 +148,7 @@ output:
type: file
description: Recall file
pattern: "*.{recall}"
ontologies: []
gvcf:
- - meta:
type: map
Expand All @@ -155,6 +159,7 @@ output:
type: file
description: VCF file
pattern: "*.{vcf.gz}"
ontologies: []
table:
- - meta:
type: map
Expand All @@ -165,6 +170,7 @@ output:
type: file
description: Table
pattern: "*.{table}"
ontologies: []
activity_profile:
- - meta:
type: map
Expand All @@ -175,6 +181,7 @@ output:
type: file
description: Activity profile
pattern: "*.{activity_profile.igv}"
ontologies: []
assembly_regions:
- - meta:
type: map
Expand All @@ -185,6 +192,7 @@ output:
type: file
description: Assembly regions
pattern: "*.{assembly_regions.igv}"
ontologies: []
versions:
- versions.yml:
type: file
Expand Down
25 changes: 3 additions & 22 deletions modules/nf-core/trimgalore/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ process TRIMGALORE {
tuple val(meta), path("*unpaired{,_1,_2}.fq.gz") , emit: unpaired, optional: true
tuple val(meta), path("*.html") , emit: html, optional: true
tuple val(meta), path("*.zip") , emit: zip, optional: true
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('trim_galore'), eval("trim_galore --version 2>&1 | grep -Eo '[0-9]+(\\.[0-9]+)+'"), topic: versions, emit: versions_trim_galore
tuple val("${task.process}"), val('cutadapt'), eval("echo \$(cutadapt --version 2>&1)"), topic: versions, emit: versions_cutadapt
tuple val("${task.process}"), val('pigz'), eval("echo \$( pigz --version 2>&1 | sed 's/pigz //g' )"), topic: versions, emit: versions_pigz

when:
task.ext.when == null || task.ext.when
Expand Down Expand Up @@ -52,13 +54,6 @@ process TRIMGALORE {
--cores ${cores} \\
--gzip \\
${prefix}.fastq.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
trimgalore: \$(echo \$(trim_galore --version 2>&1) | sed 's/^.*version //; s/Last.*\$//')
cutadapt: \$(cutadapt --version)
pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' )
END_VERSIONS
"""
}
else {
Expand All @@ -72,13 +67,6 @@ process TRIMGALORE {
--gzip \\
${prefix}_1.fastq.gz \\
${prefix}_2.fastq.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
trimgalore: \$(echo \$(trim_galore --version 2>&1) | sed 's/^.*version //; s/Last.*\$//')
cutadapt: \$(cutadapt --version)
pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' )
END_VERSIONS
"""
}

Expand All @@ -96,12 +84,5 @@ process TRIMGALORE {
}
"""
${output_command}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
trimgalore: \$(echo \$(trim_galore --version 2>&1) | sed 's/^.*version //; s/Last.*\$//')
cutadapt: \$(cutadapt --version)
pigz: \$( pigz --version 2>&1 | sed 's/pigz //g' )
END_VERSIONS
"""
}
107 changes: 34 additions & 73 deletions modules/nf-core/trimgalore/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,85 +16,46 @@ tools:
licence: ["GPL-3.0-or-later"]
identifier: ""
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- reads:
type: file
description: |
List of input FastQ files of size 1 and 2 for single-end and paired-end data,
respectively.
ontologies: []
- reads:
type: array
description: List of input FastQ files of size 1 and 2 for single-end and paired-end data, respectively.
ontologies: []
output:
reads:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- "*{3prime,5prime,trimmed,val}{,_1,_2}.fq.gz":
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
pattern: "*{3prime,5prime,trimmed,val}{,_1,_2}.fq.gz"
type: array # Matches the tuple val(meta), path(...) in main.nf
description: Trimmed FastQ file(s).
pattern: "*{3prime,5prime,trimmed,val}{,_1,_2}.fq.gz"
log:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- "*report.txt":
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
pattern: "*_{report.txt}"
type: file
description: Log file generated by Trim Galore!.
pattern: "*report.txt"
unpaired:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- "*unpaired{,_1,_2}.fq.gz":
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
pattern: "*unpaired*.fq.gz"
type: file
description: Unpaired FastQ file(s) generated when processing paired-end data.
pattern: "*unpaired*.fq.gz"
html:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- "*.html":
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
pattern: "*_{fastqc.html}"
type: file
description: FastQC report HTML file generated by Trim Galore!.
pattern: "*.html"
zip:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- "*.zip":
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
pattern: "*_{fastqc.zip}"
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
type: array
# Explicitly declare that the items in the array are Files
items:
type: File
description: FastQC report ZIP file generated by Trim Galore!.
pattern: "*.zip"
versions_trim_galore:
type: array # Matches the tuple [task.process, 'trim_galore', version]
description: Trim Galore! version information.
pattern: "*"
versions_cutadapt:
type: array
description: Cutadapt version information (Trim Galore! dependency).
pattern: "*"
versions_pigz:
type: array
description: pigz version information (used for parallel compression/decompression).
pattern: "*"
authors:
- "@drpatelh"
- "@ewels"
Expand Down
11 changes: 5 additions & 6 deletions modules/nf-core/trimgalore/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ nextflow_process {
{ assert path(process.out.log.get(0).get(1)).getText().contains(report1_line) }
}
},
{ assert snapshot(path(process.out.versions.get(0)).yaml).match() },
{ assert snapshot(process.out.versions_trim_galore).match() },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{ assert snapshot(process.out.versions_trim_galore).match() },
{ assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match() },

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also do this for the other tests? This way you test all versions outputs

)
}
}
Expand All @@ -62,8 +62,7 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out,
path(process.out.versions.get(0)).yaml
process.out
).match() },
)
}
Expand Down Expand Up @@ -121,7 +120,7 @@ nextflow_process {
{ assert path(process.out.log.get(0).get(1).get(1)).getText().contains(report2_line) }
}
},
{ assert snapshot(path(process.out.versions.get(0)).yaml).match() },
{ assert snapshot(process.out.versions_trim_galore).match() },
)
}
}
Expand Down Expand Up @@ -152,7 +151,7 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(
path(process.out.versions.get(0)).yaml,
process.out.versions_trim_galore,
process.out.reads,
process.out.unpaired
).match() },
Expand Down Expand Up @@ -181,7 +180,7 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() },
{ assert snapshot(path(process.out.versions.get(0)).yaml).match("versions") },
{ assert snapshot(process.out.versions_trim_galore).match("versions") }
)
}
}
Expand Down
Loading
Loading