diff createDatabase.R @ 9:e6a78f89ee07 draft

planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 74e7bfbb5e70ec6e665114fa9e9863dafd7bced5
author tomnl
date Tue, 25 Jun 2019 06:05:06 -0400
parents 2b13f1ae8041
children 4b3b0f5a55d9
line wrap: on
line diff
--- a/createDatabase.R	Wed Jun 19 09:22:35 2019 -0400
+++ b/createDatabase.R	Tue Jun 25 06:05:06 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)
 
 }