Mercurial > repos > tomnl > msp_split
diff track_rt_raw.R @ 5:f2683ec717fe draft default tip
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit a164f06c09dc1614c2909c247ebf390aab433527-dirty
| author | tomnl |
|---|---|
| date | Wed, 18 Sep 2019 05:46:09 -0400 |
| parents | 769ec2496d14 |
| children |
line wrap: on
line diff
--- a/track_rt_raw.R Wed Jul 18 06:04:14 2018 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -library(optparse) - -print(sessionInfo()) - -option_list <- list( - make_option(c("--xset_path"), type="character"), - make_option(c("-o", "--out_dir"), type="character"), - make_option(c("--extract_peaks"), action="store_true") -) - -# 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')) - -if(!is.null(opt$extract_peaks)){ - write.table(xset@peaks, file.path(opt$out_dir, 'xset_peaks.tsv'), row.names=FALSE, sep='\t') -}
