diff track_rt_raw.R @ 0:dc00b7222a3c draft

planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit f9591483bef88aef71a9f0cc0ffc75cf6eab480c
author tomnl
date Mon, 05 Mar 2018 10:01:25 -0500
parents
children c64891642e41
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/track_rt_raw.R	Mon Mar 05 10:01:25 2018 -0500
@@ -0,0 +1,21 @@
+library(optparse)
+
+option_list <- list(
+  make_option(c("--xset_path"), type="character"),
+  make_option(c("-o", "--out_dir"), type="character")
+)
+
+# store options
+opt<- parse_args(OptionParser(option_list=option_list))
+
+load(opt$xset_path)
+
+print(xset)
+
+rtraw <- xset@peaks[,c('rt', 'rtmin', 'rtmax')]
+colnames(rtraw) <- c('rt_raw','rtmin_raw','rtmax_raw')
+xset@peaks <- cbind(xset@peaks, rtraw)
+
+
+print('saving RData')
+save.image(file.path(opt$out_dir, 'xset_rt_raw_tracked.RData'))