Mercurial > repos > tomnl > assess_purity_msms
diff anticipated_purity_dims.R @ 6:e5f627fd21e8 draft
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit afee93a926072b534bb3541e1524f1ad6a7decb9
author | tomnl |
---|---|
date | Mon, 23 Apr 2018 06:02:48 -0400 |
parents | 146699c00d38 |
children | 5a863e3d118d |
line wrap: on
line diff
--- a/anticipated_purity_dims.R Wed Apr 04 16:59:55 2018 -0400 +++ b/anticipated_purity_dims.R Mon Apr 23 06:02:48 2018 -0400 @@ -14,7 +14,7 @@ make_option("--sim", action="store_true"), make_option("--remove_nas", action="store_true"), make_option("--iwNorm", default="none", type="character"), - make_option("--dimspy_file_num", default=1), + make_option("--file_num_dimspy", default=1), make_option("--exclude_isotopes", action="store_true"), make_option("--isotope_matrix", type="character") ) @@ -25,7 +25,11 @@ print(sessionInfo()) print(opt) -if (opt$dimspy){ +if (is.null(opt$dimspy)){ + + df <- read.table(opt$peaks_file, header = TRUE, sep='\t') + filename = NA +}else{ indf <- read.table(opt$peaks_file, header = TRUE, sep='\t', stringsAsFactors = FALSE) filename = colnames(indf)[8:ncol(indf)][opt$dimspy_file_num] @@ -49,9 +53,8 @@ df$mz <- as.numeric(df$mz) -}else{ - df <- read.table(opt$peaks_file, header = TRUE, sep='\t') - filename = NA + + } if (!is.null(opt$remove_nas)){