-
Notifications
You must be signed in to change notification settings - Fork 72
/
main.nf
33 lines (27 loc) · 819 Bytes
/
main.nf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
process SRA_IDS_TO_RUNINFO {
tag "$id"
label 'error_retry'
conda "conda-forge::python=3.9.5"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/python:3.9--1' :
'biocontainers/python:3.9--1' }"
input:
val id
val fields
output:
path "*.tsv" , emit: tsv
path "versions.yml", emit: versions
script:
def metadata_fields = fields ? "--ena_metadata_fields ${fields}" : ''
"""
echo $id > id.txt
sra_ids_to_runinfo.py \\
id.txt \\
${id}.runinfo.tsv \\
$metadata_fields
cat <<-END_VERSIONS > versions.yml
"${task.process}":
python: \$(python --version | sed 's/Python //g')
END_VERSIONS
"""
}