Skip to content
Open
Show file tree
Hide file tree
Changes from 6 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
4 changes: 2 additions & 2 deletions modules/nf-core/umitools/group/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ channels:
- bioconda
dependencies:
# renovate: datasource=conda depName=bioconda/umi_tools
- bioconda::pysam=0.22.0
- bioconda::umi_tools=1.1.6
- conda-forge::future=0.18.3
- conda-forge::matplotlib=3.8.2
- conda-forge::numpy=1.26.4
- conda-forge::pandas=2.2.0
- conda-forge::pybktree=1.1
- conda-forge::python=3.9.18
- conda-forge::regex=2023.12.25
- conda-forge::scipy=1.12.0
- conda-forge::pybktree=1.1
- bioconda::pysam=0.22.0
12 changes: 1 addition & 11 deletions modules/nf-core/umitools/group/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ process UMITOOLS_GROUP {
tuple val(meta), path("*.log") , emit: log
tuple val(meta), path("${prefix}.bam"), optional: true, emit: bam
tuple val(meta), path("*.tsv") , optional: true, emit: tsv
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('umitools'), eval("umi_tools --version | sed 's/UMI-tools version: //'"), emit: versions_umitools, topic: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -40,11 +40,6 @@ process UMITOOLS_GROUP {
$group_info \\
$paired \\
$args

cat <<-END_VERSIONS > versions.yml
"${task.process}":
umitools: \$( umi_tools --version | sed '/version:/!d; s/.*: //' )
END_VERSIONS
"""

stub:
Expand All @@ -54,10 +49,5 @@ process UMITOOLS_GROUP {
touch ${prefix}.log
touch ${prefix}.tsv
$output_bam

cat <<-END_VERSIONS > versions.yml
"${task.process}":
umitools: \$( umi_tools --version | sed '/version:/!d; s/.*: //' )
END_VERSIONS
"""
}
36 changes: 25 additions & 11 deletions modules/nf-core/umitools/group/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ tools:
description: >
UMI-tools contains tools for dealing with Unique Molecular Identifiers (UMIs)/Random
Molecular Tags (RMTs) and single cell RNA-Seq cell barcodes

documentation: https://umi-tools.readthedocs.io/en/latest/
license: ["MIT"]
license:
- "MIT"
identifier: ""
input:
- - meta:
Expand Down Expand Up @@ -72,18 +72,32 @@ output:
e.g. [ id:'test', single_end:false ]
- "*.tsv":
type: file
description: Flatfile describing the read groups, see docs for complete info
of all columns
description: Flatfile describing the read groups, see docs for complete
info of all columns
pattern: "*.{tsv}"
ontologies:
- edam: http://edamontology.org/format_3475 # TSV
- edam: http://edamontology.org/format_3475
Comment thread
SPPearce marked this conversation as resolved.
versions_umitools:
- - ${task.process}:
type: string
description: The name of the process
- umitools:
type: string
description: The name of the tool
- "umi_tools --version | sed 's/UMI-tools version: //'":
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
- umitools:
type: string
description: The name of the tool
- "umi_tools --version | sed 's/UMI-tools version: //'":
type: eval
description: The expression to obtain the version of the tool
authors:
- "@Joon-Klaps"
maintainers:
Expand Down
12 changes: 5 additions & 7 deletions modules/nf-core/umitools/group/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,9 @@ nextflow_process {
{ assert process.success },
{ assert snapshot(
bam(process.out.bam[0][1]).getReadsMD5(),
process.out.tsv,
file(process.out.log[0][1]).readLines()[0..1],
process.out.versions
).match() }
sanitizeOutput(process.out, unstableKeys: ["log", "bam"])
).match() }
)
}

Expand All @@ -113,7 +112,7 @@ nextflow_process {
{ assert snapshot(
bam(process.out.bam[0][1]).getReadsMD5(),
file(process.out.log[0][1]).readLines()[0..1],
process.out.versions
sanitizeOutput(process.out, unstableKeys: ["log", "bam"])
).match() }
)
}
Expand All @@ -136,10 +135,9 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.tsv,
bam(process.out.bam[0][1]).getReadsMD5(),
file(process.out.log[0][1]).readLines()[0..1],
process.out.versions
sanitizeOutput(process.out, unstableKeys: ["log", "bam"])
).match() }
)
}
Expand All @@ -161,7 +159,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}

Expand Down
173 changes: 110 additions & 63 deletions modules/nf-core/umitools/group/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,46 @@
"# UMI-tools version: 1.1.6",
"# output generated by group -I test.bam --output-bam -S test_grouped.bam -L test_grouped.log --paired --random-seed=100"
],
[
"versions.yml:md5,f0c472387195b669228e3b390f8a93bf"
]
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.6"
},
"timestamp": "2025-09-11T09:44:43.467038"
},
"with_umi - stub": {
"content": [
{
"0": [
"bam": [
[
{
"id": "test",
"single_end": false
},
"test_grouped.log:md5,d41d8cd98f00b204e9800998ecf8427e"
"test_grouped.bam"
]
],
"1": [
"log": [
[
{
"id": "test",
"single_end": false
},
"test_grouped.bam:md5,d41d8cd98f00b204e9800998ecf8427e"
"test_grouped.log"
]
],
"2": [
"tsv": [

],
"versions_umitools": [
[
{
"id": "test",
"single_end": false
},
"test_grouped.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
"UMITOOLS_GROUP",
"umitools",
"1.1.6"
]
],
"3": [
"versions.yml:md5,f0c472387195b669228e3b390f8a93bf"
],
]
}
],
"timestamp": "2026-06-18T06:15:31.228922956",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.0"
}
},
"with_umi - stub": {
"content": [
{
"bam": [
[
{
Expand Down Expand Up @@ -76,66 +73,116 @@
"test_grouped.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,f0c472387195b669228e3b390f8a93bf"
"versions_umitools": [
[
"UMITOOLS_GROUP",
"umitools",
"1.1.6"
]
]
}
],
"timestamp": "2026-06-18T06:15:56.340264366",
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.6"
},
"timestamp": "2025-09-11T09:45:15.641582"
"nf-test": "0.9.5",
"nextflow": "26.04.0"
}
},
"no_umi": {
"content": [
"b01829d27fad55e707745f86311b443e",
[
[
{
"id": "test"
},
"test_grouped.tsv:md5,1a3ccdc00df59fa89c79ad482980a003"
]
],
[
"# UMI-tools version: 1.1.6",
"# output generated by group -I test.paired_end.sorted.bam --output-bam -S test_grouped.bam -L test_grouped.log --group-out test_grouped.tsv --paired --random-seed=100"
],
[
"versions.yml:md5,f0c472387195b669228e3b390f8a93bf"
]
{
"bam": [
[
{
"id": "test"
},
"test_grouped.bam"
]
],
"log": [
[
{
"id": "test"
},
"test_grouped.log"
]
],
"tsv": [
[
{
"id": "test"
},
"test_grouped.tsv:md5,1a3ccdc00df59fa89c79ad482980a003"
]
],
"versions_umitools": [
[
"UMITOOLS_GROUP",
"umitools",
"1.1.6"
]
]
}
],
"timestamp": "2026-06-18T06:15:17.067893237",
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.6"
},
"timestamp": "2025-09-11T09:44:24.962708"
"nf-test": "0.9.5",
"nextflow": "26.04.0"
}
},
"with_umi - create bam and tsv": {
"content": [
[
[
{
"id": "test",
"single_end": false
},
"test_grouped.tsv:md5,d652eb6570057e9e709e8cac5f43d00c"
]
],
"72da540b9a840cf39e3567cc35045143",
[
"# UMI-tools version: 1.1.6",
"# output generated by group -I test.bam --output-bam -S test_grouped.bam -L test_grouped.log --group-out test_grouped.tsv --paired --random-seed=100"
],
[
"versions.yml:md5,f0c472387195b669228e3b390f8a93bf"
]
{
"bam": [
[
{
"id": "test",
"single_end": false
},
"test_grouped.bam"
]
],
"log": [
[
{
"id": "test",
"single_end": false
},
"test_grouped.log"
]
],
"tsv": [
[
{
"id": "test",
"single_end": false
},
"test_grouped.tsv:md5,d652eb6570057e9e709e8cac5f43d00c"
]
],
"versions_umitools": [
[
"UMITOOLS_GROUP",
"umitools",
"1.1.6"
]
]
}
],
"timestamp": "2026-06-18T07:17:11.659317297",
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.6"
},
"timestamp": "2025-09-11T09:45:01.696782"
"nf-test": "0.9.5",
"nextflow": "26.04.0"
}
}
}
Loading