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

Remove custom params in GTDBTK/CLASSIFYWF #6651

Merged
merged 4 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
13 changes: 5 additions & 8 deletions modules/nf-core/gtdbtk/classifywf/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ process GTDBTK_CLASSIFYWF {
input:
tuple val(meta) , path("bins/*")
tuple val(db_name), path("database/*")
val use_pplacer_scratch_dir
path mash_db

output:
Expand All @@ -26,8 +27,8 @@ process GTDBTK_CLASSIFYWF {

script:
def args = task.ext.args ?: ''
def pplacer_scratch = params.gtdbtk_pplacer_scratch ? "--scratch_dir pplacer_tmp" : ""
def mash_mode = mash_db ? "--mash_db ${mash_db}" : "--skip_ani_screen"
def pplacer_scratch = use_pplacer_scratch_dir ? "--scratch_dir pplacer_tmp" : ""
def mash_mode = mash_db ? "--mash_db ${mash_db}" : "--skip_ani_screen"
prefix = task.ext.prefix ?: "${meta.id}"

"""
Expand All @@ -43,9 +44,7 @@ process GTDBTK_CLASSIFYWF {
--out_dir "\${PWD}" \\
--cpus ${task.cpus} \\
${mash_mode} \\
${pplacer_scratch} \\
--min_perc_aa ${params.gtdbtk_min_perc_aa} \\
--min_af ${params.gtdbtk_min_af}
${pplacer_scratch}

## If mash db given, classify/ and identify/ directories won't be created
if [[ -d classify/ && \$(ls -A classify/) ]]; then
Expand Down Expand Up @@ -74,8 +73,6 @@ process GTDBTK_CLASSIFYWF {
"""

stub:
def VERSION = '2.3.2'
// WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
prefix = task.ext.prefix ?: "${meta.id}"
"""
touch gtdbtk.${prefix}.stub.summary.tsv
Expand All @@ -90,7 +87,7 @@ process GTDBTK_CLASSIFYWF {

cat <<-END_VERSIONS > versions.yml
"${task.process}":
gtdbtk: \$(echo "${VERSION}")
gtdbtk: \$(echo \$(gtdbtk --version -v 2>&1) | sed "s/gtdbtk: version //; s/ Copyright.*//")
END_VERSIONS
"""
}
3 changes: 3 additions & 0 deletions modules/nf-core/gtdbtk/classifywf/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ input:
type: file
description: The local copy of the taxonomic database used by GTDB-tk (unzipped copy)
pattern: "*"
- use_pplacer_scratch_dir:
SPPearce marked this conversation as resolved.
Show resolved Hide resolved
type: boolean
description: Set to true to reduce pplacer memory usage by writing to disk (slower)
- mash_db:
type: file
description: The local copy of the Mash sketch database used by GTDB-tk if `ani_screen` mode is used (optional)
Expand Down
8 changes: 4 additions & 4 deletions modules/nf-core/gtdbtk/classifywf/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
]
],
"9": [
"versions.yml:md5,a8ab755bce9f17684f235d49ab99f6d2"
"versions.yml:md5,2c94de2b8633b99e11881ab0193835d7"
],
"failed": [
[
Expand Down Expand Up @@ -176,7 +176,7 @@
]
],
"versions": [
"versions.yml:md5,a8ab755bce9f17684f235d49ab99f6d2"
"versions.yml:md5,2c94de2b8633b99e11881ab0193835d7"
],
"warnings": [
[
Expand All @@ -192,8 +192,8 @@
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
"nextflow": "24.04.4"
},
"timestamp": "2024-03-26T09:39:21.632259941"
"timestamp": "2024-09-16T11:46:32.337929018"
}
}
Loading