2021-04-14 07:38:59 +00:00
|
|
|
// Import generic module functions
|
2021-09-27 08:41:24 +00:00
|
|
|
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
2021-04-14 07:38:59 +00:00
|
|
|
|
|
|
|
params.options = [:]
|
|
|
|
options = initOptions(params.options)
|
|
|
|
|
|
|
|
process RAXMLNG {
|
2021-04-28 19:21:44 +00:00
|
|
|
label 'process_high'
|
2021-04-14 07:38:59 +00:00
|
|
|
publishDir "${params.outdir}",
|
|
|
|
mode: params.publish_dir_mode,
|
|
|
|
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), meta:[:], publish_by_meta:[]) }
|
|
|
|
|
2021-07-28 08:10:44 +00:00
|
|
|
conda (params.enable_conda ? 'bioconda::raxml-ng=1.0.3' : null)
|
2021-04-14 07:38:59 +00:00
|
|
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
2021-07-28 08:10:44 +00:00
|
|
|
container "https://depot.galaxyproject.org/singularity/raxml-ng:1.0.3--h32fcf60_0"
|
2021-04-14 07:38:59 +00:00
|
|
|
} else {
|
2021-07-28 08:10:44 +00:00
|
|
|
container "quay.io/biocontainers/raxml-ng:1.0.3--h32fcf60_0"
|
2021-04-14 07:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
input:
|
|
|
|
path alignment
|
|
|
|
|
|
|
|
output:
|
|
|
|
path "*.raxml.bestTree", emit: phylogeny
|
|
|
|
path "*.raxml.support" , optional:true, emit: phylogeny_bootstrapped
|
2021-09-27 08:41:24 +00:00
|
|
|
path "versions.yml" , emit: version
|
2021-04-14 07:38:59 +00:00
|
|
|
|
|
|
|
script:
|
|
|
|
def software = getSoftwareName(task.process)
|
|
|
|
"""
|
|
|
|
raxml-ng \\
|
|
|
|
$options.args \\
|
|
|
|
--msa $alignment \\
|
|
|
|
--threads $task.cpus \\
|
|
|
|
--prefix output
|
|
|
|
|
2021-09-27 08:41:24 +00:00
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
|
|
${getProcessName(task.process)}:
|
|
|
|
${getSoftwareName(task.process)}: \$(raxml-ng --version 2>&1 | sed 's/^.*RAxML-NG v. //; s/released.*\$//')
|
|
|
|
END_VERSIONS
|
2021-04-14 07:38:59 +00:00
|
|
|
"""
|
|
|
|
}
|