create_custom_formula_library: Create a custom molecular formula library for...

View source: R/create_custom_formula_library.R

create_custom_formula_libraryR Documentation

Create a custom molecular formula library for UltraMassExplorer

Description

Builds a library based on a list of molecular formulas. The main stable isotope masses 13C1, 15N1, and 34S1 are automatically added.

Usage

create_custom_formula_library(mf)

Arguments

mf

Character vector of molecular formula(s) (e.g., c("C10H23NO4", "C10H24N4O2S")).

Value

A data.table representing a fully constructed UME molecular formula library. The returned table contains one row for each input molecular formula and additional rows for its isotopologues (⁠13C⁠, ⁠15N⁠, ⁠34S⁠) when applicable. Columns include:

  • vkey – unique integer identifier for each formula/isotopologue.

  • mf – reconstructed molecular formula string.

  • mf_iso – isotopologue formula string.

  • nm – nominal mass.

  • mass – exact mass.

  • Element count columns (e.g., ⁠12C⁠, ⁠13C⁠, ⁠1H⁠, ⁠14N⁠, ⁠15N⁠, ⁠32S⁠, ⁠34S⁠).

The library is sorted by exact mass and includes all input formulas plus any automatically constructed isotopologues.

Author(s)

Boris Koch

See Also

Other internal functions: extract_aquisition_params(), extract_aquisition_params_from_folder(), extract_metadata_from_ufz_files(), read_xml_peaklist()


ume documentation built on Dec. 13, 2025, 1:06 a.m.