This function computes the accurate mass from the given precursor m/z and adduct type. It uses specific rules to adjust the provided m/z based on the adduct type, and then calculates the accurate mass of the molecule.

convert_precursor_mz2accurate_mass(precursor_mz = 805.559, adduct = "2M-2H+Na")

Arguments

precursor_mz

A numeric value representing the precursor m/z value. Default is 805.559.

adduct

A character string representing the type of adduct. Possible values include but are not limited to "M+", "M-", and "2M-2H+Na". Default is "2M-2H+Na".

Value

A numeric value representing the accurate mass of the molecule based on the precursor m/z and adduct type.

Author

Xiaotao Shen <shenxt1990@outlook.com>

Examples

convert_precursor_mz2accurate_mass(
precursor_mz = 805.559,
adduct = "2M-2H+Na")
#> [1] 392.2924