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 mmseqs/databases #6563

Merged
merged 4 commits into from
Sep 6, 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
1 change: 0 additions & 1 deletion modules/nf-core/mmseqs/createtsv/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ name: mmseqs_createtsv
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::mmseqs2=15.6f452
1 change: 0 additions & 1 deletion modules/nf-core/mmseqs/databases/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ name: mmseqs_databases
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::mmseqs2=15.6f452
4 changes: 2 additions & 2 deletions modules/nf-core/mmseqs/databases/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ process MMSEQS_DATABASES {
val database

output:
path "${prefix}/" , emit: database
path "versions.yml" , emit: versions
path "${prefix}/" , emit: database
path "versions.yml" , emit: versions

when:
task.ext.when == null || task.ext.when
Expand Down
55 changes: 55 additions & 0 deletions modules/nf-core/mmseqs/databases/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "mmseqs"
tag "mmseqs/databases"

test("test-mmseqs-databases") {

when {
process {
"""
input[0] = "SILVA"

"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.database[0]).listFiles().collect { it.name }.toSorted(), // unstable
process.out.versions
).match()
}
)
}
}

test("test-mmseqs-databases-stub") {
options '-stub'
when {
process {
"""
input[0] = "SILVA"

"""
}
}

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

}
74 changes: 74 additions & 0 deletions modules/nf-core/mmseqs/databases/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"test-mmseqs-databases": {
"content": [
[
"database",
"database.dbtype",
"database.index",
"database.lookup",
"database.source",
"database.version",
"database_h",
"database_h.dbtype",
"database_h.index",
"database_mapping",
"database_taxonomy"
],
[
"versions.yml:md5,b038db45e5934b8f0f743449bbac01b4"
]
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-06T15:43:58.454012"
},
"test-mmseqs-databases-stub": {
"content": [
{
"0": [
[
"database:md5,d41d8cd98f00b204e9800998ecf8427e",
"database.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e",
"database.index:md5,d41d8cd98f00b204e9800998ecf8427e",
"database.lookup:md5,d41d8cd98f00b204e9800998ecf8427e",
"database.source:md5,d41d8cd98f00b204e9800998ecf8427e",
"database.version:md5,d41d8cd98f00b204e9800998ecf8427e",
"database_h:md5,d41d8cd98f00b204e9800998ecf8427e",
"database_h.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e",
"database_h.index:md5,d41d8cd98f00b204e9800998ecf8427e",
"database_mapping:md5,d41d8cd98f00b204e9800998ecf8427e",
"database_taxonomy:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,49082428ec974e4ddb09a6ca2e9f21b3"
],
"database": [
[
"database:md5,d41d8cd98f00b204e9800998ecf8427e",
"database.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e",
"database.index:md5,d41d8cd98f00b204e9800998ecf8427e",
"database.lookup:md5,d41d8cd98f00b204e9800998ecf8427e",
"database.source:md5,d41d8cd98f00b204e9800998ecf8427e",
"database.version:md5,d41d8cd98f00b204e9800998ecf8427e",
"database_h:md5,d41d8cd98f00b204e9800998ecf8427e",
"database_h.dbtype:md5,d41d8cd98f00b204e9800998ecf8427e",
"database_h.index:md5,d41d8cd98f00b204e9800998ecf8427e",
"database_mapping:md5,d41d8cd98f00b204e9800998ecf8427e",
"database_taxonomy:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,49082428ec974e4ddb09a6ca2e9f21b3"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-05T17:00:20.527628"
}
}
1 change: 0 additions & 1 deletion modules/nf-core/mmseqs/taxonomy/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ name: "mmseqs_taxonomy"
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- "bioconda::mmseqs2=15.6f452"
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,6 @@ mitohifi/mitohifi:
mmseqs/cluster:
- modules/nf-core/mmseqs/cluster/**
- tests/modules/nf-core/mmseqs/cluster/**
mmseqs/databases:
- modules/nf-core/mmseqs/databases/**
- tests/modules/nf-core/mmseqs/databases/**
mmseqs/easysearch:
- modules/nf-core/mmseqs/easysearch/**
- tests/modules/nf-core/mmseqs/easysearch/**
Expand Down
12 changes: 0 additions & 12 deletions tests/modules/nf-core/mmseqs/databases/main.nf

This file was deleted.

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

This file was deleted.

18 changes: 0 additions & 18 deletions tests/modules/nf-core/mmseqs/databases/test.yml

This file was deleted.

Loading