UME 1.6.1
Submitted to CRAN.
New features
calc_isotope_pattern()returns exact mass, nominal mass, probability,
relative abundance, molecular formula (mf), and isotope-specific molecular
formula (mf_iso) for each isotope peak.inchi_to_mf(): Extracts molecular formula string from an InChI code.check_neutral_mf(): Is a given string for a neutral molecular formula correct?- Added optional pre-validation of molecular formulas via check_neutral_mf() in convert_molecular_formula_to_data_table().
Invalid, charged, or non-formula inputs now produce informative error messages. - Introduced robust parsing of molecular formulas based on masses,
supporting a wide range of elements and isotope labels without hard-coded symbol lists.
- Added optional pre-validation of molecular formulas via check_neutral_mf() in convert_molecular_formula_to_data_table().
calc_nm()and related workflows now correctly preserve input order and
duplicate formulas when character vectors are supplied.
Stability and bug fixes
convert_molecular_formula_to_data_table()- Added new argument
isotope_default. Unspecific element notation such asMocan now be resolved either to the
most abundant isotope ("most_abundant", default) or to the lightest isotope ("lightest"). - Fixed parsing errors for formulas containing multi-letter element symbols (such as `Mg) that were previously misinterpreted.
- Fixed incorrect splitting of multi-letter element symbols without counts (e.g. "Mo" was parsed as "M" + "o")
- Resolved internal inconsistencies related to isotope handling and duplicate detection.
- Fixed inconsistency where masses were calculated using the correct isotope but column names still reflected the lightest isotope
- Original input order and duplicate molecular formulas are now preserved.
- Improved handling of repeated element or isotope tokens such as
C2H5OHorCl3[37Cl2][37Cl4].
- Added new argument
create_isotope_expanded_table()now also accepts character vectors of
molecular formulas as input.convert_data_table_to_molecular_formulas()was rewritten to preserve
original row order and duplicate entries using internal row identifiers.check_neutral_mf()- Fixed length mismatch in data.table assignment when handling non-empty entries
- Improved robustness for inputs containing NA values
Improvements
uplot_ms()- Replaced .SD[order()]-based data reduction with a faster data.table::frank()-based ranking approach
- Significantly improved performance for large peak lists (10⁵–10⁶+ peaks), especially when using data_reduction < 1
- Reduced memory overhead by avoiding repeated sorting and subsetting operations