Description Usage Arguments Value Examples
View source: R/trimming-functions.R
Removes metabolites with MinFrac smaller than the user specified threshold. The maximum MinFrac value is chosen from all features within a metabolite group.
1 2 3 4 5 6 7 | trim_minfrac(object, Peak.list, search.par)
## S3 method for class 'mz'
trim_minfrac(object, Peak.list, search.par)
## S3 method for class 'monoMass'
trim_minfrac(object, Peak.list, search.par)
|
object |
used for method dispatch. Can be any object. See usage for details |
Peak.list |
data frame. Must have MinFrac column. Should contain output columns from XCMS and CAMERA, and additional columns from IHL.search, Calc.MinFrac, CAMERA.parser, Calc.corr.stat and Combine.phenodata base functions. |
search.par |
a single-row data frame with 11 variables containing
user-defined search parameters. Must contain the columns
|
data frame Peak.list.trimmed original Peak.list containing all metabolite groups containing at least one feature that has MinFrac value greater than user specified threshold; if all MinFrac values are NA (i.e. dataset contains blanks), NULL is returned
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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) #Ignore Warning message
method = "mz"
class(method) = method
test <- trim_minfrac(Peak.list = Peaklist_Pos$From_CAMERA_with_MinFrac,
search.par = search.par, object = method)
nrow(Peaklist_Pos$From_CAMERA_with_MinFrac) - nrow(test) #equals 6
method = "monoMass"
class(method) = method
test <- trim_minfrac(Peak.list =
Peaklist_Pos$Combined_Isotopes_and_Adducts, search.par = search.par, object
= method)
nrow(Peaklist_Pos$Combined_Isotopes_and_Adducts) - nrow(test) #equals 4
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.