Computes the nominal mass (integer mass) for each molecular formula in the provided data.
This function uses isotope masses stored in the dataset ume::masses, based on values from NIST,
for accurate calculation of each element's nominal mass contribution.
calc_nm(mfd, ...)A numeric vector of the calculated nominal mass.
data.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.
Additional arguments passed to methods.
The function calculates the nominal mass of each molecular formula by retrieving the relevant
integer mass values of isotopes from ume::masses. This information is processed to create a calculation
string which is then evaluated to obtain the nominal mass for each molecule.
The nominal mass is derived by summing the integer masses of each constituent element in the formula, where the integer mass for each element is multiplied by the number of atoms of that element in the molecule.
Note: This function depends on ume::get_isotope_info() for isotope data retrieval.
Other calculations:
calc_data_summary(),
calc_dbe(),
calc_eval_params(),
calc_exact_mass(),
calc_ideg(),
calc_ma(),
calc_neutral_mass(),
calc_norm_int(),
calc_number_assignment(),
calc_number_occurrence(),
calc_recalibrate_ms()
# Example using a demo dataset to calculate nominal mass
calc_nm(mfd = mf_data_demo)
Run the code above in your browser using DataLab