Mercurial > repos > lecorguille > xcms_group
comparison xcms.r @ 21:beda2d981b9d draft
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit e1f22c9b6d39de7aabc6bb625f65aa5ba6a91312
author | lecorguille |
---|---|
date | Thu, 02 Mar 2017 08:21:57 -0500 |
parents | a79d839d625f |
children | dcff3c4a8c80 |
comparison
equal
deleted
inserted
replaced
20:a79d839d625f | 21:beda2d981b9d |
---|---|
159 #execution of the function "thefunction" with the parameters given in "listArguments" | 159 #execution of the function "thefunction" with the parameters given in "listArguments" |
160 | 160 |
161 cat("\t\tCOMPUTE\n") | 161 cat("\t\tCOMPUTE\n") |
162 xset = do.call(thefunction, listArguments) | 162 xset = do.call(thefunction, listArguments) |
163 | 163 |
164 # check if there are no peaks | |
165 if (nrow(peaks(xset)) == 0) { | |
166 stop("No peaks were detected. You should review your settings") | |
167 } | |
168 | |
164 | 169 |
165 cat("\n\n") | 170 cat("\n\n") |
166 | 171 |
167 dev.off() #dev.new(file="Rplots.pdf", width=16, height=12) | 172 dev.off() #dev.new(file="Rplots.pdf", width=16, height=12) |
168 | 173 |
169 if (thefunction == "xcmsSet") { | 174 if (thefunction == "xcmsSet") { |
170 | 175 |
171 #transform the files absolute pathways into relative pathways | 176 #transform the files absolute pathways into relative pathways |
172 xset@filepaths<-sub(paste(getwd(),"/",sep="") ,"", xset@filepaths) | 177 xset@filepaths<-sub(paste(getwd(),"/",sep="") ,"", xset@filepaths) |
173 print(zipfile) | |
174 if(exists("zipfile") && !is.null(zipfile) && (zipfile!="")) { | 178 if(exists("zipfile") && !is.null(zipfile) && (zipfile!="")) { |
175 | 179 |
176 #Modify the samples names (erase the path) | 180 #Modify the samples names (erase the path) |
177 for(i in 1:length(sampnames(xset))){ | 181 for(i in 1:length(sampnames(xset))){ |
178 | 182 |