Skip to content

Commit 28572d4

Browse files
authored
Swap rastair to topics (#12003)
* Swap rastair to topics * Fix subworkflow * Include the main.nf change
1 parent ef1b15f commit 28572d4

19 files changed

Lines changed: 436 additions & 186 deletions

File tree

modules/nf-core/rastair/call/main.nf

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,25 @@ process RASTAIR_CALL {
1616

1717
output:
1818
tuple val(meta), path("*.rastair_call.txt"), emit: txt
19-
path "versions.yml", emit: versions
19+
tuple val("${task.process}"), val('rastair'), eval("rastair --version | sed 's/rastair //'"), topic: versions, emit: versions_rastair
2020

2121
when:
2222
task.ext.when == null || task.ext.when
2323

2424
script:
2525
def prefix = task.ext.prefix ?: "${meta.id}"
26-
def nt_OT_to_trim = meta.trim_OT ?: parsed_trim_OT
27-
def nt_OB_to_trim = meta.trim_OB ?: parsed_trim_OB
28-
2926
"""
3027
rastair call \\
3128
--threads ${task.cpus} \\
32-
--nOT ${nt_OT_to_trim} \\
33-
--nOB ${nt_OB_to_trim} \\
29+
--nOT ${parsed_trim_OT} \\
30+
--nOB ${parsed_trim_OB} \\
3431
--fasta-file ${fasta} \\
3532
${bam} > ${prefix}.rastair_call.txt
36-
37-
cat <<-END_VERSIONS > versions.yml
38-
"${task.process}":
39-
rastair: \$(rastair --version)
40-
END_VERSIONS
4133
"""
4234

4335
stub:
4436
def prefix = task.ext.prefix ?: "${meta.id}"
4537
"""
4638
touch ${prefix}.rastair_call.txt
47-
48-
cat <<-END_VERSIONS > versions.yml
49-
"${task.process}":
50-
rastair: \$(rastair --version 2>&1 || echo "stub")
51-
END_VERSIONS
5239
"""
5340
}

modules/nf-core/rastair/call/meta.yml

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: rastair_call
2-
description: Assess positive C->T conversion as a readout for methylation on a genome-wide basis
2+
description: Assess positive C->T conversion as a readout for methylation on a
3+
genome-wide basis
34
keywords:
45
- methylation
56
- rastair
@@ -14,7 +15,9 @@ tools:
1415
A tool for rapid genome-wide assessment of positive C->T conversion as a readout for methylation.
1516
homepage: https://bitbucket.org/bsblabludwig/rastair/src/master/
1617
documentation: https://bitbucket.org/bsblabludwig/rastair/src/master/README.md
17-
licence: ["GPL-3.0"]
18+
licence:
19+
- "GPL-3.0"
20+
identifier: ""
1821
input:
1922
- - meta:
2023
type: map
@@ -25,6 +28,7 @@ input:
2528
type: file
2629
description: BAM/CRAM file
2730
pattern: "*.{bam,cram}"
31+
ontologies: []
2832
- - meta2:
2933
type: map
3034
description: |
@@ -34,6 +38,7 @@ input:
3438
type: file
3539
description: BAM/CRAM index file
3640
pattern: "*.{bai,crai}"
41+
ontologies: []
3742
- - meta3:
3843
type: map
3944
description: |
@@ -43,6 +48,7 @@ input:
4348
type: file
4449
description: Input genome fasta file
4550
pattern: "*.{fasta,fa}"
51+
ontologies: []
4652
- - meta4:
4753
type: map
4854
description: |
@@ -52,6 +58,7 @@ input:
5258
type: file
5359
description: FASTA index file
5460
pattern: "*.fai"
61+
ontologies: []
5562
- - meta5:
5663
type: map
5764
description: |
@@ -67,7 +74,8 @@ input:
6774
e.g. [ id:'test', single_end:false ]
6875
- parsed_trim_OB:
6976
type: string
70-
description: Number of nucleotides to trim from Original Bottom (OB) reads.
77+
description: Number of nucleotides to trim from Original Bottom (OB)
78+
reads.
7179
output:
7280
txt:
7381
- - meta:
@@ -77,15 +85,31 @@ output:
7785
e.g. [ id:'test', single_end:false ]
7886
- "*.rastair_call.txt":
7987
type: file
80-
description: Text file from Rastair call containing C->T conversion metrics
88+
description: Text file from Rastair call containing C->T conversion
89+
metrics
8190
pattern: "*.rastair_call.txt"
91+
ontologies: []
92+
versions_rastair:
93+
- - ${task.process}:
94+
type: string
95+
description: The name of the process
96+
- rastair:
97+
type: string
98+
description: The name of the tool
99+
- rastair --version | sed 's/rastair //':
100+
type: eval
101+
description: The expression to obtain the version of the tool
102+
topics:
82103
versions:
83-
- versions.yml:
84-
type: file
85-
description: File containing software versions
86-
pattern: "versions.yml"
87-
ontologies:
88-
- edam: http://edamontology.org/format_3750 # YAML
104+
- - ${task.process}:
105+
type: string
106+
description: The name of the process
107+
- rastair:
108+
type: string
109+
description: The name of the tool
110+
- rastair --version | sed 's/rastair //':
111+
type: eval
112+
description: The expression to obtain the version of the tool
89113
authors:
90114
- "@eduard-casas"
91115
maintainers:

modules/nf-core/rastair/call/tests/main.nf.test

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,53 @@ nextflow_process {
4343
}
4444

4545
then {
46+
assert process.success
4647
assertAll(
47-
{ assert process.success },
48-
{ assert snapshot(process.out).match()
49-
}
48+
{ assert snapshot(sanitizeOutput(process.out)).match()}
49+
)
50+
}
51+
52+
}
53+
54+
test("sarscov2 paired-end methylated [bam] / sarscov2 genome [fasta] - stub") {
55+
56+
options "-stub"
57+
58+
when {
59+
process {
60+
"""
61+
input[0] = [
62+
[ id:'test' ], // meta map
63+
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.methylated.sorted.bam', checkIfExists: true)
64+
]
65+
input[1] = [
66+
[ id:'test' ], // meta map
67+
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.methylated.sorted.bam.bai', checkIfExists: true)
68+
]
69+
input[2] = [
70+
[ id:'test' ], // meta map
71+
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
72+
]
73+
input[3] = [
74+
[ id:'test' ], // meta map
75+
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
76+
]
77+
input[4] = [
78+
[ id:'test' ], // meta map
79+
"1"
80+
]
81+
input[5] = [
82+
[ id:'test' ], // meta map
83+
"1"
84+
]
85+
"""
86+
}
87+
}
88+
89+
then {
90+
assert process.success
91+
assertAll(
92+
{ assert snapshot(sanitizeOutput(process.out)).match()}
5093
)
5194
}
5295

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,33 @@
11
{
2-
"sarscov2 paired-end methylated [bam] / sarscov2 genome [fasta]": {
2+
"sarscov2 paired-end methylated [bam] / sarscov2 genome [fasta] - stub": {
33
"content": [
44
{
5-
"0": [
5+
"txt": [
66
[
77
{
88
"id": "test"
99
},
10-
"test.rastair_call.txt:md5,7508cfdd0045c688f82e4cb4f1d37373"
10+
"test.rastair_call.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
1111
]
1212
],
13-
"1": [
14-
"versions.yml:md5,f30c6afb2c776f0dd9830769a10b667d"
15-
],
13+
"versions_rastair": [
14+
[
15+
"RASTAIR_CALL",
16+
"rastair",
17+
"0.8.2"
18+
]
19+
]
20+
}
21+
],
22+
"timestamp": "2026-06-15T08:24:19.197337518",
23+
"meta": {
24+
"nf-test": "0.9.5",
25+
"nextflow": "26.04.0"
26+
}
27+
},
28+
"sarscov2 paired-end methylated [bam] / sarscov2 genome [fasta]": {
29+
"content": [
30+
{
1631
"txt": [
1732
[
1833
{
@@ -21,15 +36,19 @@
2136
"test.rastair_call.txt:md5,7508cfdd0045c688f82e4cb4f1d37373"
2237
]
2338
],
24-
"versions": [
25-
"versions.yml:md5,f30c6afb2c776f0dd9830769a10b667d"
39+
"versions_rastair": [
40+
[
41+
"RASTAIR_CALL",
42+
"rastair",
43+
"0.8.2"
44+
]
2645
]
2746
}
2847
],
48+
"timestamp": "2026-06-15T08:24:12.959634995",
2949
"meta": {
30-
"nf-test": "0.9.0",
31-
"nextflow": "24.10.5"
32-
},
33-
"timestamp": "2025-09-17T23:30:45.805728"
50+
"nf-test": "0.9.5",
51+
"nextflow": "26.04.0"
52+
}
3453
}
3554
}

modules/nf-core/rastair/mbias/main.nf

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ process RASTAIR_MBIAS {
1414

1515
output:
1616
tuple val(meta), path("*.rastair_mbias.txt"), emit: txt
17-
path "versions.yml", emit: versions
17+
tuple val("${task.process}"), val('rastair'), eval("rastair --version | sed 's/rastair //'"), topic: versions, emit: versions_rastair
1818

1919
when:
2020
task.ext.when == null || task.ext.when
@@ -26,21 +26,11 @@ process RASTAIR_MBIAS {
2626
--threads ${task.cpus} \\
2727
--fasta-file ${fasta} \\
2828
${bam} > ${prefix}.rastair_mbias.txt
29-
30-
cat <<-END_VERSIONS > versions.yml
31-
"${task.process}":
32-
rastair: \$(rastair --version)
33-
END_VERSIONS
3429
"""
3530

3631
stub:
3732
def prefix = task.ext.prefix ?: "${meta.id}"
3833
"""
3934
touch ${prefix}.rastair_mbias.txt
40-
41-
cat <<-END_VERSIONS > versions.yml
42-
"${task.process}":
43-
rastair: \$(rastair --version 2>&1 || echo "stub")
44-
END_VERSIONS
4535
"""
4636
}

modules/nf-core/rastair/mbias/meta.yml

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: rastair_mbias
2-
description: Assess C->T conversion as a readout for methylation on a per-read-position basis.
2+
description: Assess C->T conversion as a readout for methylation on a
3+
per-read-position basis.
34
keywords:
45
- methylation
56
- rastair
@@ -16,7 +17,9 @@ tools:
1617
A tool for rapid genome-wide assessment of positive C->T conversion as a readout for methylation.
1718
homepage: https://bitbucket.org/bsblabludwig/rastair/src/master/
1819
documentation: https://bitbucket.org/bsblabludwig/rastair/src/master/README.md
19-
licence: ["GPL-3.0"]
20+
licence:
21+
- "GPL-3.0"
22+
identifier: ""
2023
input:
2124
- - meta:
2225
type: map
@@ -27,6 +30,7 @@ input:
2730
type: file
2831
description: BAM/CRAM file
2932
pattern: "*.{bam,cram}"
33+
ontologies: []
3034
- - meta2:
3135
type: map
3236
description: |
@@ -36,6 +40,7 @@ input:
3640
type: file
3741
description: BAM/CRAM index file
3842
pattern: "*.{bai,crai}"
43+
ontologies: []
3944
- - meta3:
4045
type: map
4146
description: |
@@ -45,6 +50,7 @@ input:
4550
type: file
4651
description: Input genome fasta file
4752
pattern: "*.{fasta,fa}"
53+
ontologies: []
4854
- - meta4:
4955
type: map
5056
description: |
@@ -54,6 +60,7 @@ input:
5460
type: file
5561
description: FASTA index file
5662
pattern: "*.fai"
63+
ontologies: []
5764
output:
5865
txt:
5966
- - meta:
@@ -63,15 +70,31 @@ output:
6370
e.g. [ id:'test', single_end:false ]
6471
- "*.rastair_mbias.txt":
6572
type: file
66-
description: Text file from Rastair mbias containing per-read-position C->T conversion metrics.
73+
description: Text file from Rastair mbias containing per-read-position
74+
C->T conversion metrics.
6775
pattern: "*.rastair_mbias.txt"
76+
ontologies: []
77+
versions_rastair:
78+
- - ${task.process}:
79+
type: string
80+
description: The name of the process
81+
- rastair:
82+
type: string
83+
description: The name of the tool
84+
- rastair --version | sed 's/rastair //':
85+
type: eval
86+
description: The expression to obtain the version of the tool
87+
topics:
6888
versions:
69-
- versions.yml:
70-
type: file
71-
description: File containing software versions
72-
pattern: "versions.yml"
73-
ontologies:
74-
- edam: http://edamontology.org/format_3750 # YAML
89+
- - ${task.process}:
90+
type: string
91+
description: The name of the process
92+
- rastair:
93+
type: string
94+
description: The name of the tool
95+
- rastair --version | sed 's/rastair //':
96+
type: eval
97+
description: The expression to obtain the version of the tool
7598
authors:
7699
- "@eduard-casas"
77100
maintainers:

0 commit comments

Comments
 (0)