Skip to content

Commit 83a5266

Browse files
topics bismark/align (#9272)
* topics bismark/align * fix versions command --------- Co-authored-by: Marcel Ribeiro-Dantas <[email protected]>
1 parent 0c47e41 commit 83a5266

File tree

6 files changed

+96
-101
lines changed

6 files changed

+96
-101
lines changed

modules/nf-core/bismark/align/main.nf

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ process BISMARK_ALIGN {
1616
tuple val(meta), path("*bam") , emit: bam
1717
tuple val(meta), path("*report.txt"), emit: report
1818
tuple val(meta), path("*fq.gz") , emit: unmapped, optional: true
19-
path "versions.yml" , emit: versions
19+
tuple val("${task.process}"), val("bismark"), eval('bismark --version | grep Version | sed -e "s/Bismark Version: v//" | xargs'), topic: versions, emit: versions_bismark
2020

2121
when:
2222
task.ext.when == null || task.ext.when
@@ -61,11 +61,6 @@ process BISMARK_ALIGN {
6161
--genome ${index} \\
6262
--bam \\
6363
${args}
64-
65-
cat <<-END_VERSIONS > versions.yml
66-
"${task.process}":
67-
bismark: \$(echo \$(bismark -v 2>&1) | sed 's/^.*Bismark Version: v//; s/Copyright.*\$//')
68-
END_VERSIONS
6964
"""
7065

7166
stub:
@@ -74,10 +69,5 @@ process BISMARK_ALIGN {
7469
"""
7570
touch ${prefix}.bam
7671
touch ${prefix}.report.txt
77-
78-
cat <<-END_VERSIONS > versions.yml
79-
"${task.process}":
80-
bismark: \$(echo \$(bismark -v 2>&1) | sed 's/^.*Bismark Version: v//; s/Copyright.*\$//')
81-
END_VERSIONS
8272
"""
8373
}

modules/nf-core/bismark/align/meta.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,27 @@ output:
8585
description: Output FastQ file(s) containing unmapped reads
8686
pattern: "*.{fq.gz}"
8787
ontologies: []
88-
versions:
89-
- versions.yml:
90-
type: file
91-
description: File containing software versions
92-
pattern: "versions.yml"
93-
ontologies:
94-
- edam: http://edamontology.org/format_3750 # YAML
88+
versions_bismark:
89+
- - ${task.process}:
90+
type: string
91+
description: The process the versions were collected from
92+
- bismark:
93+
type: string
94+
description: The tool name
95+
- 'bismark --version | grep Version | sed -e "s/Bismark Version: v//" | xargs':
96+
type: string
97+
description: The version of the tool
98+
topics:
99+
- versions:
100+
- - process:
101+
type: string
102+
description: The process the versions were collected from
103+
- tool:
104+
type: string
105+
description: The tool name
106+
- version:
107+
type: string
108+
description: The version of the tool
95109
authors:
96110
- "@phue"
97111
maintainers:

modules/nf-core/bismark/align/tests/main.nf.test

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ nextflow_process {
5353
bam(process.out.bam[0][1]).getReadsMD5(),
5454
file(process.out.report[0][1]).readLines().contains("Number of alignments with a unique best hit from the different alignments:\t5009"),
5555
process.out.unmapped,
56-
process.out.versions,
57-
path(process.out.versions[0]).yaml
56+
process.out.findAll { key, val -> key.startsWith('versions') },
5857
).match()
5958
}
6059
)
@@ -92,8 +91,7 @@ nextflow_process {
9291
bam(process.out.bam[0][1]).getReadsMD5(),
9392
file(process.out.report[0][1]).readLines().contains("Number of alignments with a unique best hit from the different alignments:\t5009"),
9493
process.out.unmapped,
95-
process.out.versions,
96-
path(process.out.versions[0]).yaml
94+
process.out.findAll { key, val -> key.startsWith('versions') },
9795
).match()
9896
}
9997
)
@@ -128,8 +126,7 @@ nextflow_process {
128126
bam(process.out.bam[0][1]).getReadsMD5(),
129127
file(process.out.report[0][1]).readLines().contains("Number of alignments with a unique best hit from the different alignments:\t5009"),
130128
process.out.unmapped,
131-
process.out.versions,
132-
path(process.out.versions[0]).yaml
129+
process.out.findAll { key, val -> key.startsWith('versions') },
133130
).match()
134131
}
135132
)
@@ -167,8 +164,7 @@ nextflow_process {
167164
bam(process.out.bam[0][1]).getReadsMD5(),
168165
file(process.out.report[0][1]).readLines().contains("Number of alignments with a unique best hit from the different alignments:\t5009"),
169166
process.out.unmapped,
170-
process.out.versions,
171-
path(process.out.versions[0]).yaml
167+
process.out.findAll { key, val -> key.startsWith('versions') },
172168
).match()
173169
}
174170
)
@@ -203,8 +199,7 @@ nextflow_process {
203199
bam(process.out.bam[0][1]).getReadsMD5(),
204200
file(process.out.report[0][1]).readLines().contains("Number of alignments with a unique best hit from the different alignments:\t5047"),
205201
process.out.unmapped,
206-
process.out.versions,
207-
path(process.out.versions[0]).yaml
202+
process.out.findAll { key, val -> key.startsWith('versions') },
208203
).match()
209204
}
210205
)

modules/nf-core/bismark/align/tests/main.nf.test.snap

Lines changed: 45 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,108 +5,113 @@
55
true,
66
[
77

8-
],
9-
[
10-
"versions.yml:md5,72777174718c419301be78c0840f1931"
118
],
129
{
13-
"BISMARK_ALIGN": {
14-
"bismark": "0.25.1"
15-
}
10+
"versions_bismark": [
11+
[
12+
"BISMARK_ALIGN",
13+
"bismark",
14+
"0.25.1"
15+
]
16+
]
1617
}
1718
],
1819
"meta": {
1920
"nf-test": "0.9.2",
20-
"nextflow": "25.04.6"
21+
"nextflow": "25.10.0"
2122
},
22-
"timestamp": "2025-09-26T12:09:08.59445088"
23+
"timestamp": "2025-10-28T15:31:46.994204006"
2324
},
2425
"hisat2 | paired-end | sarscov2 genome [fasta]": {
2526
"content": [
2627
"fb9d284aec4b2c727af3c5ffd77c6381",
2728
false,
2829
[
2930

30-
],
31-
[
32-
"versions.yml:md5,72777174718c419301be78c0840f1931"
3331
],
3432
{
35-
"BISMARK_ALIGN": {
36-
"bismark": "0.25.1"
37-
}
33+
"versions_bismark": [
34+
[
35+
"BISMARK_ALIGN",
36+
"bismark",
37+
"0.25.1"
38+
]
39+
]
3840
}
3941
],
4042
"meta": {
4143
"nf-test": "0.9.2",
42-
"nextflow": "25.04.6"
44+
"nextflow": "25.10.0"
4345
},
44-
"timestamp": "2025-09-26T12:08:47.207193467"
46+
"timestamp": "2025-10-28T15:31:21.888003798"
4547
},
4648
"bowtie2 | paired-end | sarscov2 genome [fasta]": {
4749
"content": [
4850
"458c5350c3f96a8dde710985bfb62827",
4951
false,
5052
[
5153

52-
],
53-
[
54-
"versions.yml:md5,72777174718c419301be78c0840f1931"
5554
],
5655
{
57-
"BISMARK_ALIGN": {
58-
"bismark": "0.25.1"
59-
}
56+
"versions_bismark": [
57+
[
58+
"BISMARK_ALIGN",
59+
"bismark",
60+
"0.25.1"
61+
]
62+
]
6063
}
6164
],
6265
"meta": {
6366
"nf-test": "0.9.2",
64-
"nextflow": "25.04.6"
67+
"nextflow": "25.10.0"
6568
},
66-
"timestamp": "2025-09-26T12:08:02.040747075"
69+
"timestamp": "2025-10-28T15:30:37.313541027"
6770
},
6871
"bowtie2 | single-end | sarscov2 genome [fasta]": {
6972
"content": [
7073
"936c0d5ce713130113e99e09a5b53afd",
7174
true,
7275
[
7376

74-
],
75-
[
76-
"versions.yml:md5,72777174718c419301be78c0840f1931"
7777
],
7878
{
79-
"BISMARK_ALIGN": {
80-
"bismark": "0.25.1"
81-
}
79+
"versions_bismark": [
80+
[
81+
"BISMARK_ALIGN",
82+
"bismark",
83+
"0.25.1"
84+
]
85+
]
8286
}
8387
],
8488
"meta": {
8589
"nf-test": "0.9.2",
86-
"nextflow": "25.04.6"
90+
"nextflow": "25.10.0"
8791
},
88-
"timestamp": "2025-09-26T12:07:37.985126432"
92+
"timestamp": "2025-10-28T15:30:15.340678938"
8993
},
9094
"hisat2 | single-end | sarscov2 genome [fasta]": {
9195
"content": [
9296
"936c0d5ce713130113e99e09a5b53afd",
9397
true,
9498
[
9599

96-
],
97-
[
98-
"versions.yml:md5,72777174718c419301be78c0840f1931"
99100
],
100101
{
101-
"BISMARK_ALIGN": {
102-
"bismark": "0.25.1"
103-
}
102+
"versions_bismark": [
103+
[
104+
"BISMARK_ALIGN",
105+
"bismark",
106+
"0.25.1"
107+
]
108+
]
104109
}
105110
],
106111
"meta": {
107112
"nf-test": "0.9.2",
108-
"nextflow": "25.04.6"
113+
"nextflow": "25.10.0"
109114
},
110-
"timestamp": "2025-09-26T12:08:24.007957857"
115+
"timestamp": "2025-10-28T15:30:58.182901875"
111116
}
112117
}

subworkflows/nf-core/fastq_align_dedup_bismark/main.nf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ workflow FASTQ_ALIGN_DEDUP_BISMARK {
4242
)
4343
ch_alignments = BISMARK_ALIGN.out.bam
4444
ch_alignment_reports = BISMARK_ALIGN.out.report.map{ meta, report -> [ meta, report, [] ] }
45-
ch_versions = ch_versions.mix(BISMARK_ALIGN.out.versions)
4645

4746
if (!skip_deduplication) {
4847
/*

0 commit comments

Comments
 (0)