diff --git a/modules.json b/modules.json index b17f7dc3..be1b1dd3 100644 --- a/modules.json +++ b/modules.json @@ -124,7 +124,7 @@ }, "gtdbtk/classifywf": { "branch": "master", - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", + "git_sha": "3fb6803fd1cf5a63998216f4254d6d4e487fab21", "installed_by": ["modules"] }, "gunc/downloaddb": { diff --git a/modules/nf-core/gtdbtk/classifywf/main.nf b/modules/nf-core/gtdbtk/classifywf/main.nf index 9fc7a32d..f0944fdc 100644 --- a/modules/nf-core/gtdbtk/classifywf/main.nf +++ b/modules/nf-core/gtdbtk/classifywf/main.nf @@ -1,29 +1,25 @@ process GTDBTK_CLASSIFYWF { tag "${prefix}" label 'process_medium' - - // WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions. conda "${moduleDir}/environment.yml" - container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/gtdbtk:2.4.0--pyhdfd78af_1' : - 'biocontainers/gtdbtk:2.4.0--pyhdfd78af_1' }" + container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/gtdbtk:2.4.0--pyhdfd78af_1' : 'biocontainers/gtdbtk:2.4.0--pyhdfd78af_1'}" input: - tuple val(meta), path("bins/*") + tuple val(meta) , path("bins/*") tuple val(db_name), path("database/*") - path(mash_db) + path mash_db output: - tuple val(meta), path("gtdbtk.${prefix}.*.summary.tsv") , emit: summary - tuple val(meta), path("gtdbtk.${prefix}.*.classify.tree.gz") , emit: tree, optional: true - tuple val(meta), path("gtdbtk.${prefix}.*.markers_summary.tsv") , emit: markers, optional: true - tuple val(meta), path("gtdbtk.${prefix}.*.msa.fasta.gz") , emit: msa, optional: true - tuple val(meta), path("gtdbtk.${prefix}.*.user_msa.fasta.gz") , emit: user_msa, optional: true - tuple val(meta), path("gtdbtk.${prefix}.*.filtered.tsv") , emit: filtered, optional: true - tuple val(meta), path("gtdbtk.${prefix}.failed_genomes.tsv") , emit: failed, optional: true - tuple val(meta), path("gtdbtk.${prefix}.log") , emit: log - tuple val(meta), path("gtdbtk.${prefix}.warnings.log") , emit: warnings - path("versions.yml") , emit: versions + tuple val(meta), path("gtdbtk.${prefix}.*.summary.tsv") , emit: summary + tuple val(meta), path("gtdbtk.${prefix}.*.classify.tree.gz") , emit: tree , optional: true + tuple val(meta), path("gtdbtk.${prefix}.*.markers_summary.tsv"), emit: markers , optional: true + tuple val(meta), path("gtdbtk.${prefix}.*.msa.fasta.gz") , emit: msa , optional: true + tuple val(meta), path("gtdbtk.${prefix}.*.user_msa.fasta.gz") , emit: user_msa, optional: true + tuple val(meta), path("gtdbtk.${prefix}.*.filtered.tsv") , emit: filtered, optional: true + tuple val(meta), path("gtdbtk.${prefix}.failed_genomes.tsv") , emit: failed , optional: true + tuple val(meta), path("gtdbtk.${prefix}.log") , emit: log + tuple val(meta), path("gtdbtk.${prefix}.warnings.log") , emit: warnings + path ("versions.yml"), emit: versions when: task.ext.when == null || task.ext.when @@ -31,7 +27,7 @@ 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 mash_mode = mash_db ? "--mash_db ${mash_db}" : "--skip_ani_screen" prefix = task.ext.prefix ?: "${meta.id}" """ @@ -41,27 +37,27 @@ process GTDBTK_CLASSIFYWF { fi gtdbtk classify_wf \\ - $args \\ + ${args} \\ --genome_dir bins \\ --prefix "gtdbtk.${prefix}" \\ --out_dir "\${PWD}" \\ - --cpus $task.cpus \\ - $mash_mode \\ - $pplacer_scratch \\ - --min_perc_aa $params.gtdbtk_min_perc_aa \\ - --min_af $params.gtdbtk_min_af + --cpus ${task.cpus} \\ + ${mash_mode} \\ + ${pplacer_scratch} \\ + --min_perc_aa ${params.gtdbtk_min_perc_aa} \\ + --min_af ${params.gtdbtk_min_af} ## If mash db given, classify/ and identify/ directories won't be created - if [[ -d classify/ ]]; then + if [[ -d classify/ && \$(ls -A classify/) ]]; then mv classify/* . fi - if [[ -d identify/ ]]; then + if [[ -d identify/ && \$(ls -A identify/) ]]; then mv identify/* . fi ## If nothing aligns, no output, so only run - if [[ -d align/ ]]; then + if [[ -d align/ && \$(ls -A align/) ]]; then mv align/* . fi @@ -78,7 +74,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 @@ -93,7 +88,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 """ } diff --git a/modules/nf-core/gtdbtk/classifywf/tests/main.nf.test.snap b/modules/nf-core/gtdbtk/classifywf/tests/main.nf.test.snap index e821084c..eb0ee89a 100644 --- a/modules/nf-core/gtdbtk/classifywf/tests/main.nf.test.snap +++ b/modules/nf-core/gtdbtk/classifywf/tests/main.nf.test.snap @@ -93,7 +93,7 @@ ] ], "9": [ - "versions.yml:md5,a8ab755bce9f17684f235d49ab99f6d2" + "versions.yml:md5,2c94de2b8633b99e11881ab0193835d7" ], "failed": [ [ @@ -176,7 +176,7 @@ ] ], "versions": [ - "versions.yml:md5,a8ab755bce9f17684f235d49ab99f6d2" + "versions.yml:md5,2c94de2b8633b99e11881ab0193835d7" ], "warnings": [ [ @@ -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" } } \ No newline at end of file