annotate dialignr.R @ 0:e043b4b07470 draft default tip

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
author galaxyp
date Wed, 30 Dec 2020 20:12:32 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
1 library(DIAlignR)
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
2
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
3 ## Parse command line arguments
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
4 args <- commandArgs(trailingOnly = TRUE)
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
5
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
6 hh <- paste(unlist(args), collapse = " ")
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
7 listoptions <- unlist(strsplit(hh, "--"))[-1]
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
8 options.args <- sapply(listoptions, function(x) {
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
9 unlist(strsplit(x, " "))[-1]
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
10 })
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
11 options.names <- sapply(listoptions, function(x) {
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
12 option <- unlist(strsplit(x, " "))[1]
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
13 })
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
14 names(options.args) <- unlist(options.names)
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
15 ##
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
16
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
17 data_path <- "./data/"
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
18 runs_file_path <- "./runs.txt"
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
19
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
20 runs <- readLines(runs_file_path)
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
21
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
22 alignTargetedRuns(dataPath = data_path,
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
23 outFile = "alignedTargetedRuns.csv",
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
24 runs = runs,
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
25 oswMerged = as.logical(options.args["oswMerged"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
26 maxFdrQuery = as.numeric(options.args["maxFdrQuery"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
27 XICfilter = options.args["XICfilter"],
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
28 polyOrd = as.integer(options.args["polyOrd"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
29 kernelLen = as.integer(options.args["kernelLen"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
30 globalAlignment = options.args["globalAlignment"],
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
31 globalAlignmentFdr = as.numeric(options.args["globalAlignmentFdr"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
32 globalAlignmentSpan = as.numeric(options.args["globalAlignmentSpan"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
33 RSEdistFactor = as.numeric(options.args["RSEdistFactor"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
34 normalization = options.args["normalization"],
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
35 simMeasure = options.args["simMeasure"],
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
36 alignType = options.args["alignType"],
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
37 goFactor = as.numeric(options.args["goFactor"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
38 geFactor = as.numeric(options.args["geFactor"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
39 cosAngleThresh = as.numeric(options.args["cosAngleThresh"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
40 OverlapAlignment = as.logical(options.args["OverlapAlignment"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
41 dotProdThresh = as.numeric(options.args["dotProdThresh"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
42 gapQuantile = as.numeric(options.args["gapQuantile"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
43 hardConstrain = as.logical(options.args["hardConstrain"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
44 samples4gradient = as.numeric(options.args["samples4gradient"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
45 analyteFDR = as.numeric(options.args["analyteFDR"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
46 unalignedFDR = as.numeric(options.args["unalignedFDR"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
47 alignedFDR = as.numeric(options.args["alignedFDR"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
48 baselineType = options.args["baselineType"],
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
49 integrationType = options.args["integrationType"],
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
50 fitEMG = as.logical(options.args["fitEMG"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
51 recalIntensity = as.logical(options.args["recalIntensity"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
52 fillMissing = as.logical(options.args["fillMissing"]),
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
53 smoothPeakArea = as.logical(options.args["smoothPeakArea"])
e043b4b07470 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff changeset
54 )