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
12 changes: 1 addition & 11 deletions modules/nf-core/samtools/mpileup/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ process SAMTOOLS_MPILEUP {

output:
tuple val(meta), path("*.mpileup.gz"), emit: mpileup
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('samtools'), eval('samtools --version | head -1 | sed -e "s/samtools //"'), emit: versions_samtools, topic: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -31,21 +31,11 @@ process SAMTOOLS_MPILEUP {
$intervals_cmd \\
$input
bgzip ${prefix}.mpileup

cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
echo | gzip > ${prefix}.mpileup.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
}
29 changes: 22 additions & 7 deletions modules/nf-core/samtools/mpileup/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,31 @@ output:
description: mpileup file
pattern: "*.{mpileup}"
ontologies: []
versions_samtools:
- - ${task.process}:
type: string
description: Name of the process
- samtools:
type: string
description: Name of the tool
- samtools --version | head -1 | sed -e "s/samtools //":
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: Name of the process
- samtools:
type: string
description: Name of the tool
- samtools --version | head -1 | sed -e "s/samtools //":
type: eval
description: The expression to obtain the version of the tool

authors:
- "@drpatelh"
- "@joseespinosa"
maintainers:
- "@drpatelh"
- "@joseespinosa"
15 changes: 3 additions & 12 deletions modules/nf-core/samtools/mpileup/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ nextflow_process {
then {
assert process.success
assertAll(
{ assert snapshot(
process.out,
path(process.out.versions[0]).yaml
).match() }
{ assert snapshot(process.out).match()}
)
}
}
Expand All @@ -56,10 +53,7 @@ nextflow_process {
then {
assert process.success
assertAll(
{ assert snapshot(
process.out,
path(process.out.versions[0]).yaml
).match() }
{ assert snapshot(process.out).match()}
)
}
}
Expand All @@ -82,10 +76,7 @@ nextflow_process {
then {
assert process.success
assertAll(
{ assert snapshot(
process.out,
path(process.out.versions[0]).yaml
).match() }
{ assert snapshot(process.out).match()}
)
}
}
Expand Down
75 changes: 42 additions & 33 deletions modules/nf-core/samtools/mpileup/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
]
],
"1": [
"versions.yml:md5,e5a70b6d7e2c2ff0c2c63b66b7adb281"
[
"SAMTOOLS_MPILEUP",
"samtools",
"1.22.1"
]
],
"mpileup": [
[
Expand All @@ -21,21 +25,20 @@
"test.mpileup.gz:md5,72340047c1feda82fa632d1762080bd8"
]
],
"versions": [
"versions.yml:md5,e5a70b6d7e2c2ff0c2c63b66b7adb281"
"versions_samtools": [
[
"SAMTOOLS_MPILEUP",
"samtools",
"1.22.1"
]
]
},
{
"SAMTOOLS_MPILEUP": {
"samtools": "1.22.1"
}
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.6"
"nf-test": "0.9.3",
"nextflow": "25.10.2"
},
"timestamp": "2025-09-10T14:39:24.687853"
"timestamp": "2025-12-22T08:56:18.583305677"
},
"bam_bed --stub": {
"content": [
Expand All @@ -49,7 +52,11 @@
]
],
"1": [
"versions.yml:md5,e5a70b6d7e2c2ff0c2c63b66b7adb281"
[
"SAMTOOLS_MPILEUP",
"samtools",
"1.22.1"
]
],
"mpileup": [
[
Expand All @@ -59,21 +66,20 @@
"test.mpileup.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"versions": [
"versions.yml:md5,e5a70b6d7e2c2ff0c2c63b66b7adb281"
"versions_samtools": [
[
"SAMTOOLS_MPILEUP",
"samtools",
"1.22.1"
]
]
},
{
"SAMTOOLS_MPILEUP": {
"samtools": "1.22.1"
}
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.6"
"nf-test": "0.9.3",
"nextflow": "25.10.2"
},
"timestamp": "2025-09-10T14:39:35.387828"
"timestamp": "2025-12-22T08:54:55.388446375"
},
"bam_bed_fasta": {
"content": [
Expand All @@ -87,7 +93,11 @@
]
],
"1": [
"versions.yml:md5,e5a70b6d7e2c2ff0c2c63b66b7adb281"
[
"SAMTOOLS_MPILEUP",
"samtools",
"1.22.1"
]
],
"mpileup": [
[
Expand All @@ -97,20 +107,19 @@
"test.mpileup.gz:md5,958e6bead4103d72026f80153b6b5150"
]
],
"versions": [
"versions.yml:md5,e5a70b6d7e2c2ff0c2c63b66b7adb281"
"versions_samtools": [
[
"SAMTOOLS_MPILEUP",
"samtools",
"1.22.1"
]
]
},
{
"SAMTOOLS_MPILEUP": {
"samtools": "1.22.1"
}
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.6"
"nf-test": "0.9.3",
"nextflow": "25.10.2"
},
"timestamp": "2025-09-10T14:39:29.744452"
"timestamp": "2025-12-22T08:56:25.883836102"
}
}
Loading