forked from bigbio/quantms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.nf
More file actions
49 lines (42 loc) · 1.32 KB
/
main.nf
File metadata and controls
49 lines (42 loc) · 1.32 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
process THERMORAWFILEPARSER {
tag "$meta.mzml_id"
label 'process_low'
label 'process_single'
label 'error_retry'
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/thermorawfileparser:1.3.4--ha8f3691_0' :
'biocontainers/thermorawfileparser:1.3.4--ha8f3691_0' }"
stageInMode {
if (task.attempt == 1) {
if (executor == "awsbatch") {
'symlink'
} else {
'link'
}
} else if (task.attempt == 2) {
if (executor == "awsbatch") {
'copy'
} else {
'symlink'
}
} else {
'copy'
}
}
input:
tuple val(meta), path(rawfile)
output:
tuple val(meta), path("*.mzML"), emit: mzmls_converted
path "versions.yml", emit: versions
path "*.log", emit: log
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.mzml_id}"
"""
ThermoRawFileParser.sh -i=${rawfile} -f=2 -o=./ 2>&1 | tee ${rawfile.baseName}_conversion.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
ThermoRawFileParser: \$(ThermoRawFileParser.sh --version)
END_VERSIONS
"""
}