Skip to content

Commit 4f393fa

Browse files
Ge94famosabSPPearce
authored
Proovframe update (#7158)
* Separated input values because of meta If the annotation file (faa) has been generated with an external db, meta values will be different between faa and fasta. This case is especially useful for proovframe, since it's main use is to be mapped to a set of high-quality proteins, usually coming from dbs like trembl or swissprot. * Update proovframe main.nf.test with two input values * Update return meta Co-authored-by: Famke Bäuerle <[email protected]> * Proovframe lint * Adjust inputs, lint, tests * Added meta2+3 * New test.snap --------- Co-authored-by: Famke Bäuerle <[email protected]> Co-authored-by: Simon Pearce <[email protected]>
1 parent cb905a1 commit 4f393fa

File tree

9 files changed

+121
-42
lines changed

9 files changed

+121
-42
lines changed

modules/nf-core/proovframe/fix/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ channels:
44
- conda-forge
55
- bioconda
66
dependencies:
7-
- bioconda::proovframe=0.9.7
7+
- "bioconda::proovframe=0.9.7"

modules/nf-core/proovframe/fix/meta.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ output:
5353
pattern: "*.{fa}"
5454
ontologies: []
5555
versions:
56-
- versions.yml:
56+
- "versions.yml":
5757
type: file
5858
description: File containing software versions
5959
pattern: "versions.yml"
60-
6160
ontologies:
6261
- edam: http://edamontology.org/format_3750 # YAML
6362
authors:
6463
- "@mcarbajo"
6564
- "@vagkaratzas"
6665
maintainers:
6766
- "@vagkaratzas"
67+
- "@Ge94"

modules/nf-core/proovframe/fix/tests/main.nf.test

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ nextflow_process {
1616
process {
1717
"""
1818
input[0] = [
19-
[ id:'test', single_end:false ], // meta map
20-
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true),
19+
[ id:'fa', single_end:false ], // meta map
2120
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
2221
]
22+
input[1] = [
23+
[ id:'fa', single_end:false ], // meta map
24+
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true)
25+
]
26+
input[2] = [[:], []]
2327
"""
2428
}
2529
}

modules/nf-core/proovframe/fix/tests/main.nf.test.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
}
3030
],
3131
"meta": {
32-
"nf-test": "0.9.0",
33-
"nextflow": "23.04.5"
32+
"nf-test": "0.9.2",
33+
"nextflow": "24.10.4"
3434
},
35-
"timestamp": "2024-10-18T12:17:51.685565164"
35+
"timestamp": "2025-11-06T16:40:56.201526311"
3636
},
3737
"test - faa_fasta - stub": {
3838
"content": [
@@ -64,9 +64,9 @@
6464
}
6565
],
6666
"meta": {
67-
"nf-test": "0.9.0",
68-
"nextflow": "23.04.5"
67+
"nf-test": "0.9.2",
68+
"nextflow": "24.10.4"
6969
},
70-
"timestamp": "2024-10-18T12:17:57.181403559"
70+
"timestamp": "2025-11-06T16:44:04.101218224"
7171
}
7272
}

modules/nf-core/proovframe/map/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ channels:
44
- conda-forge
55
- bioconda
66
dependencies:
7-
- bioconda::proovframe=0.9.7
7+
- "bioconda::proovframe=0.9.7"

modules/nf-core/proovframe/map/main.nf

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ process PROOVFRAME_MAP {
88
'biocontainers/proovframe:0.9.7--hdfd78af_1' }"
99

1010
input:
11-
tuple val(meta), path(faa), path(fasta)
11+
tuple val(meta), path(fasta)
12+
tuple val(meta2), path(faa)
13+
tuple val(meta3), path(db)
1214

1315
output:
1416
tuple val(meta), path("*.tsv"), emit: tsv
@@ -20,12 +22,15 @@ process PROOVFRAME_MAP {
2022
script:
2123
def args = task.ext.args ?: ''
2224
def prefix = task.ext.prefix ?: "${meta.id}"
25+
def db_type = db ? "--db ${db}" : (faa ? "--aa ${faa}" : "")
26+
2327
"""
2428
proovframe \\
2529
map \\
2630
${args} \\
27-
-a ${faa} \\
28-
-o ${prefix}.tsv \\
31+
--threads ${task.cpus} \\
32+
${db_type} \\
33+
-o ${prefix}.tsv \\
2934
${fasta}
3035
3136
cat <<-END_VERSIONS > versions.yml

modules/nf-core/proovframe/map/meta.yml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,32 @@ input:
2222
description: |
2323
Groovy Map containing sample information
2424
e.g. `[ id:'sample1', single_end:false ]`
25-
- faa:
26-
type: file
27-
description: A FASTA file containing a database of guide protein sequences
28-
pattern: "*.{faa,fasta,fa}"
29-
ontologies: []
3025
- fasta:
3126
type: file
32-
description: A FASTA file containing raw read nucleotide sequences
27+
description: A FASTA fna file containing raw read nucleotide sequences
3328
pattern: "*.{fasta,fa}"
34-
3529
ontologies: []
30+
- - meta2:
31+
type: map
32+
description: |
33+
Groovy Map containing sample information
34+
e.g. `[ id:'sample1', single_end:false ]`
35+
- faa:
36+
type: file
37+
description: A proteome fasta file to create a database of guide protein sequences
38+
from
39+
pattern: "*.{faa,fasta,fa}"
40+
ontologies: []
41+
- - meta3:
42+
type: map
43+
description: |
44+
Groovy Map containing sample information
45+
e.g. `[ id:'sample1', single_end:false ]`
46+
- db:
47+
type: file
48+
description: A previously generated diamond database of guide protein sequences
49+
pattern: "*.{dmnd}"
50+
ontologies: []
3651
output:
3752
tsv:
3853
- - meta:
@@ -43,20 +58,21 @@ output:
4358
- "*.tsv":
4459
type: file
4560
description: Output TSV file with the frameshift-aware protein to read alignments
46-
pattern: "*.tsv"
61+
pattern: "*.{tsv}"
4762
ontologies:
4863
- edam: http://edamontology.org/format_3475 # TSV
4964
versions:
50-
- versions.yml:
65+
- "versions.yml":
5166
type: file
5267
description: File containing software versions
5368
pattern: "versions.yml"
54-
5569
ontologies:
56-
- edam: http://edamontology.org/format_3750 # YAML
70+
- edam: "http://edamontology.org/format_3750" # YAML
71+
5772
authors:
5873
- "@manuelcarbajo"
5974
- "@MGS-sails"
6075
- "@vagkaratzas"
6176
maintainers:
6277
- "@vagkaratzas"
78+
- "@Ge94"

modules/nf-core/proovframe/map/tests/main.nf.test

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,51 @@ nextflow_process {
99
tag "proovframe"
1010
tag "proovframe/map"
1111

12-
test("sarscov2 - tsv") {
12+
test("sarscov2 - provided db") {
1313

1414
when {
1515
process {
1616
"""
1717
input[0] = [
18-
[ id:'test', single_end:false ], // meta map
19-
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true),
18+
[ id:'fa', single_end:false ], // meta map
2019
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
2120
]
21+
input[1] = [
22+
[ id:'fa', single_end:false ], // meta map
23+
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true)
24+
]
25+
input[2] = [
26+
[ id:'fa', single_end:false ], // meta map
27+
file(params.modules_testdata_base_path + 'proteomics/database/UP000005640_9606.dmnd', checkIfExists: true)
28+
]
29+
"""
30+
}
31+
}
32+
33+
then {
34+
assertAll(
35+
{ assert process.success },
36+
{ assert path(process.out.tsv[0][1]).text.contains('MT192765.1 sp|Q460N5|PAR14_HUMAN 28.4 176 105 5 3424 3918 818 983') },
37+
{ assert snapshot(process.out.versions).match() }
38+
)
39+
}
40+
41+
}
42+
43+
test("sarscov2 - provided faa") {
44+
45+
when {
46+
process {
47+
"""
48+
input[0] = [
49+
[ id:'fa', single_end:false ], // meta map
50+
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
51+
]
52+
input[1] = [
53+
[ id:'fa', single_end:false ], // meta map
54+
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true)
55+
]
56+
input[2] = [[:], []]
2257
"""
2358
}
2459
}
@@ -40,10 +75,17 @@ nextflow_process {
4075
process {
4176
"""
4277
input[0] = [
43-
[ id:'test', single_end:false ], // meta map
44-
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true),
78+
[ id:'test2', single_end:false ], // meta map
4579
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
4680
]
81+
input[1] = [
82+
[ id:'fa', single_end:false ], // meta map
83+
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/proteome.fasta', checkIfExists: true)
84+
]
85+
input[2] = [
86+
[ id:'fa', single_end:false ], // meta map
87+
file(params.modules_testdata_base_path + 'proteomics/database/UP000005640_9606.dmnd', checkIfExists: true)
88+
]
4789
"""
4890
}
4991
}
Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,38 @@
11
{
2-
"sarscov2 - tsv": {
2+
"sarscov2 - provided faa": {
33
"content": [
44
[
55
"versions.yml:md5,f49f29b8134fdb539364ee46855eb313"
66
]
77
],
88
"meta": {
9-
"nf-test": "0.9.0",
10-
"nextflow": "23.04.5"
9+
"nf-test": "0.9.2",
10+
"nextflow": "24.10.4"
1111
},
12-
"timestamp": "2024-10-18T12:19:19.854923441"
12+
"timestamp": "2025-10-27T13:13:01.777154464"
13+
},
14+
"sarscov2 - provided db": {
15+
"content": [
16+
[
17+
"versions.yml:md5,f49f29b8134fdb539364ee46855eb313"
18+
]
19+
],
20+
"meta": {
21+
"nf-test": "0.9.2",
22+
"nextflow": "24.10.4"
23+
},
24+
"timestamp": "2025-10-27T13:10:35.425578608"
1325
},
1426
"sarscov2 - tsv - stub": {
1527
"content": [
1628
{
1729
"0": [
1830
[
1931
{
20-
"id": "test",
32+
"id": "test2",
2133
"single_end": false
2234
},
23-
"test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
35+
"test2.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
2436
]
2537
],
2638
"1": [
@@ -29,10 +41,10 @@
2941
"tsv": [
3042
[
3143
{
32-
"id": "test",
44+
"id": "test2",
3345
"single_end": false
3446
},
35-
"test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
47+
"test2.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
3648
]
3749
],
3850
"versions": [
@@ -41,9 +53,9 @@
4153
}
4254
],
4355
"meta": {
44-
"nf-test": "0.9.0",
45-
"nextflow": "23.04.5"
56+
"nf-test": "0.9.2",
57+
"nextflow": "24.10.4"
4658
},
47-
"timestamp": "2024-10-18T12:19:25.120972507"
59+
"timestamp": "2025-10-27T13:15:18.917890463"
4860
}
4961
}

0 commit comments

Comments
 (0)