Description Usage Arguments Value Examples
View source: R/ion-mode-functions.R
Removes the ion mode duplicates based on user-modified indices after visual inspection of EIC_plots
1 | remove_ion_dup(Peak.list, Key.list, tbl.id, ...)
|
Peak.list |
a data frame containing combined ion mode peaklist with Duplicate IDs. Alternatively can be retrieved from databases. Default is NULL |
Key.list |
list containing two numeric vectors (one per ionization mode) of ion mode duplicates to keep. Key (vector) corresponding to positive mode duplicates should be first. |
tbl.id |
character string corresponding to table name to draw from database. Default is NULL |
... |
Arguments to pass parameters to database functions |
NULL testing
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(LUMA)
if(require(lcmsfishdata, quietly = TRUE)) {
file <- system.file("extdata","EIC_index_pos.txt", package =
"lcmsfishdata") # is case sensitive on Linux
EIC_index_pos <- read.table(file, header = TRUE, sep = "\t")
file2 <- system.file("extdata","EIC_index_neg.txt", package =
"lcmsfishdata") # is case sensitive on Linux
EIC_index_neg <- read.table(file2, header = TRUE, sep = "\t")
Peak.list <- Peaklist_db$Peaklist_Combined_with_Duplicate_IDs
Key.list <- list(Positive = EIC_index_pos, Negative = EIC_index_neg)
test <- remove_ion_dup(Peak.list = Peak.list,
Key.list = Key.list)
nrow(Peak.list) - nrow(test) ## Number of ion mode duplicates removed
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.