Mercurial > repos > computational-metabolomics > mspurity_frag4feature
diff purityX.R @ 10:da7ae20b5838 draft
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit f10386dee95f3b1fbc8d1eeec52d450381ba89c5
author | computational-metabolomics |
---|---|
date | Fri, 13 Sep 2024 12:25:09 +0000 |
parents | 174a523cb1da |
children |
line wrap: on
line diff
--- a/purityX.R Thu Jun 13 11:42:28 2024 +0000 +++ b/purityX.R Fri Sep 13 12:25:09 2024 +0000 @@ -16,7 +16,6 @@ make_option("--singleFile", default = 0), make_option("--cores", default = 4), make_option("--xgroups", type = "character"), - make_option("--rdata_name", default = "xset"), make_option("--camera_xcms", default = "xset"), make_option("--files", type = "character"), make_option("--galaxy_files", type = "character"), @@ -63,10 +62,10 @@ rtraw_columns <- TRUE } -loadRData <- function(rdata_path, xset_name) { +loadRData <- function(rdata_path, xnames) { # loads an RData file, and returns the named xset object if it is there load(rdata_path) - return(get(ls()[ls() == xset_name])) + return(get(ls()[ls() %in% xnames])) } @@ -90,7 +89,7 @@ } } -target_obj <- loadRData(opt$xset_path, opt$rdata_name) +target_obj <- loadRData(opt$xset_path, c('xset', 'xa', 'xdata')) if (opt$camera_xcms == "camera") { xset <- target_obj@xcmsSet