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
44 lines (38 loc) · 1.54 KB
/
main.nf
File metadata and controls
44 lines (38 loc) · 1.54 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
process MSSTATS_LFQ {
tag "$msstats_csv_input.Name"
label 'process_medium'
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/bioconductor-msstats:4.14.0--r44he5774e6_0' :
'biocontainers/bioconductor-msstats:4.14.0--r44he5774e6_0' }"
input:
path msstats_csv_input
output:
// The generation of the PDFs from MSstats are very unstable, especially with auto-contrasts.
// And users can easily fix anything based on the csv and the included script -> make optional
path "*.pdf" optional true
path "*.csv", emit: msstats_csv
path "*.log", emit: log
path "versions.yml" , emit: versions
script:
def args = task.ext.args ?: ''
ref_con = params.ref_condition ?: ""
"""
msstats_plfq.R \\
${msstats_csv_input} \\
"${params.contrasts}" \\
"${ref_con}" \\
${params.msstats_remove_one_feat_prot} \\
${params.msstatslfq_removeFewMeasurements} \\
${params.msstatslfq_feature_subset_protein} \\
${params.msstatslfq_quant_summary_method} \\
${msstats_csv_input.baseName} \\
${params.msstats_threshold} \\
$args \\
2>&1 | tee msstats.log
cat <<-END_VERSIONS > versions.yml
"${task.process}":
r-base: \$(echo \$(R --version 2>&1) | sed 's/^.*R version //; s/ .*\$//')
bioconductor-msstats: \$(Rscript -e "library(MSstats); cat(as.character(packageVersion('MSstats')))")
END_VERSIONS
"""
}