From 0ab15c5ee9050b225e732a8155c9950831cc33a1 Mon Sep 17 00:00:00 2001 From: "James A. Fellows Yates" Date: Wed, 28 Sep 2022 14:48:18 +0200 Subject: [PATCH] Update checkM version and add support for pre-defined database (#2125) Bump checkM version and add support for pre-defined database Co-authored-by: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> --- modules/checkm/lineagewf/main.nf | 14 +++++++++----- modules/checkm/lineagewf/meta.yml | 3 +++ tests/modules/checkm/lineagewf/main.nf | 4 ++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/modules/checkm/lineagewf/main.nf b/modules/checkm/lineagewf/main.nf index d92f2c78..66e2e222 100644 --- a/modules/checkm/lineagewf/main.nf +++ b/modules/checkm/lineagewf/main.nf @@ -2,14 +2,15 @@ process CHECKM_LINEAGEWF { tag "$meta.id" label 'process_medium' - conda (params.enable_conda ? "bioconda::checkm-genome=1.1.3" : null) + conda (params.enable_conda ? "bioconda::checkm-genome=1.2.1" : null) container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/checkm-genome:1.1.3--py_1' : - 'quay.io/biocontainers/checkm-genome:1.1.3--py_1' }" + 'https://depot.galaxyproject.org/singularity/checkm-genome:1.2.1--pyhdfd78af_0' : + 'quay.io/biocontainers/checkm-genome:1.2.1--pyhdfd78af_0' }" input: tuple val(meta), path(fasta) val fasta_ext + path db output: tuple val(meta), path("${prefix}") , emit: checkm_output @@ -20,9 +21,12 @@ process CHECKM_LINEAGEWF { task.ext.when == null || task.ext.when script: - def args = task.ext.args ?: '' - prefix = task.ext.prefix ?: "${meta.id}" + def args = task.ext.args ?: '' + prefix = task.ext.prefix ?: "${meta.id}" + checkm_db = db ? "export CHECKM_DATA_PATH=${db}" : "" """ + $checkm_db + checkm \\ lineage_wf \\ -t $task.cpus \\ diff --git a/modules/checkm/lineagewf/meta.yml b/modules/checkm/lineagewf/meta.yml index bcdb472f..6cfec189 100644 --- a/modules/checkm/lineagewf/meta.yml +++ b/modules/checkm/lineagewf/meta.yml @@ -34,6 +34,9 @@ input: - fasta_ext: type: value description: The file-type extension suffix of the input FASTA files (e.g., fasta, fna, fa, fas) + - db: + type: directory + description: Optional directory pointing to checkM database to prevent re-downloading output: - meta: diff --git a/tests/modules/checkm/lineagewf/main.nf b/tests/modules/checkm/lineagewf/main.nf index e914774c..cb7c7bae 100644 --- a/tests/modules/checkm/lineagewf/main.nf +++ b/tests/modules/checkm/lineagewf/main.nf @@ -10,7 +10,7 @@ workflow test_checkm_lineagewf { file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true) ] fasta_ext = 'fasta' - CHECKM_LINEAGEWF ( input, fasta_ext ) + CHECKM_LINEAGEWF ( input, fasta_ext, [] ) } workflow test_checkm_lineagewf_multi { @@ -20,5 +20,5 @@ workflow test_checkm_lineagewf_multi { file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)] ] fasta_ext = 'fasta' - CHECKM_LINEAGEWF ( input, fasta_ext ) + CHECKM_LINEAGEWF ( input, fasta_ext, [] ) }