comparison CAMERA.r @ 16:a2c49996603e draft

planemo upload commit e440674afa3e58c46100b0ac7c305a6f46ecbbdc
author lecorguille
date Wed, 19 Sep 2018 03:22:21 -0400
parents 1c30ff90f3ae
children 73d82de36369
comparison
equal deleted inserted replaced
15:6139bfcc95cb 16:a2c49996603e
2 # CAMERA.r version="2.2.1" 2 # CAMERA.r version="2.2.1"
3 3
4 4
5 5
6 # ----- PACKAGE ----- 6 # ----- PACKAGE -----
7 cat("\tPACKAGE INFO\n") 7 cat("\tSESSION INFO\n")
8 8
9 setRepositories(graphics=F, ind=31) 9 pkgs=c("CAMERA","multtest","batch")
10 for(pkg in pkgs) suppressPackageStartupMessages( stopifnot( library(pkg, quietly=TRUE, logical.return=TRUE, character.only=TRUE)))
10 11
11 #pkgs=c("xcms","batch") 12 sessioninfo = sessionInfo()
12 pkgs=c("parallel","BiocGenerics", "Biobase", "Rcpp", "mzR", "xcms","snow","igraph","CAMERA","multtest","batch") 13 cat(sessioninfo$R.version$version.string,"\n")
13 for(p in pkgs) { 14 cat("Main packages:\n")
14 suppressPackageStartupMessages(suppressWarnings(library(p, quietly=TRUE, logical.return=TRUE, character.only=TRUE))) 15 for (pkg in names(sessioninfo$otherPkgs)) { cat(paste(pkg,packageVersion(pkg)),"\t") }; cat("\n")
15 cat(p,"\t",as.character(packageVersion(p)),"\n",sep="") 16 cat("Other loaded packages:\n")
16 } 17 for (pkg in names(sessioninfo$loadedOnly)) { cat(paste(pkg,packageVersion(pkg)),"\t") }; cat("\n")
18
17 source_local <- function(fname){ argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep="/")) } 19 source_local <- function(fname){ argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep="/")) }
18 20
19 cat("\n\n"); 21 cat("\n\n");
20 22
21 23
103 singlefile = rawFilePath$singlefile 105 singlefile = rawFilePath$singlefile
104 listArguments = rawFilePath$listArguments 106 listArguments = rawFilePath$listArguments
105 directory = retrieveRawfileInTheWorkingDirectory(singlefile, zipfile) 107 directory = retrieveRawfileInTheWorkingDirectory(singlefile, zipfile)
106 } 108 }
107 109
110 # Because so far CAMERA isn't compatible with the new XCMSnExp object
111 if (exists("xdata")){
112 xset <- getxcmsSetObject(xdata)
113 }
108 114
109 #addition of xset object to the list of arguments in the first position 115 # addition of xset object to the list of arguments in the first position
110 if (exists("xset") != 0){ 116 if (exists("xset")){
111 listArguments=append(list(xset), listArguments) 117 listArguments=append(list(xset), listArguments)
112 } 118 }
113 119
114 cat("\n\n") 120 cat("\n\n")
115 121
119 # ----- PROCESSING INFO ----- 125 # ----- PROCESSING INFO -----
120 cat("\tMAIN PROCESSING INFO\n") 126 cat("\tMAIN PROCESSING INFO\n")
121 127
122 #change the default display settings 128 #change the default display settings
123 pdf(file=rplotspdf, width=16, height=12) 129 pdf(file=rplotspdf, width=16, height=12)
124
125 130
126 if (thefunction %in% c("annotatediff")) { 131 if (thefunction %in% c("annotatediff")) {
127 results_list=annotatediff(xset=xset,listArguments=listArguments,variableMetadataOutput=variableMetadataOutput,dataMatrixOutput=dataMatrixOutput) 132 results_list=annotatediff(xset=xset,listArguments=listArguments,variableMetadataOutput=variableMetadataOutput,dataMatrixOutput=dataMatrixOutput)
128 xa=results_list[["xa"]] 133 xa=results_list[["xa"]]
129 diffrep=results_list[["diffrep"]] 134 diffrep=results_list[["diffrep"]]