Skip to content

Commit 85cdcac

Browse files
committed
migrate lissero module to topic channels
1 parent 0a86013 commit 85cdcac

5 files changed

Lines changed: 51 additions & 28 deletions

File tree

modules/nf-core/lissero/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ channels:
55
- bioconda
66
dependencies:
77
- bioconda::lissero=0.4.9
8+
- setuptools=80.9.0

modules/nf-core/lissero/main.nf

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ process LISSERO {
1212

1313
output:
1414
tuple val(meta), path("*.tsv"), emit: tsv
15-
path "versions.yml" , emit: versions
15+
tuple val("${task.process}"), val('lissero'), val('0.4.9'), emit: versions_lissero, topic: versions
1616

1717
when:
1818
task.ext.when == null || task.ext.when
@@ -25,21 +25,11 @@ process LISSERO {
2525
$args \\
2626
$fasta \\
2727
> ${prefix}.tsv
28-
29-
cat <<-END_VERSIONS > versions.yml
30-
"${task.process}":
31-
lissero: \$( echo \$(lissero --version 2>&1) | sed 's/^.*LisSero //' )
32-
END_VERSIONS
3328
"""
3429

3530
stub:
3631
def prefix = task.ext.prefix ?: "${meta.id}"
3732
"""
3833
touch ${prefix}.tsv
39-
40-
cat <<-END_VERSIONS > versions.yml
41-
"${task.process}":
42-
lissero: \$( echo \$(lissero --version 2>&1) | sed 's/^.*LisSero //' )
43-
END_VERSIONS
4434
"""
4535
}

modules/nf-core/lissero/meta.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ tools:
1010
homepage: https://github.com/MDU-PHL/LisSero/blob/master/README.md
1111
documentation: https://github.com/MDU-PHL/LisSero/blob/master/README.md
1212
tool_dev_url: https://github.com/MDU-PHL/lissero
13-
licence: ["GPL v3"]
13+
licence:
14+
- "GPL v3"
1415
identifier: ""
1516
input:
1617
- - meta:
@@ -35,14 +36,28 @@ output:
3536
description: Tab-delimited result file
3637
pattern: "*.tsv"
3738
ontologies:
38-
- edam: http://edamontology.org/format_3475 # TSV
39+
- edam: http://edamontology.org/format_3475
40+
versions_lissero:
41+
- - ${task.process}:
42+
type: string
43+
description: The name of the process
44+
- lissero:
45+
type: string
46+
description: The name of the tool
47+
- 0.4.9:
48+
type: string
49+
description: The expression to obtain the version of the tool
50+
topics:
3951
versions:
40-
- versions.yml:
41-
type: file
42-
description: File containing software versions
43-
pattern: "versions.yml"
44-
ontologies:
45-
- edam: http://edamontology.org/format_3750 # YAML
52+
- - ${task.process}:
53+
type: string
54+
description: The name of the process
55+
- lissero:
56+
type: string
57+
description: The name of the tool
58+
- 0.4.9:
59+
type: string
60+
description: The expression to obtain the version of the tool
4661
authors:
4762
- "@rpetit3"
4863
maintainers:

modules/nf-core/lissero/tests/main.nf.test

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ nextflow_process {
2424
then {
2525
assertAll(
2626
{ assert process.success },
27-
{ assert snapshot(
28-
file(process.out.tsv[0][1]).readLines()[0], // Two line file. Line 2 contains a path.
29-
process.out.versions
30-
).match()
27+
{
28+
assert snapshot(
29+
file(process.out.tsv[0][1]).readLines()[0],
30+
sanitizeOutput(process.out, unstableKeys: ["tsv"])
31+
).match()
3132
}
3233
)
3334
}
@@ -55,3 +56,5 @@ nextflow_process {
5556
}
5657

5758
}
59+
60+

modules/nf-core/lissero/tests/main.nf.test.snap

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
"content": [
44
"ID\tSEROTYPE\tPRS\tLMO0737\tLMO1118\tORF2110\tORF2819\tCOMMENT",
55
[
6-
"versions.yml:md5,f091db71715241a5f46beacaf97dc08b"
6+
[
7+
"LISSERO",
8+
"lissero",
9+
"0.4.9"
10+
]
711
]
812
],
913
"meta": {
@@ -25,7 +29,11 @@
2529
]
2630
],
2731
"1": [
28-
"versions.yml:md5,f091db71715241a5f46beacaf97dc08b"
32+
[
33+
"LISSERO",
34+
"lissero",
35+
"0.4.9"
36+
]
2937
],
3038
"tsv": [
3139
[
@@ -36,8 +44,12 @@
3644
"test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
3745
]
3846
],
39-
"versions": [
40-
"versions.yml:md5,f091db71715241a5f46beacaf97dc08b"
47+
"versions_lissero": [
48+
[
49+
"LISSERO",
50+
"lissero",
51+
"0.4.9"
52+
]
4153
]
4254
}
4355
],
@@ -47,4 +59,6 @@
4759
},
4860
"timestamp": "2024-08-30T15:08:59.133959"
4961
}
50-
}
62+
}
63+
64+

0 commit comments

Comments
 (0)