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
35 lines (27 loc) · 1.06 KB
/
main.nf
File metadata and controls
35 lines (27 loc) · 1.06 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
process PSMCONVERSION {
tag "$meta.mzml_id"
label 'process_medium'
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/quantms-utils:0.0.23--pyh7e72e81_0' :
'biocontainers/quantms-utils:0.0.23--pyh7e72e81_0' }"
input:
tuple val(meta), path(idxml_file), path(spectrum_df)
output:
path "*_psm.parquet", emit: psm_info
path "versions.yml", emit: versions
path "*.log", emit: log
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.mzml_id}"
def string_export_decoy_psm = params.export_decoy_psm == true ? "--export_decoy_psm" : ""
"""
quantmsutilsc psmconvert --idxml "${idxml_file}" \\
--ms2_file ${spectrum_df} \\
${string_export_decoy_psm} \\
2>&1 | tee extract_idxml.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
quantms-utils: \$(pip show quantms-utils | grep "Version" | awk -F ': ' '{print \$2}')
END_VERSIONS
"""
}