annotate CAMERA.r @ 12:961089e21ae2 draft default tip

planemo upload commit 1a5357c0e28103a0325b2df858504721f6266049
author lecorguille
date Tue, 09 Oct 2018 06:03:24 -0400
parents 837c6955e4e9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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 -----
11
837c6955e4e9 planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
lecorguille
parents: 8
diff changeset
7 cat("\tSESSION INFO\n")
4
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
8
11
837c6955e4e9 planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
lecorguille
parents: 8
diff changeset
9 pkgs=c("CAMERA","multtest","batch")
837c6955e4e9 planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
lecorguille
parents: 8
diff changeset
10 for(pkg in pkgs) suppressPackageStartupMessages( stopifnot( library(pkg, quietly=TRUE, logical.return=TRUE, character.only=TRUE)))
4
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
11
11
837c6955e4e9 planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
lecorguille
parents: 8
diff changeset
12 sessioninfo = sessionInfo()
837c6955e4e9 planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
lecorguille
parents: 8
diff changeset
13 cat(sessioninfo$R.version$version.string,"\n")
837c6955e4e9 planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
lecorguille
parents: 8
diff changeset
14 cat("Main packages:\n")
837c6955e4e9 planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
lecorguille
parents: 8
diff changeset
15 for (pkg in names(sessioninfo$otherPkgs)) { cat(paste(pkg,packageVersion(pkg)),"\t") }; cat("\n")
837c6955e4e9 planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
lecorguille
parents: 8
diff changeset
16 cat("Other loaded packages:\n")
837c6955e4e9 planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
lecorguille
parents: 8
diff changeset
17 for (pkg in names(sessioninfo$loadedOnly)) { cat(paste(pkg,packageVersion(pkg)),"\t") }; cat("\n")
837c6955e4e9 planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
lecorguille
parents: 8
diff changeset
18
4
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
19 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
20
8
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
21 cat("\n\n");
4
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
22
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
23
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
24
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
25 # ----- ARGUMENTS -----
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
26 cat("\tARGUMENTS INFO\n")
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
27
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
28 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
29 write.table(as.matrix(listArguments), col.names=F, quote=F, sep='\t')
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
30
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
31 cat("\n\n");
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
32
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
33
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
34 # ----- PROCESSING INFILE -----
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
35 cat("\tINFILE PROCESSING INFO\n")
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
36
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
37 #image is an .RData file necessary to use xset variable given by previous tools
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
38 if (!is.null(listArguments[["image"]])){
8
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
39 load(listArguments[["image"]]); listArguments[["image"]]=NULL
4
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
40 }
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
41
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
42 if (listArguments[["xfunction"]] %in% c("combinexsAnnos")) {
8
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
43 load(listArguments[["image_pos"]])
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
44 xaP=xa
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
45 listOFlistArgumentsP=listOFlistArguments
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
46 if (exists("xsAnnotate_object")) xaP=xsAnnotate_object
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
47
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
48 diffrepP=NULL
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
49 if (exists("diffrep")) diffrepP=diffrep
4
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
50
8
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
51 load(listArguments[["image_neg"]])
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
52 xaN=xa
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
53 listOFlistArgumentsN=listOFlistArguments
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
54 if (exists("xsAnnotate_object")) xaN=xsAnnotate_object
4
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
55
8
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
56 diffrepN=NULL
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
57 if (exists("diffrep")) diffrepN=diffrep
4
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
58 }
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
59
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
60
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
61 cat("\n\n")
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
62
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
63
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
64 # ----- ARGUMENTS PROCESSING -----
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
65 cat("\tARGUMENTS PROCESSING INFO\n")
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
66
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
67 # Save arguments to generate a report
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
68 if (!exists("listOFlistArguments")) listOFlistArguments=list()
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
69 listOFlistArguments[[paste(format(Sys.time(), "%y%m%d-%H:%M:%S_"),listArguments[["xfunction"]],sep="")]] = listArguments
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
70
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
71
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
72 #saving the commun parameters
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
73 thefunction = listArguments[["xfunction"]]
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
74 listArguments[["xfunction"]]=NULL #delete from the list of arguments
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
75
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
76 xsetRdataOutput = paste(thefunction,"RData",sep=".")
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
77 if (!is.null(listArguments[["xsetRdataOutput"]])){
8
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
78 xsetRdataOutput = listArguments[["xsetRdataOutput"]]; listArguments[["xsetRdataOutput"]]=NULL
4
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
79 }
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
80
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
81 rplotspdf = "Rplots.pdf"
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
82 if (!is.null(listArguments[["rplotspdf"]])){
8
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
83 rplotspdf = listArguments[["rplotspdf"]]; listArguments[["rplotspdf"]]=NULL
4
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
84 }
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
85
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
86 variableMetadataOutput = "variableMetadata.tsv"
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
87 if (!is.null(listArguments[["variableMetadataOutput"]])){
8
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
88 variableMetadataOutput = listArguments[["variableMetadataOutput"]]; listArguments[["variableMetadataOutput"]]=NULL
4
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
89 }
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
90
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
91 #Import the different functions
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
92 source_local("lib.r")
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
93
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
94 # We unzip automatically the chromatograms from the zip files.
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
95 if (thefunction %in% c("annotatediff")) {
8
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
96 if (!exists("zipfile")) zipfile=NULL
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
97 if (!exists("singlefile")) singlefile=NULL
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
98 rawFilePath = getRawfilePathFromArguments(singlefile, zipfile, listArguments)
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
99 zipfile = rawFilePath$zipfile
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
100 singlefile = rawFilePath$singlefile
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
101 listArguments = rawFilePath$listArguments
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
102 directory = retrieveRawfileInTheWorkingDirectory(singlefile, zipfile)
4
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
103 }
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
104
11
837c6955e4e9 planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
lecorguille
parents: 8
diff changeset
105 # Because so far CAMERA isn't compatible with the new XCMSnExp object
837c6955e4e9 planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
lecorguille
parents: 8
diff changeset
106 if (exists("xdata")){
837c6955e4e9 planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
lecorguille
parents: 8
diff changeset
107 xset <- getxcmsSetObject(xdata)
837c6955e4e9 planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
lecorguille
parents: 8
diff changeset
108 }
4
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
109
11
837c6955e4e9 planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
lecorguille
parents: 8
diff changeset
110 # addition of xset object to the list of arguments in the first position
837c6955e4e9 planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
lecorguille
parents: 8
diff changeset
111 if (exists("xset")){
8
198b035d4848 planemo upload commit 301d42e88026afdac618f4ec56fc6cbe19e3e419
lecorguille
parents: 4
diff changeset
112 listArguments=append(list(xset), listArguments)
4
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
113 }
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
114
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
115 cat("\n\n")
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
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
120 # ----- PROCESSING INFO -----
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
121 cat("\tMAIN PROCESSING INFO\n")
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
122
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
123 #change the default display settings
87570e9b71f5 planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
lecorguille
parents:
diff changeset
124 pdf(file=rplotspdf, width=16, height=12)
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")) {
12
961089e21ae2 planemo upload commit 1a5357c0e28103a0325b2df858504721f6266049
lecorguille
parents: 11
diff changeset
127 results_list=annotatediff(xset=xset,listArguments=listArguments,variableMetadataOutput=variableMetadataOutput)
8
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")