Mercurial > repos > tomnl > create_sqlite_db
diff anticipated_purity_dims.R @ 5:9ab472c5714c draft
planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit afee93a926072b534bb3541e1524f1ad6a7decb9
author | tomnl |
---|---|
date | Mon, 23 Apr 2018 06:10:07 -0400 |
parents | 1a88758357ed |
children | 3d8bde261c95 |
line wrap: on
line diff
--- a/anticipated_purity_dims.R Wed Apr 04 17:08:30 2018 -0400 +++ b/anticipated_purity_dims.R Mon Apr 23 06:10:07 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)){