Mercurial > repos > galaxyp > dialignr
annotate dialignr.R @ 0:fbbbf8c145fc 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:57 +0000 |
parents | |
children |
rev | line source |
---|---|
0
fbbbf8c145fc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff
changeset
|
1 library(DIAlignR) |
fbbbf8c145fc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff
changeset
|
2 |
fbbbf8c145fc
"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 |
fbbbf8c145fc
"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) |
fbbbf8c145fc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff
changeset
|
5 |
fbbbf8c145fc
"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 = " ") |
fbbbf8c145fc
"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] |
fbbbf8c145fc
"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) { |
fbbbf8c145fc
"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] |
fbbbf8c145fc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff
changeset
|
10 }) |
fbbbf8c145fc
"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) { |
fbbbf8c145fc
"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] |
fbbbf8c145fc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff
changeset
|
13 }) |
fbbbf8c145fc
"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) |
fbbbf8c145fc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff
changeset
|
15 ## |
fbbbf8c145fc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff
changeset
|
16 |
fbbbf8c145fc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff
changeset
|
17 data_path <- "./data/" |
fbbbf8c145fc
"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" |
fbbbf8c145fc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff
changeset
|
19 |
fbbbf8c145fc
"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) |
fbbbf8c145fc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff
changeset
|
21 |
fbbbf8c145fc
"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, |
fbbbf8c145fc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff
changeset
|
23 outFile = "alignedTargetedRuns.csv", |
fbbbf8c145fc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff
changeset
|
24 runs = runs, |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"], |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"], |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"], |
fbbbf8c145fc
"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"], |
fbbbf8c145fc
"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"], |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"], |
fbbbf8c145fc
"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"], |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]), |
fbbbf8c145fc
"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"]) |
fbbbf8c145fc
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/dialignr commit 8dd046346db8261c462e2f3f5b4ff7f2433348df"
galaxyp
parents:
diff
changeset
|
54 ) |