Assigns molecular formulas to neutral molecular masses and calculates all parameters required for data evaluation, such as a posteriori filtering of molecular formulas, plotting, and statistics. The function uses a pre-build molecular formula library.
ume_assign_formulas(pl, formula_library, verbose = FALSE, ...)A data.table having molecular formula assignments for each mass.
data.table containing peak data. Mandatory columns include neutral
molecular mass (mass), peak magnitude (i_magnitude), and a peak
identifier (peak_id).
Molecular formula library: a predefined data.table used for
assigning molecular formulas to a peak list and for mass calibration. The library
requires a fixed format, including mass values for matching. Predefined libraries
are available in the R package ume.formulas and further described in
Leefmann et al. (2019). A standard library for marine dissolved organic matter is
ume.formulas::lib_02. New libraries can be built using
ume::create_ume_formula_library().
logical; if TRUE, show progress messages.
Arguments passed on to calc_ma_abs, calc_neutral_mass, assign_formulas, eval_isotopes, calc_eval_params, add_known_mf, calc_norm_int
mMeasured mass
ma_devMass accuracy in +/- parts per million (ppm)
mzNumeric vector of m/z values (> 0).
polCharacter: "neg", "pos", or "neutral".
remove_isotopesIf set to TRUE (default), all entries for isotopologues are removed from mfd. The main isotope information for each parent ion is still maintained in the "intxy"-columns.
mfddata.table with molecular formula data as derived from
ume::assign_formulas. Column names of elements/isotopes must match names in
the isotope column of ume::masses; values are integers representing
counts per formula.
mf_colName of the column in mfd that has the molecular formula information (default: "mf"). Formulas have upper case element symbols and elements in the formula are ordered according to the Hill system.
known_mfdata.table with known molecular formulas (ume::known_mf).
ms_idCharacter; name of the column identifying individual spectra (default: "file_id").
peak_idCharacter; name of the column identifying unique peaks (default: "peak_id").
peak_magnitudeCharacter; name of the column containing peak intensity values (default: "i_magnitude").
normalizationCharacter; normalization method to apply. One of "bp", "sum", "sum_ubiq", "sum_rank", "none". Default is "bp".
n_rankInteger; number of top-ranked peaks to use for "sum_rank" normalization (default: 200).
All function arguments: args(filter_mf_data) args(filter_int)
Other Formula assignment:
add_known_mf(),
calc_eval_params(),
check_formula_library(),
eval_isotopes()
Other Formula subsetting:
filter_int(),
filter_mass_accuracy(),
filter_mf_data(),
remove_blanks(),
subset_known_mf(),
ume_filter_formulas()
Other ume wrapper:
ume_filter_formulas()
ume_assign_formulas(pl = peaklist_demo, formula_library = lib_demo, pol = "neg", ma_dev = 0.2)
Run the code above in your browser using DataLab