# HG changeset patch # User tomnl # Date 1525285606 14400 # Node ID 403ef9c5755042bd8918d38bbe092f268d7c05f8 # Parent 91f38a17d82a2cf425a83f667c67e131b8357043 planemo upload for repository https://github.com/computational-metabolomics/mspurity-galaxy commit 0aa10df0ec1ed71601f932cfb11d7d4d4f620d80-dirty diff -r 91f38a17d82a -r 403ef9c57550 anticipated_purity_dims.R --- a/anticipated_purity_dims.R Wed May 02 14:10:09 2018 -0400 +++ b/anticipated_purity_dims.R Wed May 02 14:26:46 2018 -0400 @@ -42,7 +42,7 @@ filename = sub("raw", "mzML", filename, ignore.case = TRUE) print(filename) - df <- indf[4:nrow(indf),] + df <- indf[3:nrow(indf),] if ('blank_flag' %in% colnames(df)){ df <- df[df$blank_flag==1,] } @@ -53,7 +53,7 @@ df[df$mz=='nan',]$mz <- NA } df$mz <- as.numeric(df$mz) - + mzml_file <- file.path(opt$mzML_file, filename) @@ -77,19 +77,6 @@ } -if (dir.exists(opt$mzML_file)){ - # if directory then we need to add a file name - print(filename) - if (is.na(filename)){ - print('ERROR: If a directory is provided then a filename needs to be entered - directory or automatically obtained by using a dimspy output') - quit() - }else{ - mzml_file <- file.path(opt$mzML_file, filename) - } -}else{ - mzml_file <- opt$mzML_file -} if (is.null(opt$sim)){ sim=FALSE @@ -118,7 +105,7 @@ print('FIRST ROWS OF PEAK FILE') print(head(df)) - +print(mzml_file) predicted <- msPurity::dimsPredictPuritySingle(df$mz, filepth=mzml_file, minOffset=minOffset,