Mercurial > repos > tomnl > assess_purity_msms
view track_rt_raw.R @ 23:c5ba85825284 draft
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 04023134d8f28e85927ca293373c506484149ead-dirty
author | tomnl |
---|---|
date | Fri, 01 Jun 2018 15:28:32 -0400 |
parents | faba6cd56875 |
children |
line wrap: on
line source
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') }