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
40 lines (32 loc) · 1.36 KB
/
main.nf
File metadata and controls
40 lines (32 loc) · 1.36 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
process PSMCLEAN {
tag "$meta.mzml_id"
label 'process_high'
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/quantms-rescoring:0.0.10--pyhdfd78af_0' :
'biocontainers/quantms-rescoring:0.0.10--pyhdfd78af_0' }"
// userEmulation settings when docker is specified
containerOptions = (workflow.containerEngine == 'docker') ? '-u $(id -u) -e "HOME=${HOME}" -v /etc/passwd:/etc/passwd:ro -v /etc/shadow:/etc/shadow:ro -v /etc/group:/etc/group:ro -v $HOME:$HOME' : ''
input:
tuple val(meta), path(idxml), path(mzml)
output:
tuple val(meta), path("*clean.idXML") , emit: idxml
path "versions.yml" , emit: versions
path "*.log" , emit: log
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.mzml_id}_clean"
"""
rescoring psm_feature_clean \\
--idxml $idxml \\
--mzml $mzml \\
--output ${idxml.baseName}_clean.idXML \\
$args \\
2>&1 | tee ${idxml.baseName}_clean.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
quantms-rescoring: \$(rescoring --version 2>&1 | grep -Eo '[0-9]+\\.[0-9]+\\.[0-9]+')
END_VERSIONS
"""
}