Mercurial > repos > mmonsoor > camera_combinexsannos
annotate CAMERA.r @ 8:198b035d4848 draft
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
author | lecorguille |
---|---|
date | Fri, 07 Apr 2017 07:42:38 -0400 |
parents | 87570e9b71f5 |
children | 837c6955e4e9 |
rev | line source |
---|---|
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
1 #!/usr/bin/env Rscript |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
2 # CAMERA.r version="2.2.1" |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
3 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
4 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
5 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
6 # ----- PACKAGE ----- |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
7 cat("\tPACKAGE INFO\n") |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
8 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
9 setRepositories(graphics=F, ind=31) |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
10 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
11 #pkgs=c("xcms","batch") |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
12 pkgs=c("parallel","BiocGenerics", "Biobase", "Rcpp", "mzR", "xcms","snow","igraph","CAMERA","multtest","batch") |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
13 for(p in pkgs) { |
8
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
14 suppressPackageStartupMessages(suppressWarnings(library(p, quietly=TRUE, logical.return=TRUE, character.only=TRUE))) |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
15 cat(p,"\t",as.character(packageVersion(p)),"\n",sep="") |
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
16 } |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
17 source_local <- function(fname){ argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep="/")) } |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
18 |
8
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
19 cat("\n\n"); |
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
20 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
21 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
22 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
23 # ----- ARGUMENTS ----- |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
24 cat("\tARGUMENTS INFO\n") |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
25 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
26 listArguments = parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
27 write.table(as.matrix(listArguments), col.names=F, quote=F, sep='\t') |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
28 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
29 cat("\n\n"); |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
30 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
31 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
32 # ----- PROCESSING INFILE ----- |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
33 cat("\tINFILE PROCESSING INFO\n") |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
34 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
35 #image is an .RData file necessary to use xset variable given by previous tools |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
36 if (!is.null(listArguments[["image"]])){ |
8
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
37 load(listArguments[["image"]]); listArguments[["image"]]=NULL |
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
38 } |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
39 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
40 if (listArguments[["xfunction"]] %in% c("combinexsAnnos")) { |
8
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
41 load(listArguments[["image_pos"]]) |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
42 xaP=xa |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
43 listOFlistArgumentsP=listOFlistArguments |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
44 if (exists("xsAnnotate_object")) xaP=xsAnnotate_object |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
45 |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
46 diffrepP=NULL |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
47 if (exists("diffrep")) diffrepP=diffrep |
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
48 |
8
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
49 load(listArguments[["image_neg"]]) |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
50 xaN=xa |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
51 listOFlistArgumentsN=listOFlistArguments |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
52 if (exists("xsAnnotate_object")) xaN=xsAnnotate_object |
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
53 |
8
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
54 diffrepN=NULL |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
55 if (exists("diffrep")) diffrepN=diffrep |
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
56 } |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
57 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
58 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
59 cat("\n\n") |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
60 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
61 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
62 # ----- ARGUMENTS PROCESSING ----- |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
63 cat("\tARGUMENTS PROCESSING INFO\n") |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
64 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
65 # Save arguments to generate a report |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
66 if (!exists("listOFlistArguments")) listOFlistArguments=list() |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
67 listOFlistArguments[[paste(format(Sys.time(), "%y%m%d-%H:%M:%S_"),listArguments[["xfunction"]],sep="")]] = listArguments |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
68 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
69 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
70 #saving the commun parameters |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
71 thefunction = listArguments[["xfunction"]] |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
72 listArguments[["xfunction"]]=NULL #delete from the list of arguments |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
73 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
74 xsetRdataOutput = paste(thefunction,"RData",sep=".") |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
75 if (!is.null(listArguments[["xsetRdataOutput"]])){ |
8
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
76 xsetRdataOutput = listArguments[["xsetRdataOutput"]]; listArguments[["xsetRdataOutput"]]=NULL |
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
77 } |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
78 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
79 rplotspdf = "Rplots.pdf" |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
80 if (!is.null(listArguments[["rplotspdf"]])){ |
8
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
81 rplotspdf = listArguments[["rplotspdf"]]; listArguments[["rplotspdf"]]=NULL |
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
82 } |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
83 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
84 dataMatrixOutput = "dataMatrix.tsv" |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
85 if (!is.null(listArguments[["dataMatrixOutput"]])){ |
8
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
86 dataMatrixOutput = listArguments[["dataMatrixOutput"]]; listArguments[["dataMatrixOutput"]]=NULL |
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
87 } |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
88 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
89 variableMetadataOutput = "variableMetadata.tsv" |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
90 if (!is.null(listArguments[["variableMetadataOutput"]])){ |
8
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
91 variableMetadataOutput = listArguments[["variableMetadataOutput"]]; listArguments[["variableMetadataOutput"]]=NULL |
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
92 } |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
93 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
94 #Import the different functions |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
95 source_local("lib.r") |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
96 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
97 # We unzip automatically the chromatograms from the zip files. |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
98 if (thefunction %in% c("annotatediff")) { |
8
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
99 if (!exists("zipfile")) zipfile=NULL |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
100 if (!exists("singlefile")) singlefile=NULL |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
101 rawFilePath = getRawfilePathFromArguments(singlefile, zipfile, listArguments) |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
102 zipfile = rawFilePath$zipfile |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
103 singlefile = rawFilePath$singlefile |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
104 listArguments = rawFilePath$listArguments |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
105 directory = retrieveRawfileInTheWorkingDirectory(singlefile, zipfile) |
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
106 } |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
107 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
108 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
109 #addition of xset object to the list of arguments in the first position |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
110 if (exists("xset") != 0){ |
8
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
111 listArguments=append(list(xset), listArguments) |
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
112 } |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
113 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
114 cat("\n\n") |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
115 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
116 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
117 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
118 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
119 # ----- PROCESSING INFO ----- |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
120 cat("\tMAIN PROCESSING INFO\n") |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
121 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
122 #change the default display settings |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
123 pdf(file=rplotspdf, width=16, height=12) |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
124 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
125 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
126 if (thefunction %in% c("annotatediff")) { |
8
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
127 results_list=annotatediff(xset=xset,listArguments=listArguments,variableMetadataOutput=variableMetadataOutput,dataMatrixOutput=dataMatrixOutput) |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
128 xa=results_list[["xa"]] |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
129 diffrep=results_list[["diffrep"]] |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
130 variableMetadata=results_list[["variableMetadata"]] |
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
131 |
8
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
132 cat("\n\n") |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
133 cat("\tXSET OBJECT INFO\n") |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
134 print(xa) |
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
135 } |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
136 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
137 if (thefunction %in% c("combinexsAnnos")) { |
8
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
138 cAnnot=combinexsAnnos_function( |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
139 xaP=xaP,xaN=xaN, |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
140 listOFlistArgumentsP=listOFlistArgumentsP,listOFlistArgumentsN=listOFlistArgumentsN, |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
141 diffrepP=diffrepP,diffrepN=diffrepN, |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
142 pos=listArguments[["pos"]],tol=listArguments[["tol"]],ruleset=listArguments[["ruleset"]],keep_meta=listArguments[["keep_meta"]], |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
143 convertRTMinute=listArguments[["convertRTMinute"]], numDigitsMZ=listArguments[["numDigitsMZ"]], numDigitsRT=listArguments[["numDigitsRT"]], |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
144 variableMetadataOutput=variableMetadataOutput |
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
145 ) |
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
146 } |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
147 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
148 dev.off() |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
149 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
150 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
151 #saving R data in .Rdata file to save the variables used in the present tool |
8
198b035d4848
planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents:
4
diff
changeset
|
152 objects2save = c("xa","variableMetadata","diffrep","cAnnot","listOFlistArguments","zipfile","singlefile") |
4
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
153 save(list=objects2save[objects2save %in% ls()], file=xsetRdataOutput) |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
154 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
155 cat("\n\n") |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
156 |
87570e9b71f5
planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff
changeset
|
157 cat("\tDONE\n") |