Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added nf-test for vrhyme/vrhyme #6533

Merged
merged 3 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion modules/nf-core/vrhyme/vrhyme/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: vrhyme_vrhyme
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::vrhyme=1.1.0
- conda-forge::python=3.10.8 # Locked with the container
- conda-forge::numpy=1.23.5 # Locked with the container
- conda-forge::scikit-learn=1.2.2 # Locked with the container
2 changes: 1 addition & 1 deletion modules/nf-core/vrhyme/vrhyme/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tools:
documentation: https://github.com/AnantharamanLab/vRhyme
tool_dev_url: https://github.com/AnantharamanLab/vRhyme
doi: 10.1093/nar/gkac341
licence: "['GPL v3', 'GPL v3 license']"
licence: ["GPL v3", "GPL v3 license"]
input:
- meta:
type: map
Expand Down
88 changes: 88 additions & 0 deletions modules/nf-core/vrhyme/vrhyme/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@

nextflow_process {

name "Test Process VRHYME_VRHYME"
script "../main.nf"
process "VRHYME_VRHYME"

tag "modules"
tag "modules_nfcore"
tag "modules_vrhyme"
tag "vrhyme"
tag "vrhyme/vrhyme"
tag "gunzip"

setup {
run("GUNZIP") {
script "../../../gunzip/main.nf"
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fasta/test1.contigs.fa.gz', checkIfExists: true)
]

"""
}
}
}

test("test-vrhyme-vrhyme") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
[
file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fastq/test1_1.fastq.gz', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fastq/test1_2.fastq.gz', checkIfExists: true)
]
]
input[1] = GUNZIP.out.gunzip

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.bins[0][1]).listFiles().collect { it.name }.toSorted(), // Some files are unstable
process.out.membership,
file(process.out.summary[0][1]).name, // unstable
process.out.versions
).match()
}
)
}
}

test("test-vrhyme-vrhyme-stub") {
options '-stub'
when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
[
file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fastq/test1_1.fastq.gz', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/illumina/fastq/test1_2.fastq.gz', checkIfExists: true)
]
]
input[1] = GUNZIP.out.gunzip

"""
}
}

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

}
169 changes: 169 additions & 0 deletions modules/nf-core/vrhyme/vrhyme/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
{
"test-vrhyme-vrhyme": {
"content": [
[
"vRhyme_bin_1.faa",
"vRhyme_bin_1.fasta",
"vRhyme_bin_1.ffn",
"vRhyme_bin_10.faa",
"vRhyme_bin_10.fasta",
"vRhyme_bin_10.ffn",
"vRhyme_bin_11.faa",
"vRhyme_bin_11.fasta",
"vRhyme_bin_11.ffn",
"vRhyme_bin_12.faa",
"vRhyme_bin_12.fasta",
"vRhyme_bin_12.ffn",
"vRhyme_bin_13.faa",
"vRhyme_bin_13.fasta",
"vRhyme_bin_13.ffn",
"vRhyme_bin_14.faa",
"vRhyme_bin_14.fasta",
"vRhyme_bin_14.ffn",
"vRhyme_bin_2.faa",
"vRhyme_bin_2.fasta",
"vRhyme_bin_2.ffn",
"vRhyme_bin_3.faa",
"vRhyme_bin_3.fasta",
"vRhyme_bin_3.ffn",
"vRhyme_bin_4.faa",
"vRhyme_bin_4.fasta",
"vRhyme_bin_4.ffn",
"vRhyme_bin_5.faa",
"vRhyme_bin_5.fasta",
"vRhyme_bin_5.ffn",
"vRhyme_bin_6.faa",
"vRhyme_bin_6.fasta",
"vRhyme_bin_6.ffn",
"vRhyme_bin_7.faa",
"vRhyme_bin_7.fasta",
"vRhyme_bin_7.ffn",
"vRhyme_bin_8.faa",
"vRhyme_bin_8.fasta",
"vRhyme_bin_8.ffn",
"vRhyme_bin_9.faa",
"vRhyme_bin_9.fasta",
"vRhyme_bin_9.ffn"
],
[
[
{
"id": "test",
"single_end": false
},
"vRhyme_best_bins.19.membership.tsv:md5,a24fe8417dd21c2db3da84cf51cff750"
]
],
"vRhyme_best_bins.19.summary.tsv",
[
"versions.yml:md5,3806574bd72718ff75e849d015ed0097"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-03T21:20:45.925942"
},
"test-vrhyme-vrhyme-stub": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
[
"vRhyme_bin_1.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_10.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_11.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_12.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_13.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_14.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_2.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_3.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_4.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_5.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_6.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_7.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_8.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_9.fasta:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
],
"1": [
[
{
"id": "test",
"single_end": false
},
"vRhyme_best_bins.19.membership.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"2": [
[
{
"id": "test",
"single_end": false
},
"vRhyme_best_bins.19.summary.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"3": [
"versions.yml:md5,3806574bd72718ff75e849d015ed0097"
],
"bins": [
[
{
"id": "test",
"single_end": false
},
[
"vRhyme_bin_1.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_10.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_11.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_12.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_13.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_14.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_2.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_3.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_4.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_5.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_6.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_7.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_8.fasta:md5,d41d8cd98f00b204e9800998ecf8427e",
"vRhyme_bin_9.fasta:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
],
"membership": [
[
{
"id": "test",
"single_end": false
},
"vRhyme_best_bins.19.membership.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"summary": [
[
{
"id": "test",
"single_end": false
},
"vRhyme_best_bins.19.summary.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,3806574bd72718ff75e849d015ed0097"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-02T16:38:33.310046"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,3 @@ vrhyme/extractunbinned:
vrhyme/linkbins:
- modules/nf-core/vrhyme/linkbins/**
- tests/modules/nf-core/vrhyme/linkbins/**
vrhyme/vrhyme:
- modules/nf-core/vrhyme/vrhyme/**
- tests/modules/nf-core/vrhyme/vrhyme/**
25 changes: 0 additions & 25 deletions tests/modules/nf-core/vrhyme/vrhyme/main.nf

This file was deleted.

5 changes: 0 additions & 5 deletions tests/modules/nf-core/vrhyme/vrhyme/nextflow.config

This file was deleted.

63 changes: 0 additions & 63 deletions tests/modules/nf-core/vrhyme/vrhyme/test.yml

This file was deleted.

Loading