Description Usage Arguments Value Examples
View source: R/calculation-functions.R
Sums all features belonging to the same metabolite into a single intensity value per metabolite group per sample
1 | sum_features(Peak.list, Sample.df, search.par, QC.id, BLANK, IonMode)
|
Peak.list |
data frame. Must have column |
Sample.df |
a data frame with class info as columns. Must contain a
separate row entry for each unique sex/class combination. Must contain the
columns |
search.par |
a single-row data frame with 11 variables containing
user-defined search parameters. Must contain the columns
|
QC.id |
character vector specifying identifier in filename designating a
Pooled QC sample. Only the first value will be used. Default is
|
BLANK |
a logical indicating whether blanks are being evaluated |
IonMode |
a character string defining the ionization mode. Must be one
of |
sum.range.list with the first column containing metabolite group and the rest containing sample and QC columns
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | library(LUMA)
# is case sensitive on Linux
file <- system.file('extdata','Search_Parameters.txt', package = "LUMA")
search.par <- read.table(file, sep = "\t", header = TRUE)
# is case sensitive on Linux
file2 <- system.file('extdata','Sample_Class.txt', package = "LUMA")
Sample.df <- read.table(file2, sep = "\t", header = TRUE)
Peak.list <- LUMA::Peaklist_Pos$output_parsed
if("metabolite_group" %in% colnames(Peak.list)) {
test <- sum_features(Peak.list = Peak.list, Sample.df = Sample.df ,
search.par = search.par, BLANK = FALSE, IonMode = "Positive")
} else (stop("Peak.list must have a column called \"metabolite_group\""))
## Not run:
Peak.list <- LUMA::Peaklist_Pos$Annotated
if("metabolite_group" %in% colnames(Peak.list)) {
test <- sum_features(Peak.list = Peak.list, Sample.df = Sample.df ,
search.par = search.par, BLANK = FALSE, IonMode = "Positive")
} else (stop("Peak.list must have a column called \"metabolite_group\""))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.