nf-core_modules/modules/ngmaster/main.nf
Robert A. Petit III 4bd530135f
add ngmaster module (#1024)
* add ngmaster module

* add docker container

Co-authored-by: Gregor Sturm <mail@gregor-sturm.de>
2021-11-10 11:25:50 -07:00

41 lines
1.4 KiB
Text

// Import generic module functions
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
params.options = [:]
options = initOptions(params.options)
process NGMASTER {
tag "$meta.id"
label 'process_low'
publishDir "${params.outdir}",
mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:meta, publish_by_meta:['id']) }
conda (params.enable_conda ? "bioconda::ngmaster=0.5.8" : null)
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
container "https://depot.galaxyproject.org/singularity/ngmaster:0.5.8--pyhdfd78af_1"
} else {
container "quay.io/biocontainers/ngmaster:0.5.8--pyhdfd78af_1"
}
input:
tuple val(meta), path(fasta)
output:
tuple val(meta), path("*.tsv"), emit: tsv
path "versions.yml" , emit: versions
script:
def prefix = options.suffix ? "${meta.id}${options.suffix}" : "${meta.id}"
"""
ngmaster \\
$options.args \\
$fasta \\
> ${prefix}.tsv
cat <<-END_VERSIONS > versions.yml
${getProcessName(task.process)}:
${getSoftwareName(task.process)}: \$( echo \$(ngmaster --version 2>&1) | sed 's/^.*ngmaster //' )
END_VERSIONS
"""
}