Skip to content

Commit

Permalink
Version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp committed Sep 6, 2024
1 parent d9b4429 commit fe3aa92
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 20 deletions.
2 changes: 1 addition & 1 deletion modules/nf-core/gubbins/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::gubbins=3.0.0
- bioconda::gubbins=3.3.5
29 changes: 27 additions & 2 deletions modules/nf-core/gubbins/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ process GUBBINS {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/gubbins:3.0.0--py39h5bf99c6_0' :
'biocontainers/gubbins:3.0.0--py39h5bf99c6_0' }"
'https://depot.galaxyproject.org/singularity/gubbins:3.3.5--py39pl5321he4a0461_0' :
'biocontainers/gubbins:3.3.5--py39pl5321he4a0461_0' }"

input:
path alignment
Expand All @@ -27,6 +27,9 @@ process GUBBINS {
script:
def args = task.ext.args ?: ''
"""
mkdir numba_cache_dir
export NUMBA_CACHE_DIR='./numba_cache_dir'
run_gubbins.py \\
--threads $task.cpus \\
$args \\
Expand All @@ -36,4 +39,26 @@ process GUBBINS {
gubbins: \$(run_gubbins.py --version 2>&1)
END_VERSIONS
"""

stub:
def args = task.ext.args ?: ''
"""
mkdir numba_cache_dir
export NUMBA_CACHE_DIR='./numba_cache_dir'
touch ${alignment.baseName}.fasta
touch ${alignment.baseName}.gff
touch ${alignment.baseName}.vcf
touch ${alignment.baseName}.csv
touch ${alignment.baseName}.phylip
touch ${alignment.baseName}.recombination_predictions.embl
touch ${alignment.baseName}.branch_base_reconstruction.embl
touch ${alignment.baseName}.final_tree.tre
touch ${alignment.baseName}.node_labelled.final_tree.tre
cat <<-END_VERSIONS > versions.yml
"${task.process}":
gubbins: \$(run_gubbins.py --version 2>&1)
END_VERSIONS
"""
}
24 changes: 22 additions & 2 deletions modules/nf-core/gubbins/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,33 @@ nextflow_process {
process.out.phylip,
file(process.out.embl_predicted[0]).name, // empty
process.out.embl_branch,
process.out.tree,
process.out.tree_labelled,
process.out.tree[0].collect { file(it).name }, // unstable
file(process.out.tree_labelled[0]).name, // unstable
process.out.versions
).match()
}
)
}
}

test("test-gubbins-stub") {
options '-stub'

when {
process {
"""
input[0] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/alignment/all_sites.fas', checkIfExists: true)
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}
}

}
103 changes: 88 additions & 15 deletions modules/nf-core/gubbins/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,40 +1,113 @@
{
"test-gubbins-stub": {
"content": [
{
"0": [
"all_sites.fasta:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"1": [
"all_sites.gff:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"2": [
"all_sites.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"3": [
"all_sites.csv:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"4": [
"all_sites.phylip:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"5": [
"all_sites.recombination_predictions.embl:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"6": [
"all_sites.branch_base_reconstruction.embl:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"7": [
[
"all_sites.final_tree.tre:md5,d41d8cd98f00b204e9800998ecf8427e",
"all_sites.node_labelled.final_tree.tre:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"8": [
"all_sites.node_labelled.final_tree.tre:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"9": [
"versions.yml:md5,42d794e45e0374e029afdbfbc585cc76"
],
"embl_branch": [
"all_sites.branch_base_reconstruction.embl:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"embl_predicted": [
"all_sites.recombination_predictions.embl:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"fasta": [
"all_sites.fasta:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"gff": [
"all_sites.gff:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"phylip": [
"all_sites.phylip:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"stats": [
"all_sites.csv:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"tree": [
[
"all_sites.final_tree.tre:md5,d41d8cd98f00b204e9800998ecf8427e",
"all_sites.node_labelled.final_tree.tre:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"tree_labelled": [
"all_sites.node_labelled.final_tree.tre:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"vcf": [
"all_sites.vcf:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"versions": [
"versions.yml:md5,42d794e45e0374e029afdbfbc585cc76"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-06T14:20:39.212181"
},
"test-gubbins": {
"content": [
[
"all_sites.filtered_polymorphic_sites.fasta:md5,4cbfd93868d8ed7d4d8b099eba137134"
"all_sites.filtered_polymorphic_sites.fasta:md5,0f945512f071fd1599bb7455492e31bc"
],
[
"all_sites.recombination_predictions.gff:md5,f95871e79968340cb82532e2c9b0c92b"
"all_sites.recombination_predictions.gff:md5,7605a21ad8812866adbdb5cada8a59d4"
],
"6e9a63f667f7facae3f3d3556618a9f6",
"d314daa06c635c0b31b132a1092ee4e3",
[
"all_sites.per_branch_statistics.csv:md5,25e4fdb6681c3709a9add1d5632bbf3e"
"all_sites.per_branch_statistics.csv:md5,8012a76a2486a8b3dfe78d6902b56ed4"
],
[
"all_sites.filtered_polymorphic_sites.phylip:md5,0a77f397a7797c5c3386832745b0c97a"
"all_sites.filtered_polymorphic_sites.phylip:md5,d28da2dd14d08bbb996756064516aee1"
],
"all_sites.recombination_predictions.embl",
[
"all_sites.branch_base_reconstruction.embl:md5,9e051646d630f528fff58f1f73286006"
],
[
[
"all_sites.final_tree.tre:md5,095689c565948a634c654fa4f28542d9",
"all_sites.node_labelled.final_tree.tre:md5,c16333d8b1c0502a7cd09e6531459f9f"
]
"all_sites.branch_base_reconstruction.embl:md5,9dfd7e411404360ce4a7938aab8db701"
],
[
"all_sites.node_labelled.final_tree.tre:md5,c16333d8b1c0502a7cd09e6531459f9f"
"all_sites.final_tree.tre",
"all_sites.node_labelled.final_tree.tre"
],
"all_sites.node_labelled.final_tree.tre",
[
"versions.yml:md5,5b1fc0a22fc6b4c4460858b2f478c937"
"versions.yml:md5,42d794e45e0374e029afdbfbc585cc76"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-06T08:59:35.386435"
"timestamp": "2024-09-06T14:16:35.669362"
}
}

0 comments on commit fe3aa92

Please sign in to comment.