annotate CAMERA.r @ 13:1c30ff90f3ae draft

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