Skip to content

Commit

Permalink
Add metamap to viennarna/rnafold module (#5675)
Browse files Browse the repository at this point in the history
* Add meta map to viennarna/rnafold module

* Update snap
  • Loading branch information
adamrtalbot authored May 25, 2024
1 parent 08b3605 commit 8ead864
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 13 deletions.
9 changes: 5 additions & 4 deletions modules/nf-core/viennarna/rnafold/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ process VIENNARNA_RNAFOLD {
'biocontainers/viennarna:2.6.4--py310pl5321h6cc9453_1' }"

input:
path fasta
tuple val(meta), path(fasta)

output:
path "*.fold" , emit: rnafold_txt
path "*.ps" , emit: rnafold_ps
path "versions.yml" , emit: versions
tuple val(meta), path("*.fold") , emit: rnafold_txt
tuple val(meta), path("*.ps") , emit: rnafold_ps
tuple val(meta), path("versions.yml"), emit: versions

when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
def prefix = meta.id ?: "${fasta.getName()}"
"""
RNAfold \\
${args} \\
Expand Down
12 changes: 9 additions & 3 deletions modules/nf-core/viennarna/rnafold/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ nextflow_process {
when {
process {
"""
input[0] = file(params.test_data['homo_sapiens']['genome']['transcriptome_fasta'], checkIfExists: true)
input[0] = [
[:],
file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/transcriptome.fasta", checkIfExists: true)
]
"""
}
}
Expand All @@ -33,8 +36,11 @@ nextflow_process {

when {
process {
"""
input[0] = file(params.test_data['homo_sapiens']['genome']['transcriptome_fasta'], checkIfExists: true)
"""
input[0] = [
[:],
file(params.modules_testdata_base_path + "genomics/homo_sapiens/genome/transcriptome.fasta", checkIfExists: true)
]
"""
}
}
Expand Down
32 changes: 26 additions & 6 deletions modules/nf-core/viennarna/rnafold/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,51 @@
"stub": {
"content": [
[
"transcriptome.fasta.fold:md5,d41d8cd98f00b204e9800998ecf8427e"
[
{

},
"transcriptome.fasta.fold:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
[
"versions.yml:md5,76ca9d956465e05df59c27f000276284"
[
{

},
"versions.yml:md5,76ca9d956465e05df59c27f000276284"
]
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-05-22T09:28:37.785786414"
"timestamp": "2024-05-22T16:52:27.132604"
},
"rnafold - fasta": {
"content": [
[
"transcriptome.fasta.fold:md5,5f8a62d2119ffa8ae0907917c772af02"
[
{

},
"transcriptome.fasta.fold:md5,5f8a62d2119ffa8ae0907917c772af02"
]
],
[
"versions.yml:md5,76ca9d956465e05df59c27f000276284"
[
{

},
"versions.yml:md5,76ca9d956465e05df59c27f000276284"
]
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-05-22T09:28:31.983790151"
"timestamp": "2024-05-22T16:52:19.507543"
}
}

0 comments on commit 8ead864

Please sign in to comment.