reduce | R Documentation |
Reduce m/z features in an analysis that includes putative molecular formula assignments by removing isotopic, adduct or unknown features.
reduce(
x,
isotopes = TRUE,
adducts = TRUE,
unknowns = FALSE,
isotopic_adducts = c("[M+Cl37]1-", "[M+K41]1+")
)
## S4 method for signature 'Analysis'
reduce(
x,
isotopes = TRUE,
adducts = TRUE,
unknowns = FALSE,
isotopic_adducts = c("[M+Cl37]1-", "[M+K41]1+")
)
## S4 method for signature 'AnalysisData'
reduce(
x,
isotopes = TRUE,
adducts = TRUE,
unknowns = FALSE,
isotopic_adducts = c("[M+Cl37]1-", "[M+K41]1+")
)
x |
an object of S4 class |
isotopes |
TRUE/FALSE remove isotopic features. |
adducts |
TRUE/FALSE remove features that are multiple adducts of the same molecular formula. The adduct with the highest intensity is retained for each assigned molecular formula. |
unknowns |
TRUE/FALSE remove unaOssigned m/z features. |
isotopic_adducts |
a vector of additional isotopic adducts to remove if argument |
If argument isotopes = TRUE
, all isotopic features are removed. If argument adducts = TRUE
, the feature with the maximum intensity for each molecular formula is retained.
An object of S4 class Analysis
or AnalysisData
with reduced m/z features.
## Assign molecular formulas
p <- assignments::assignmentParameters('FIE')
assignment <- assignments::assignMFs(assignments::feature_data,p)
## Retrieve assigned data
assigned_data <- metabolyseR::analysisData(
assignments::assignedData(assignment),
tibble::tibble(sample = seq_len(nrow(assignments::feature_data)))
)
reduced_data <- metaboMisc::reduce(assigned_data)
reduced_data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.