2021-10-26 20:54:10 +00:00
|
|
|
process CHECKM_LINEAGEWF {
|
|
|
|
tag "$meta.id"
|
|
|
|
label 'process_medium'
|
|
|
|
|
2022-09-28 12:48:18 +00:00
|
|
|
conda (params.enable_conda ? "bioconda::checkm-genome=1.2.1" : null)
|
2021-11-26 07:58:40 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
2022-09-28 12:48:18 +00:00
|
|
|
'https://depot.galaxyproject.org/singularity/checkm-genome:1.2.1--pyhdfd78af_0' :
|
|
|
|
'quay.io/biocontainers/checkm-genome:1.2.1--pyhdfd78af_0' }"
|
2021-10-26 20:54:10 +00:00
|
|
|
|
|
|
|
input:
|
|
|
|
tuple val(meta), path(fasta)
|
|
|
|
val fasta_ext
|
2022-09-28 12:48:18 +00:00
|
|
|
path db
|
2021-10-26 20:54:10 +00:00
|
|
|
|
|
|
|
output:
|
2022-09-30 13:50:47 +00:00
|
|
|
tuple val(meta), path("${prefix}") , emit: checkm_output
|
|
|
|
tuple val(meta), path("${prefix}/lineage.ms"), emit: marker_file
|
|
|
|
tuple val(meta), path("${prefix}.tsv") , emit: checkm_tsv
|
|
|
|
path "versions.yml" , emit: versions
|
2021-10-26 20:54:10 +00:00
|
|
|
|
2022-02-04 08:53:32 +00:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
2021-10-26 20:54:10 +00:00
|
|
|
script:
|
2022-09-28 12:48:18 +00:00
|
|
|
def args = task.ext.args ?: ''
|
|
|
|
prefix = task.ext.prefix ?: "${meta.id}"
|
|
|
|
checkm_db = db ? "export CHECKM_DATA_PATH=${db}" : ""
|
2021-10-26 20:54:10 +00:00
|
|
|
"""
|
2022-09-28 12:48:18 +00:00
|
|
|
$checkm_db
|
|
|
|
|
2021-10-26 20:54:10 +00:00
|
|
|
checkm \\
|
|
|
|
lineage_wf \\
|
|
|
|
-t $task.cpus \\
|
|
|
|
-f ${prefix}.tsv \\
|
|
|
|
--tab_table \\
|
|
|
|
--pplacer_threads $task.cpus \\
|
|
|
|
-x $fasta_ext \\
|
2021-11-26 07:58:40 +00:00
|
|
|
$args \\
|
2021-10-26 20:54:10 +00:00
|
|
|
. \\
|
|
|
|
$prefix
|
|
|
|
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 07:58:40 +00:00
|
|
|
"${task.process}":
|
|
|
|
checkm: \$( checkm 2>&1 | grep '...:::' | sed 's/.*CheckM v//;s/ .*//' )
|
2021-10-26 20:54:10 +00:00
|
|
|
END_VERSIONS
|
|
|
|
"""
|
|
|
|
}
|