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

Fix metaeuk_easypredict when using mmseqs database #3525

Merged
merged 1 commit into from
Jul 12, 2023
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
10 changes: 9 additions & 1 deletion modules/nf-core/metaeuk/easypredict/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,17 @@ process METAEUK_EASYPREDICT {
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
"""
if [ -d ${database} ]; then
## if supplying an mmseqs database as a directory, metaeuk requires the basename of the database
DBBASE=`find ${database}/ -name "*.version" -exec sh -c 'file=\$(basename {}); echo \${file%%.*}' \\;`
DB=`echo "${database}/\${DBBASE}"`
else
DB=${database}
fi

metaeuk easy-predict \\
${fasta} \\
${database} \\
\${DB} \\
${prefix} \\
tmp/ \\
${args}
Expand Down
25 changes: 21 additions & 4 deletions tests/modules/nf-core/metaeuk/easypredict/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,35 @@

nextflow.enable.dsl = 2

include { METAEUK_EASYPREDICT } from '../../../../../modules/nf-core/metaeuk/easypredict/main.nf'
include { MMSEQS_DATABASES } from '../../../../../modules/nf-core/mmseqs/databases/main.nf'
include { METAEUK_EASYPREDICT as METAEUK_EASYPREDICT_FASTA } from '../../../../../modules/nf-core/metaeuk/easypredict/main.nf'
include { METAEUK_EASYPREDICT as METAEUK_EASYPREDICT_MMSEQS } from '../../../../../modules/nf-core/metaeuk/easypredict/main.nf'

workflow test_metaeuk_easypredict {
workflow test_metaeuk_easypredict_fasta {

input = [
[ id:'test', single_end:false ], // meta map
file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
]

database = [
fasta = [
file(params.test_data['proteomics']['database']['yeast_ups'], checkIfExists: true)
]

METAEUK_EASYPREDICT ( input, database )
METAEUK_EASYPREDICT_FASTA ( input, fasta )

}

workflow test_metaeuk_easypredict_mmseqs {

input = [
[ id:'test', single_end:false ], // meta map
file(params.test_data['homo_sapiens']['genome']['genome_fasta'], checkIfExists: true)
]

MMSEQS_DATABASES ( 'UniProtKB/Swiss-Prot' )
database = MMSEQS_DATABASES.out.database

METAEUK_EASYPREDICT_MMSEQS ( input, database )

}
28 changes: 26 additions & 2 deletions tests/modules/nf-core/metaeuk/easypredict/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- name: metaeuk easypredict test_metaeuk_easypredict
command: nextflow run ./tests/modules/nf-core/metaeuk/easypredict -entry test_metaeuk_easypredict -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/metaeuk/easypredict/nextflow.config
- name: metaeuk easypredict test_metaeuk_easypredict_fasta
command: nextflow run ./tests/modules/nf-core/metaeuk/easypredict -entry test_metaeuk_easypredict_fasta -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/metaeuk/easypredict/nextflow.config
tags:
- metaeuk/easypredict
- metaeuk
Expand All @@ -13,3 +13,27 @@
- path: output/metaeuk/test.headersMap.tsv
md5sum: b3628c76d7385d326bd8a7931d974cff
- path: output/metaeuk/versions.yml

- name: metaeuk easypredict test_metaeuk_easypredict_mmseqs
command: nextflow run ./tests/modules/nf-core/metaeuk/easypredict -entry test_metaeuk_easypredict_mmseqs -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/metaeuk/easypredict/nextflow.config
tags:
- metaeuk/easypredict
- metaeuk
files:
- path: output/metaeuk/test.codon.fas
- path: output/metaeuk/test.fas
- path: output/metaeuk/test.gff
- path: output/metaeuk/test.headersMap.tsv
prototaxites marked this conversation as resolved.
Show resolved Hide resolved
- path: output/metaeuk/versions.yml
- path: output/mmseqs/mmseqs_database/database
- path: output/mmseqs/mmseqs_database/database.dbtype
- path: output/mmseqs/mmseqs_database/database.index
- path: output/mmseqs/mmseqs_database/database.lookup
- path: output/mmseqs/mmseqs_database/database.source
- path: output/mmseqs/mmseqs_database/database.version
- path: output/mmseqs/mmseqs_database/database_h
- path: output/mmseqs/mmseqs_database/database_h.dbtype
- path: output/mmseqs/mmseqs_database/database_h.index
- path: output/mmseqs/mmseqs_database/database_mapping
- path: output/mmseqs/mmseqs_database/database_taxonomy
- path: output/mmseqs/versions.yml