changeset 4:68c405751ef6 draft

planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 14eafbdb65f491713d1314d77c454defd137c392
author tomnl
date Tue, 18 Jun 2019 11:14:17 -0400
parents b22aa0a9fc25
children 67781ac54271
files combineAnnotations.R combineAnnotations.xml createDatabase.R
diffstat 3 files changed, 3 insertions(+), 35 deletions(-) [+]
line wrap: on
line diff
--- a/combineAnnotations.R	Tue Jun 18 10:08:40 2019 -0400
+++ b/combineAnnotations.R	Tue Jun 18 11:14:17 2019 -0400
@@ -47,32 +47,6 @@
 
 write.table(summary_output, file.path(opt$outdir, 'combined_annotations.tsv'), sep = '\t', row.names = FALSE)
 
-if (!is.null(opt$eic)){
-
-  if (is.null(xset)){
-    xset <- xa@xcmsSet
-  }
-  # previous check should have matched filelists together
-  xset@filepaths <- unname(pa@fileList)
-
-  convert2Raw <- function(x, xset){
-    sid <- unique(x$sample)
-    # for each file get list of peaks
-    x$rt_raw <- xset@rt$raw[[sid]][match(x$rt, xset@rt$corrected[[sid]])]
-    x$rtmin_raw <- xset@rt$raw[[sid]][match(x$rtmin, xset@rt$corrected[[sid]])]
-    x$rtmax_raw <- xset@rt$raw[[sid]][match(x$rtmax, xset@rt$corrected[[sid]])]
-    return(x)
-
-  }
-
-  xset@peaks <- as.matrix(plyr::ddply(data.frame(xset@peaks), ~ sample, convert2Raw, xset=xset))
-
-  # Saves the EICS into the previously created database
-  px <- msPurity::purityX(xset, saveEIC = TRUE,
-                          cores=1, sqlitePth=db_pth,
-                          rtrawColumns = TRUE)
-
-}
 
 closeAllConnections()
 
--- a/combineAnnotations.xml	Tue Jun 18 10:08:40 2019 -0400
+++ b/combineAnnotations.xml	Tue Jun 18 11:14:17 2019 -0400
@@ -26,9 +26,7 @@
             #if $create_new_database:
               --create_new_database
             #end if
-            #if $eic
-                --eic
-            #end if
+
 
     ]]></command>
     <inputs>
@@ -48,10 +46,6 @@
                help="A copy will be made of the input SQLite spectral matching database and the results will be added to this copy.
                      When False, the input SQLite database will be updated the results. Use False
                      if you want to reduce storage space being used."/>
-       <param name="eic" type="boolean" label="Include EIC data?"
-               help="The Extracted Ion Chromatogram can be calculated for each peak and stored in
-                     the database. Note, this will take considerable time for large datasets and
-                     the resulting SQLite database can be large"/>
     </inputs>
     <outputs>
         <data name="combined_annotations_sqlite" from_work_dir="combined_annotations.sqlite" format="sqlite" label="${tool.name} on ${on_string}: sqlite" />
--- a/createDatabase.R	Tue Jun 18 10:08:40 2019 -0400
+++ b/createDatabase.R	Tue Jun 18 11:14:17 2019 -0400
@@ -156,10 +156,10 @@
   }
 
   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=db_pth,
+                           cores=1, sqlitePth=dbPth,
                            rtrawColumns = TRUE)
 
 }