mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 19:18:17 +00:00
03de60e6fa
* Bump checkM version and add support for pre-defined database * Add markfile output to checkm/lineagewf and add checkm/qa * Remove unnecessary BAM from tests * Fix channels to ensure single meta * Blah * Use secondary name evwyhere * Remove second incovcatiojn * Don't run module directrly for join * And for the other test * Correct module name * Fix name again * Try and fix out_format 9 not being picked up * Contains to matches to allow regex * Fix tests (finally) * Fix verisoning * [automated] Fix linting with Prettier * Update modules/checkm/qa/main.nf Co-authored-by: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com> Co-authored-by: nf-core-bot <core@nf-co.re> Co-authored-by: nvnieuwk <101190534+nvnieuwk@users.noreply.github.com>
44 lines
1.5 KiB
Text
44 lines
1.5 KiB
Text
process CHECKM_QA {
|
|
tag "$meta.id"
|
|
label 'process_low'
|
|
|
|
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.2.1--pyhdfd78af_0' :
|
|
'quay.io/biocontainers/checkm-genome:1.2.1--pyhdfd78af_0' }"
|
|
|
|
input:
|
|
tuple val(meta), path(analysis_dir), path(marker_file), path(coverage_file)
|
|
path exclude_marker_file
|
|
|
|
output:
|
|
tuple val(meta), path("${prefix}.txt") , optional: true, emit: output
|
|
tuple val(meta), path("${prefix}.fasta"), optional: true, emit: fasta
|
|
path "versions.yml" , emit: versions
|
|
|
|
when:
|
|
task.ext.when == null || task.ext.when
|
|
|
|
script:
|
|
def args = task.ext.args ?: ''
|
|
prefix = task.ext.prefix ?: "${meta.id}"
|
|
suffix = task.ext.args?.matches(".*-o 9.*|.*--out_file 9.*") ? "fasta" : "txt"
|
|
def coverage = coverage_file ? "--coverage_file ${coverage_file}" : ""
|
|
def exclude = exclude_marker_file ? "--exclude_markers ${marker_filer}" : ""
|
|
"""
|
|
checkm \\
|
|
qa \\
|
|
--threads ${task.cpus} \\
|
|
--file ${prefix}.${suffix} \\
|
|
$marker_file \\
|
|
$analysis_dir \\
|
|
$coverage \\
|
|
$exclude \\
|
|
$args
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
checkm: \$( checkm 2>&1 | grep '...:::' | sed 's/.*CheckM v//;s/ .*//' )
|
|
END_VERSIONS
|
|
"""
|
|
}
|