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 metabat2/jgisummarizebamcontigdepths #6565

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ name: metabat2_jgisummarizebamcontigdepths
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::metabat2=2.15
11 changes: 11 additions & 0 deletions modules/nf-core/metabat2/jgisummarizebamcontigdepths/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,15 @@ process METABAT2_JGISUMMARIZEBAMCONTIGDEPTHS {
metabat2: \$( metabat2 --help 2>&1 | head -n 2 | tail -n 1| sed 's/.*\\:\\([0-9]*\\.[0-9]*\\).*/\\1/' )
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
echo | gzip > ${prefix}.txt.gz

cat <<-END_VERSIONS > versions.yml
"${task.process}":
metabat2: \$( metabat2 --help 2>&1 | head -n 2 | tail -n 1| sed 's/.*\\:\\([0-9]*\\.[0-9]*\\).*/\\1/' )
END_VERSIONS
"""
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "metabat2"
tag "metabat2/jgisummarizebamcontigdepths"

test("test-metabat2-jgisummarizebamcontigdepths") {

when {
process {
"""
input[0] = [
[ id:'test' ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true)
]

"""
}
}

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

test("test-metabat2-jgisummarizebamcontigdepths-stub") {
options '-stub'

when {
process {
"""
input[0] = [
[ id:'test' ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true),
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true)
]

"""
}
}

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

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"test-metabat2-jgisummarizebamcontigdepths": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test.txt.gz:md5,c7448ff92b336561540717e7b0ca0702"
]
],
"1": [
"versions.yml:md5,2884d72385b65d0737899da5cb9e89d5"
],
"depth": [
[
{
"id": "test"
},
"test.txt.gz:md5,c7448ff92b336561540717e7b0ca0702"
]
],
"versions": [
"versions.yml:md5,2884d72385b65d0737899da5cb9e89d5"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-05T20:02:46.985235"
},
"test-metabat2-jgisummarizebamcontigdepths-stub": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"1": [
"versions.yml:md5,2884d72385b65d0737899da5cb9e89d5"
],
"depth": [
[
{
"id": "test"
},
"test.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
]
],
"versions": [
"versions.yml:md5,2884d72385b65d0737899da5cb9e89d5"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-05T20:01:24.531629"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,6 @@ merquryfk/katgc:
merquryfk/ploidyplot:
- modules/nf-core/merquryfk/ploidyplot/**
- tests/modules/nf-core/merquryfk/ploidyplot/**
metabat2/jgisummarizebamcontigdepths:
- modules/nf-core/metabat2/jgisummarizebamcontigdepths/**
- tests/modules/nf-core/metabat2/jgisummarizebamcontigdepths/**
metabat2/metabat2:
- modules/nf-core/metabat2/metabat2/**
- tests/modules/nf-core/metabat2/metabat2/**
Expand Down
14 changes: 0 additions & 14 deletions tests/modules/nf-core/metabat2/jgisummarizebamcontigdepths/main.nf

This file was deleted.

This file was deleted.

This file was deleted.

Loading