Skip to content

Commit

Permalink
Added nf-test for yahs
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp committed Aug 22, 2024
1 parent fe9614c commit 5394442
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 36 deletions.
2 changes: 1 addition & 1 deletion modules/nf-core/yahs/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tools:
documentation: "https://github.com/c-zhou/yahs"
tool_dev_url: "https://github.com/c-zhou/yahs"
doi: "10.1093/bioinformatics/btac808"
licence: "['MIT']"
licence: ["MIT"]
input:
# Only when we have meta
- meta:
Expand Down
36 changes: 36 additions & 0 deletions modules/nf-core/yahs/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

nextflow_process {

name "Test Process YAHS"
script "../main.nf"
process "YAHS"
config "./nextflow.config"

tag "modules"
tag "modules_nfcore"
tag "yahs"

test("test-yahs") {

when {
process {
"""
input[0] = [ [ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/bed/test.bed', checkIfExists: true)
]
input[1] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
input[2] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
"""
}
}

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

}
67 changes: 67 additions & 0 deletions modules/nf-core/yahs/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"test-yahs": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test_scaffolds_final.fa:md5,a7673a43fb4e3f0a87d2ca2fe48bd442"
]
],
"1": [
[
{
"id": "test"
},
"test_scaffolds_final.agp:md5,7134a33534816100a84a6d32351c2168"
]
],
"2": [
[
{
"id": "test"
},
"test.bin:md5,c60503a616a0f7726176febdad3ae186"
]
],
"3": [
"versions.yml:md5,007c44dd06fe8686b6f8068314601462"
],
"binary": [
[
{
"id": "test"
},
"test.bin:md5,c60503a616a0f7726176febdad3ae186"
]
],
"scaffolds_agp": [
[
{
"id": "test"
},
"test_scaffolds_final.agp:md5,7134a33534816100a84a6d32351c2168"
]
],
"scaffolds_fasta": [
[
{
"id": "test"
},
"test_scaffolds_final.fa:md5,a7673a43fb4e3f0a87d2ca2fe48bd442"
]
],
"versions": [
"versions.yml:md5,007c44dd06fe8686b6f8068314601462"
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-08-23T08:47:14.869961"
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
process {

publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }

withName: 'test_yahs:YAHS' {
ext.prefix = { "${meta.id}" }
ext.args = '--no-contig-ec'
}

}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1665,6 +1665,3 @@ wgsim:
whamg:
- modules/nf-core/whamg/**
- tests/modules/nf-core/whamg/**
yahs:
- modules/nf-core/yahs/**
- tests/modules/nf-core/yahs/**
17 changes: 0 additions & 17 deletions tests/modules/nf-core/yahs/main.nf

This file was deleted.

11 changes: 0 additions & 11 deletions tests/modules/nf-core/yahs/test.yml

This file was deleted.

0 comments on commit 5394442

Please sign in to comment.