Skip to content
Merged
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
2 changes: 0 additions & 2 deletions modules/nf-core/trimgalore/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::cutadapt=4.9
- bioconda::trim-galore=0.6.10
- conda-forge::pigz=2.8
37 changes: 8 additions & 29 deletions modules/nf-core/trimgalore/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ process TRIMGALORE {
label 'process_high'

conda "${moduleDir}/environment.yml"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/9b/9becad054093ad4083a961d12733f2a742e11728fe9aa815d678b882b3ede520/data'
: 'community.wave.seqera.io/library/cutadapt_trim-galore_pigz:a98edd405b34582d'}"
container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/trim-galore:0.6.10--hdfd78af_2' :
'biocontainers/trim-galore:0.6.10--hdfd78af_2'}"

input:
tuple val(meta), path(reads)

output:
tuple val(meta), path("*{3prime,5prime,trimmed,val}{,_1,_2}.fq.gz"), emit: reads
tuple val(meta), path("*report.txt") , emit: log, optional: true
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(meta), path("*report.txt") , emit: log , optional: true
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
tuple val("${task.process}"), val("trimgalore"), eval('trim_galore --version | grep -Eo "[0-9]+(\\.[0-9]+)+"'), topic: versions, emit: versions_trimgalore

when:
task.ext.when == null || task.ext.when
Expand Down Expand Up @@ -52,13 +52,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 +65,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 +82,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
"""
}
90 changes: 57 additions & 33 deletions modules/nf-core/trimgalore/meta.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: trimgalore
description: Trim FastQ files using Trim Galore!
description: |
A wrapper around Cutadapt and FastQC to consistently apply adapter and quality trimming to FastQ files,
with extra functionality for RRBS data
keywords:
- trimming
- adapters
- sequencing adapters
- sequencing
- fastq
tools:
- trimgalore:
Expand All @@ -14,7 +16,8 @@ tools:
homepage: https://www.bioinformatics.babraham.ac.uk/projects/trim_galore/
documentation: https://github.com/FelixKrueger/TrimGalore/blob/master/Docs/Trim_Galore_User_Guide.md
licence: ["GPL-3.0-or-later"]
identifier: ""
identifier: biotools:trim_galore

input:
- - meta:
type: map
Expand All @@ -26,7 +29,8 @@ input:
description: |
List of input FastQ files of size 1 and 2 for single-end and paired-end data,
respectively.
ontologies: []
ontologies:
- edam: "http://edamontology.org/format_1930" # FASTQ
output:
reads:
- - meta:
Expand All @@ -35,66 +39,85 @@ output:
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 ]
type: file
description: The trimmed/modified fastq reads
pattern: "*{3prime,5prime,trimmed,val}{,_1,_2}.fq.gz"
ontologies:
- edam: "http://edamontology.org/format_1930" # FASTQ
- edam: http://edamontology.org/format_3989 # GZIP format
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: trimgalore log file
pattern: "*report.txt"
ontologies:
- edam: "http://edamontology.org/format_2330" # Textual format
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 ]
type: file
description: unpaired reads when --retain_unpaired flag is used
pattern: "*unpaired*.fq.gz"
ontologies:
- edam: "http://edamontology.org/format_1930" # FASTQ
- edam: http://edamontology.org/format_3989 # GZIP format
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 HTML report after trimming when the --fastqc flag is used
pattern: "*_fastqc.html"
ontologies:
- edam: "http://edamontology.org/format_2331" # 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}"
type: file
description: FastQC report output zip after trimming when the --fastqc flag
is used
pattern: "*_fastqc.zip"
ontologies:
- edam: http://edamontology.org/format_3987 # ZIP format
versions_trimgalore:
- - ${task.process}:
type: string
description: The name of the process
- trimgalore:
type: string
description: The name of the tool
- trim_galore --version | grep -Eo "[0-9]+(\.[0-9]+)+":
type: eval
description: The expression to obtain the version of the tool

topics:
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: http://edamontology.org/format_3750 # YAML
- - ${task.process}:
type: string
description: The name of the process
- trimgalore:
type: string
description: The name of the tool
- trim_galore --version | grep -Eo "[0-9]+(\.[0-9]+)+":
type: eval
description: The expression to obtain the version of the tool

authors:
- "@drpatelh"
- "@ewels"
Expand All @@ -103,3 +126,4 @@ maintainers:
- "@drpatelh"
- "@ewels"
- "@FelixKrueger"
- "@vagkaratzas"
Loading
Loading