2021-05-06 14:48:15 +00:00
|
|
|
process NEXTCLADE {
|
|
|
|
tag "$meta.id"
|
|
|
|
label 'process_low'
|
|
|
|
|
2021-06-09 13:12:21 +00:00
|
|
|
conda (params.enable_conda ? "bioconda::nextclade_js=0.14.4" : null)
|
2021-11-26 07:58:40 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
|
|
'https://depot.galaxyproject.org/singularity/nextclade_js:0.14.4--h9ee0642_0' :
|
|
|
|
'quay.io/biocontainers/nextclade_js:0.14.4--h9ee0642_0' }"
|
2021-05-06 14:48:15 +00:00
|
|
|
|
|
|
|
input:
|
|
|
|
tuple val(meta), path(fasta)
|
|
|
|
|
|
|
|
output:
|
2021-07-28 18:49:50 +00:00
|
|
|
tuple val(meta), path("${prefix}.csv") , emit: csv
|
|
|
|
tuple val(meta), path("${prefix}.json") , emit: json
|
|
|
|
tuple val(meta), path("${prefix}.tree.json") , emit: json_tree
|
|
|
|
tuple val(meta), path("${prefix}.tsv") , emit: tsv
|
2021-05-06 14:48:15 +00:00
|
|
|
tuple val(meta), path("${prefix}.clades.tsv"), optional:true, emit: tsv_clades
|
2021-10-01 13:04:56 +00:00
|
|
|
path "versions.yml" , emit: versions
|
2021-05-06 14:48:15 +00:00
|
|
|
|
|
|
|
script:
|
2021-12-07 14:00:43 +00:00
|
|
|
def args = task.ext.args ?: ''
|
|
|
|
prefix = task.ext.prefix ?: "${meta.id}"
|
2021-05-06 14:48:15 +00:00
|
|
|
"""
|
|
|
|
nextclade \\
|
2021-11-26 07:58:40 +00:00
|
|
|
$args \\
|
2021-05-06 14:48:15 +00:00
|
|
|
--jobs $task.cpus \\
|
|
|
|
--input-fasta $fasta \\
|
2021-07-28 18:49:50 +00:00
|
|
|
--output-json ${prefix}.json \\
|
|
|
|
--output-csv ${prefix}.csv \\
|
|
|
|
--output-tsv ${prefix}.tsv \\
|
|
|
|
--output-tsv-clades-only ${prefix}.clades.tsv \\
|
|
|
|
--output-tree ${prefix}.tree.json
|
2021-05-06 14:48:15 +00:00
|
|
|
|
2021-09-27 08:41:24 +00:00
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 07:58:40 +00:00
|
|
|
"${task.process}":
|
|
|
|
nextclade: \$(nextclade --version 2>&1)
|
2021-09-27 08:41:24 +00:00
|
|
|
END_VERSIONS
|
2021-05-06 14:48:15 +00:00
|
|
|
"""
|
|
|
|
}
|