diff track_rt_raw.R @ 0:fe7d7cc95ca5 draft

planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 2e847122cf605951c334858455fc1d3ebdb189e9-dirty
author tomnl
date Tue, 27 Mar 2018 06:03:50 -0400
parents
children 1a88758357ed
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/track_rt_raw.R	Tue Mar 27 06:03:50 2018 -0400
@@ -0,0 +1,21 @@
+library(optparse)
+library(xcms)
+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'))