2022-01-17 10:46:15 +00:00
|
|
|
process NEXTCLADE_DATASETGET {
|
|
|
|
tag "$dataset"
|
|
|
|
label 'process_low'
|
|
|
|
|
2022-07-07 13:48:04 +00:00
|
|
|
conda (params.enable_conda ? "bioconda::nextclade=2.2.0" : null)
|
2022-01-17 10:46:15 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
2022-07-07 13:48:04 +00:00
|
|
|
'https://depot.galaxyproject.org/singularity/nextclade:2.2.0--h9ee0642_0' :
|
|
|
|
'quay.io/biocontainers/nextclade:2.2.0--h9ee0642_0' }"
|
2022-01-17 10:46:15 +00:00
|
|
|
|
|
|
|
input:
|
|
|
|
val dataset
|
|
|
|
val reference
|
|
|
|
val tag
|
|
|
|
|
|
|
|
output:
|
|
|
|
path "$prefix" , emit: dataset
|
|
|
|
path "versions.yml", emit: versions
|
|
|
|
|
2022-02-04 08:53:32 +00:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
2022-01-17 10:46:15 +00:00
|
|
|
script:
|
|
|
|
def args = task.ext.args ?: ''
|
|
|
|
prefix = task.ext.prefix ?: "${dataset}"
|
|
|
|
def fasta = reference ? "--reference ${reference}" : ''
|
|
|
|
def version = tag ? "--tag ${tag}" : ''
|
|
|
|
"""
|
|
|
|
nextclade \\
|
|
|
|
dataset \\
|
|
|
|
get \\
|
|
|
|
$args \\
|
|
|
|
--name $dataset \\
|
|
|
|
$fasta \\
|
|
|
|
$version \\
|
|
|
|
--output-dir $prefix
|
|
|
|
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
|
|
"${task.process}":
|
2022-07-07 13:48:04 +00:00
|
|
|
nextclade: \$(echo \$(nextclade --version 2>&1) | sed 's/^.*nextclade //; s/ .*\$//')
|
2022-01-17 10:46:15 +00:00
|
|
|
END_VERSIONS
|
|
|
|
"""
|
|
|
|
}
|