Skip to content
Closed
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
34 changes: 12 additions & 22 deletions modules/nf-core/mirtrace/qc/main.nf
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
process MIRTRACE_QC {
tag "$meta.id"
tag "${meta.id}"
label 'process_medium'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/mirtrace:1.0.1--0':
'quay.io/biocontainers/mirtrace:1.0.1--0' }"
container "${workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container
? 'https://depot.galaxyproject.org/singularity/mirtrace:1.0.1--0'
: 'quay.io/biocontainers/mirtrace:1.0.1--0'}"

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

output:
tuple val(meta), path ("*.html") , emit: html
tuple val(meta), path ("*.json") , emit: json
tuple val(meta), path ("*.tsv") , emit: tsv
tuple val(meta), path ("qc_passed_reads.all.collapsed/*.{fa,fasta}") , emit: all_fa
tuple val(meta), path ("qc_passed_reads.rnatype_unknown.collapsed/*.{fa,fasta}") , emit: rnatype_unknown_fa
path "versions.yml" , emit: versions
tuple val(meta), path("*.html"), emit: html
tuple val(meta), path("*.json"), emit: json
tuple val(meta), path("*.tsv"), emit: tsv
tuple val(meta), path("qc_passed_reads.all.collapsed/*.{fa,fasta}"), emit: all_fa
tuple val(meta), path("qc_passed_reads.rnatype_unknown.collapsed/*.{fa,fasta}"), emit: rnatype_unknown_fa
tuple val("${task.process}"), val('mirtrace'), eval('mirtrace -v'), emit: versions_mirtrace, topic: versions

when:
task.ext.when == null || task.ext.when

script:
def mirtrace_mode = mirtrace_config ? "--config ${mirtrace_config}": "${reads}"
def mirtrace_mode = mirtrace_config ? "--config ${mirtrace_config}" : "${reads}"

"""
mirtrace qc \\
Expand All @@ -32,11 +32,6 @@ process MIRTRACE_QC {
--output-dir . \\
--force \\
${mirtrace_mode}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
mirtrace: \$(echo \$(mirtrace -v))
END_VERSIONS
"""

stub:
Expand All @@ -52,10 +47,5 @@ process MIRTRACE_QC {

touch qc_passed_reads.all.collapsed/${prefix}.fa
touch qc_passed_reads.rnatype_unknown.collapsed/${prefix}.fa

cat <<-END_VERSIONS > versions.yml
"${task.process}":
mirtrace: \$(echo \$(mirtrace -v))
END_VERSIONS
"""
}
55 changes: 34 additions & 21 deletions modules/nf-core/mirtrace/qc/meta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "mirtrace_qc"
description: "A tool for quality control and tracing taxonomic origins of microRNA
sequencing data"
Expand All @@ -23,9 +22,9 @@ tools:
documentation: "https://github.com/friedlanderlab/mirtrace/blob/master/release-bundle-includes/doc/manual/mirtrace_manual.pdf"
tool_dev_url: "https://github.com/friedlanderlab/mirtrace/tree/master"
doi: "10.1186/s13059-018-1588-9"
licence: ["GPL v2"]
licence:
- "GPL v2"
identifier: biotools:miRTrace

input:
- - meta:
type: map
Expand All @@ -37,17 +36,17 @@ input:
description: microRNA sequencing data
pattern: "*.{fastq,fastq.gz}"
ontologies:
- edam: http://edamontology.org/format_1930 # FASTQ
- edam: http://edamontology.org/format_1930
- mirtrace_config:
type: file
description: (Optional) CSV with list of FASTQ files to process with one entry
per row. No headers. Each row consists of the following columns "FASTQ file
path, id, adapter, PHRED-ASCII-offset".
description: (Optional) CSV with list of FASTQ files to process with one
entry per row. No headers. Each row consists of the following columns
"FASTQ file path, id, adapter, PHRED-ASCII-offset".
ontologies: []
- mirtrace_species:
type: string
description: Target species in microRNA sequencing data (miRbase encoding, e.g.
“hsa” for Homo sapiens)
description: Target species in microRNA sequencing data (miRbase encoding,
e.g. “hsa” for Homo sapiens)
output:
html:
- - meta:
Expand All @@ -71,7 +70,7 @@ output:
description: JSON file
pattern: "*.{json}"
ontologies:
- edam: http://edamontology.org/format_3464 # JSON
- edam: http://edamontology.org/format_3464
tsv:
- - meta:
type: map
Expand All @@ -83,7 +82,7 @@ output:
description: TSV file
pattern: "*.{tsv}"
ontologies:
- edam: http://edamontology.org/format_3475 # TSV
- edam: http://edamontology.org/format_3475
all_fa:
- - meta:
type: map
Expand All @@ -92,8 +91,8 @@ output:
e.g. `[ id:'sample1', single_end:false ]`
- qc_passed_reads.all.collapsed/*.{fa,fasta}:
type: file
description: QC-passed reads in FASTA file. Identical reads are collapsed.
Entries are sorted by abundance.
description: QC-passed reads in FASTA file. Identical reads are
collapsed. Entries are sorted by abundance.
pattern: "*.{fa,fasta}"
ontologies: []
rnatype_unknown_fa:
Expand All @@ -104,17 +103,31 @@ output:
e.g. `[ id:'sample1', single_end:false ]`
- qc_passed_reads.rnatype_unknown.collapsed/*.{fa,fasta}:
type: file
description: Unknown RNA type QC-passed reads in FASTA file. Identical reads
are collapsed. Entries are sorted by abundance.
description: Unknown RNA type QC-passed reads in FASTA file. Identical
reads are collapsed. Entries are sorted by abundance.
pattern: "*.{fa,fasta}"
ontologies: []
versions_mirtrace:
- - ${task.process}:
type: string
description: The name of the process
- mirtrace:
type: string
description: The name of the tool
- mirtrace -v:
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
- mirtrace:
type: string
description: The name of the tool
- mirtrace -v:
type: eval
description: The expression to obtain the version of the tool
authors:
- "@atrigila"
maintainers:
Expand Down
5 changes: 4 additions & 1 deletion modules/nf-core/mirtrace/qc/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ nextflow_process {
{ assert snapshot(process.out.all_fa).match("all_fa") },

// Check versions
{ assert snapshot(process.out.versions).match("versions") }
{ assert snapshot(process.out.findAll { key, val -> key.startsWith('versions') }).match("versions") },

)
}
Expand Down Expand Up @@ -121,6 +121,9 @@ nextflow_process {
{ assert snapshot(process.out.rnatype_unknown_fa).match("rnatype_unknown_fa_config") },
{ assert snapshot(process.out.all_fa).match("all_fa_config") },

// Check versions
{ assert snapshot(process.out.findAll { key, val -> key.startsWith('versions') }).match("versions_config") },

)
}

Expand Down
94 changes: 63 additions & 31 deletions modules/nf-core/mirtrace/qc/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
]
]
],
"timestamp": "2024-09-10T18:35:10.022991825",
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-10T18:35:10.022991825"
}
},
"all_fa": {
"content": [
Expand All @@ -28,23 +28,11 @@
]
]
],
"timestamp": "2024-09-10T18:33:02.971744888",
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-10T18:33:02.971744888"
},
"versions": {
"content": [
[
"versions.yml:md5,b50529beb497fc9882232140b636d9ce"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-02T14:00:50.712738593"
}
},
"tsv_config": {
"content": [
Expand All @@ -65,11 +53,29 @@
]
]
],
"timestamp": "2024-09-10T18:35:09.99291948",
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-10T18:35:09.99291948"
}
},
"versions": {
"content": [
{
"versions_mirtrace": [
[
"MIRTRACE_QC",
"mirtrace",
"1.0.1"
]
]
}
],
"timestamp": "2026-06-26T17:01:42.471329",
"meta": {
"nf-test": "0.9.4",
"nextflow": "26.04.1"
}
},
"tsv": {
"content": [
Expand All @@ -91,11 +97,11 @@
]
]
],
"timestamp": "2024-09-10T18:33:02.856967195",
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-10T18:33:02.856967195"
}
},
"rnatype_unknown_fa_config": {
"content": [
Expand All @@ -108,11 +114,29 @@
]
]
],
"timestamp": "2024-09-10T18:35:10.010723637",
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-10T18:35:10.010723637"
}
},
"versions_config": {
"content": [
{
"versions_mirtrace": [
[
"MIRTRACE_QC",
"mirtrace",
"1.0.1"
]
]
}
],
"timestamp": "2026-06-26T17:03:42.424407",
"meta": {
"nf-test": "0.9.4",
"nextflow": "26.04.1"
}
},
"human - fastq - stub": {
"content": [
Expand Down Expand Up @@ -163,7 +187,11 @@
]
],
"5": [
"versions.yml:md5,b50529beb497fc9882232140b636d9ce"
[
"MIRTRACE_QC",
"mirtrace",
"1.0.1"
]
],
"all_fa": [
[
Expand Down Expand Up @@ -210,16 +238,20 @@
"test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,b50529beb497fc9882232140b636d9ce"
"versions_mirtrace": [
[
"MIRTRACE_QC",
"mirtrace",
"1.0.1"
]
]
}
],
"timestamp": "2026-06-26T16:40:20.531125",
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-02T13:43:42.209949119"
"nf-test": "0.9.4",
"nextflow": "26.04.1"
}
},
"rnatype_unknown_fa": {
"content": [
Expand All @@ -233,10 +265,10 @@
]
]
],
"timestamp": "2024-09-10T18:33:02.917439516",
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-10T18:33:02.917439516"
}
}
}
Loading