mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 13:43:09 +00:00
7b3315591a
* Remove def software line * Replace version with versions in emit statement * Fix default software names
48 lines
1.7 KiB
Text
48 lines
1.7 KiB
Text
// Import generic module functions
|
|
include { initOptions; saveFiles; getSoftwareName; getProcessName } from './functions'
|
|
|
|
params.options = [:]
|
|
options = initOptions(params.options)
|
|
|
|
def VERSION = '2.3.2' // No version information printed
|
|
|
|
process RAPIDNJ {
|
|
label 'process_medium'
|
|
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:[]) }
|
|
|
|
conda (params.enable_conda ? "bioconda::rapidnj=2.3.2 conda-forge::biopython=1.78" : null)
|
|
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) {
|
|
container "https://depot.galaxyproject.org/singularity/mulled-v2-805c6e0f138f952f9c61cdd57c632a1a263ea990:3c52e4c8da6b3e4d69b9ca83fa4d366168898179-0"
|
|
} else {
|
|
container "quay.io/biocontainers/mulled-v2-805c6e0f138f952f9c61cdd57c632a1a263ea990:3c52e4c8da6b3e4d69b9ca83fa4d366168898179-0"
|
|
}
|
|
|
|
input:
|
|
path alignment
|
|
|
|
output:
|
|
path "*.sth" , emit: stockholm_alignment
|
|
path "*.tre" , emit: phylogeny
|
|
path "versions.yml", emit: versions
|
|
|
|
script:
|
|
"""
|
|
python \\
|
|
-c 'from Bio import SeqIO; SeqIO.convert("$alignment", "fasta", "alignment.sth", "stockholm")'
|
|
|
|
rapidnj \\
|
|
alignment.sth \\
|
|
$options.args \\
|
|
-i sth \\
|
|
-c $task.cpus \\
|
|
-x rapidnj_phylogeny.tre
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
${getProcessName(task.process)}:
|
|
${getSoftwareName(task.process)}: \$(echo $VERSION)
|
|
biopython: \$(python -c "import Bio; print(Bio.__version__)")
|
|
END_VERSIONS
|
|
"""
|
|
}
|