|
0
|
1 process DOWNLOAD_PDG_METADATA {
|
|
|
2 tag "dl_pdg_metadata.py"
|
|
|
3 label "process_pico"
|
|
|
4
|
|
|
5 module (params.enable_module ? "${params.swmodulepath}${params.fs}python${params.fs}3.8.1" : null)
|
|
|
6 conda (params.enable_conda ? "conda-forge::python=3.10.4" : null)
|
|
|
7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
|
8 'https://depot.galaxyproject.org/singularity/python:3.10.4' :
|
|
|
9 'quay.io/biocontainers/python:3.10.4' }"
|
|
|
10
|
|
|
11 input:
|
|
|
12 val pdg_release
|
|
|
13
|
|
|
14 output:
|
|
|
15 path "**${params.fs}*.metadata.tsv" , emit: pdg_metadata
|
|
|
16 path "**${params.fs}*.reference_target.cluster_list.tsv", emit: snp_cluster_metadata
|
|
|
17 path "**${params.fs}*accs_all.txt" , emit: accs
|
|
|
18 path 'versions.yml' , emit: versions
|
|
|
19
|
|
|
20 when:
|
|
|
21 task.ext.when == null || task.ext.when
|
|
|
22
|
|
|
23 script:
|
|
|
24 def args = task.ext.args ?: ''
|
|
|
25 args += (pdg_release ? " -rel ${pdg_release}" : '')
|
|
|
26 args += (params.pdg_org ? " -org ${params.pdg_org}" : '')
|
|
|
27 """
|
|
|
28 dl_pdg_metadata.py \\
|
|
|
29 $args
|
|
|
30
|
|
|
31 cat <<-END_VERSIONS > versions.yml
|
|
|
32 "${task.process}":
|
|
|
33 python: \$( python --version | sed 's/Python //g' )
|
|
|
34 END_VERSIONS
|
|
|
35 """
|
|
|
36
|
|
|
37 } |