Reference datasets (envipat.data)

The package bundles the R package’s reference datasets as plain CSV/TXT files. Each dataset is a module attribute of envipat.data that is read from disk on first access and cached afterwards, so importing the module is cheap:

import envipat.data as data

data.isotopes.shape                      # (308, 5)
data.resolution_list["Elite_R240000@400"]

The files were exported once from enviPat’s R datasets, with floating point columns written at full precision, so every value round-trips bit-exactly. The datasets are not re-exported at the top level (envipat.isotopes does not exist), because that would load them at import time.

envipat.data.isotopes: pandas.DataFrame

Isotope masses and natural abundances, 308 rows, one per isotope; R’s data(isotopes). Columns:

element

Element symbol, e.g. "C". Labelled isotopes have their own element entries in brackets, e.g. "[13]C".

isotope

Isotope name, e.g. "13C".

mass

Exact isotope mass (Da).

abundance

Natural abundance as a fraction (1.0 for the labelled entries).

ratioC

Element-to-carbon ratio column of the R dataset; carried over unchanged and not used by the pipeline functions.

This table is the isotopes argument of check_chemform(), isopattern() and isowrap(). Pass a modified copy to change abundances, e.g. for labelling experiments.

envipat.data.chemforms: pandas.Series

107 example chemical formulas (strings, Series name "chemform"); R’s data(chemforms). Useful as test input for the pipeline functions.

envipat.data.adducts: pandas.DataFrame

51 common ESI adducts, positive and negative mode; R’s data(adducts). Columns:

Name

Adduct name, e.g. "M+H", "2M-H".

calc

The mass calculation as text, e.g. "M+1.007276".

Charge

Ion charge (signed integer).

Mult

Molecule multiplier (2 for dimers).

Mass

Mass added to (or, if negative, removed from) Mult times the neutral mass (Da).

Ion_mode

"positive" or "negative".

Formula_add, Formula_ded

Formula added to / deducted from the molecule, or the string "FALSE" if nothing is added / deducted. Use them with mergeform(), check_ded() and subform().

Multi

Multiplier applied to the molecular formula, for use with multiform().

envipat.data.resolution_list: dict[str, pandas.DataFrame]

31 instrument resolution calibration curves (Orbitrap, Q Exactive, TOF, …); R’s data(resolution_list). Keyed by curve name, e.g. "Elite_R240000@400", in the R order. Each value is a two-column DataFrame: mz (the R column m/z, renamed) and R, the resolving power at that m/z. Pass one curve as resmass to get_resolution().

The available curves:

list(data.resolution_list)