diff createDatabase.R @ 7:8d26c0db867c draft

planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 74e7bfbb5e70ec6e665114fa9e9863dafd7bced5
author tomnl
date Tue, 25 Jun 2019 06:16:13 -0400
parents 68c405751ef6
children b1dd803d5164
line wrap: on
line diff
--- a/createDatabase.R	Wed Jun 19 09:29:13 2019 -0400
+++ b/createDatabase.R	Tue Jun 25 06:16:13 2019 -0400
@@ -5,8 +5,6 @@
 print(sessionInfo())
 print('CREATING DATABASE')
 
-
-
 xset_pa_filename_fix <- function(opt, pa, xset){
 
   if (!is.null(opt$mzML_files) && !is.null(opt$galaxy_names)){
@@ -156,11 +154,15 @@
   }
 
   xset@peaks <- as.matrix(plyr::ddply(data.frame(xset@peaks), ~ sample, convert2Raw, xset=xset))
-  closeAllConnections()
+  
   # Saves the EICS into the previously created database
-  px <- msPurity::purityX(xset, saveEIC = TRUE,
-                           cores=1, sqlitePth=dbPth,
-                           rtrawColumns = TRUE)
+  xgroups <-  as.numeric(as.character(unique(pa@grped_df$grpid)))
+  px <- msPurity::purityX(xset, 
+                          saveEIC = TRUE,
+                          cores=1,
+                          sqlitePth=dbPth,
+                          rtrawColumns = TRUE, 
+                          xgroups = xgroups)
 
 }