Mercurial > repos > lecorguille > ipo
annotate ipo4xcmsSet.r @ 0:ac5f2936575b draft
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
author | lecorguille |
---|---|
date | Thu, 03 Aug 2017 06:00:00 -0400 |
parents | |
children | ae8de756dfcf |
rev | line source |
---|---|
0
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
1 #!/usr/bin/env Rscript |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
2 #Authors Gildas Le Corguille and Yann Guitton |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
3 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
4 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
5 # ----- LOG FILE ----- |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
6 log_file=file("log.txt", open = "wt") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
7 sink(log_file) |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
8 sink(log_file, type = "output") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
9 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
10 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
11 # ----- PACKAGE ----- |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
12 options(bitmapType='cairo') |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
13 cat("\tPACKAGE INFO\n") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
14 #pkgs=c("xcms","batch") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
15 pkgs=c("parallel","BiocGenerics", "Biobase", "Rcpp", "mzR", "xcms","rsm","igraph","CAMERA","IPO","snow","batch") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
16 for(pkg in pkgs) { |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
17 suppressWarnings( suppressPackageStartupMessages( stopifnot( library(pkg, quietly=TRUE, logical.return=TRUE, character.only=TRUE)))) |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
18 cat(pkg,"\t",as.character(packageVersion(pkg)),"\n",sep="") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
19 } |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
20 source_local <- function(fname){ argv <- commandArgs(trailingOnly = FALSE); base_dir <- dirname(substring(argv[grep("--file=", argv)], 8)); source(paste(base_dir, fname, sep="/")) } |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
21 cat("\n\n"); |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
22 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
23 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
24 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
25 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
26 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
27 # ----- ARGUMENTS ----- |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
28 cat("\tARGUMENTS INFO\n") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
29 listArguments = parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
30 write.table(as.matrix(listArguments), col.names=F, quote=F, sep='\t') |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
31 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
32 cat("\n\n"); |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
33 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
34 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
35 # ----- ARGUMENTS PROCESSING ----- |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
36 cat("\tINFILE PROCESSING INFO\n") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
37 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
38 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
39 #Import the different functions |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
40 source_local("lib.r") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
41 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
42 cat("\n\n") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
43 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
44 #Import the different functions |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
45 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
46 # ----- PROCESSING INFILE ----- |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
47 cat("\tARGUMENTS PROCESSING INFO\n") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
48 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
49 xsetRdataOutput = paste("ipo4xcmsSet","RData",sep=".") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
50 if (!is.null(listArguments[["xsetRdataOutput"]])){ |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
51 xsetRdataOutput = listArguments[["xsetRdataOutput"]]; listArguments[["xsetRdataOutput"]]=NULL |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
52 } |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
53 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
54 parametersOutput = "parametersOutput.tsv" |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
55 if (!is.null(listArguments[["parametersOutput"]])){ |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
56 parametersOutput = listArguments[["parametersOutput"]]; listArguments[["parametersOutput"]]=NULL |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
57 } |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
58 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
59 samplebyclass = 2 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
60 if (!is.null(listArguments[["samplebyclass"]])){ |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
61 samplebyclass = listArguments[["samplebyclass"]]; listArguments[["samplebyclass"]]=NULL |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
62 } |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
63 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
64 #necessary to unzip .zip file uploaded to Galaxy |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
65 #thanks to .zip file it's possible to upload many file as the same time conserving the tree hierarchy of directories |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
66 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
67 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
68 if (!is.null(listArguments[["zipfile"]])){ |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
69 zipfile= listArguments[["zipfile"]]; listArguments[["zipfile"]]=NULL |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
70 } |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
71 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
72 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
73 if (!is.null(listArguments[["singlefile_galaxyPath"]])){ |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
74 singlefile_galaxyPath = listArguments[["singlefile_galaxyPath"]]; listArguments[["singlefile_galaxyPath"]]=NULL |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
75 singlefile_sampleName = listArguments[["singlefile_sampleName"]]; listArguments[["singlefile_sampleName"]]=NULL |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
76 } |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
77 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
78 # single file case |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
79 #@TODO: need to be refactoring |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
80 if(exists("singlefile_galaxyPath") && (singlefile_galaxyPath!="")) { |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
81 if(!file.exists(singlefile_galaxyPath)){ |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
82 error_message=paste("Cannot access the sample:",singlefile_sampleName,"located:",singlefile_galaxyPath,". Please, contact your administrator ... if you have one!") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
83 print(error_message); stop(error_message) |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
84 } |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
85 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
86 cwd=getwd() |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
87 dir.create("raw") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
88 setwd("raw") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
89 file.symlink(singlefile_galaxyPath,singlefile_sampleName) |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
90 setwd(cwd) |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
91 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
92 directory = "raw" |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
93 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
94 } |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
95 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
96 # We unzip automatically the chromatograms from the zip files. |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
97 if(exists("zipfile") && (zipfile!="")) { |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
98 if(!file.exists(zipfile)){ |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
99 error_message=paste("Cannot access the Zip file:",zipfile,". Please, contact your administrator ... if you have one!") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
100 print(error_message) |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
101 stop(error_message) |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
102 } |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
103 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
104 #list all file in the zip file |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
105 #zip_files=unzip(zipfile,list=T)[,"Name"] |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
106 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
107 # Because IPO only want raw data in its working directory |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
108 dir.create("ipoworkingdir") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
109 setwd("ipoworkingdir") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
110 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
111 #unzip |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
112 suppressWarnings(unzip(zipfile, unzip="unzip")) |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
113 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
114 #get the directory name |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
115 filesInZip=unzip(zipfile, list=T); |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
116 directories=unique(unlist(lapply(strsplit(filesInZip$Name,"/"), function(x) x[1]))); |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
117 directories=directories[!(directories %in% c("__MACOSX")) & file.info(directories)$isdir] |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
118 directory = "." |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
119 if (length(directories) == 1) directory = directories |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
120 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
121 cat("files_root_directory\t",directory,"\n") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
122 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
123 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
124 } |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
125 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
126 #addition of the directory to the list of arguments in the first position |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
127 checkXmlStructure(directory) |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
128 checkFilesCompatibilityWithXcms(directory) |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
129 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
130 cat("\n\n") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
131 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
132 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
133 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
134 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
135 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
136 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
137 # ----- MAIN PROCESSING INFO ----- |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
138 cat("\tMAIN PROCESSING INFO\n") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
139 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
140 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
141 xset = ipo4xcmsSet(directory, parametersOutput, listArguments, samplebyclass) |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
142 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
143 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
144 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
145 cat("\n\n") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
146 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
147 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
148 # ----- EXPORT ----- |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
149 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
150 cat("\tXSET OBJECT INFO\n") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
151 print(xset) |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
152 #delete the parameters to avoid the passage to the next tool in .RData image |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
153 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
154 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
155 #saving R data in .Rdata file to save the variables used in the present tool |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
156 objects2save = c("xset","zipfile") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
157 save(list=objects2save[objects2save %in% ls()], file=xsetRdataOutput) |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
158 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
159 cat("\n\n") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
160 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
161 |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
162 cat("\tDONE\n") |
ac5f2936575b
planemo upload commit 131562ad89c33a2f87754936ce3c8fe6899484c0
lecorguille
parents:
diff
changeset
|
163 |