Skip to content

Commit

Permalink
Remove custom params in GTDBTK/CLASSIFYWF (nf-core#6651)
Browse files Browse the repository at this point in the history
* Use the proper version calling now implemented

* Remove custom params

* Fix test
  • Loading branch information
jfy133 authored and Helle Rus Povlsen committed Oct 2, 2024
1 parent a924fc4 commit ba1eab2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
9 changes: 4 additions & 5 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
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:
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
7 changes: 3 additions & 4 deletions modules/nf-core/gtdbtk/classifywf/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ nextflow_process {
]
]
input[1] = [[], []]
input[2] = []
input[2] = false
input[3] = []
"""
}
}
Expand All @@ -35,9 +36,7 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
)
}

}

}

0 comments on commit ba1eab2

Please sign in to comment.