getSuspectMasses: Calculate Masses for various adducts from SMILES

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ChemicalCuration.R

Description

A small wrapper function to calculate adduct masses for any entries in the enviPat adducts table from the SMILES code, using the getMolecule function in rcdk to calculate the formula from SMILES first. Note: current version does not handle labelling as rcdk is used to obtain the formula.

Usage

1
getSuspectMasses(smiles, adduct_list)

Arguments

smiles

Valid SMILES code used to calculate the formula and from then on the masses.

adduct_list

A list of adducts matching those in the enviPat adducts table.

Value

Returns the masses of the given adducts in a matrix with column names matching the given adduct. If the adduct/deduct cannot be calculated for a given entry, NA is returned.

Author(s)

Emma Schymanski <emma.schymanski@uni.lu>

See Also

getMolecule, get.mol2formula, enviPat, check_ded2, getSuspectFormulaMass.

Examples

1
2
3
getSuspectMasses("c1ccccc1", c("M+H","M+NH4"))
getSuspectMasses("c1ccccc1", c("M-H","M-H2O-H"))
getSuspectMasses("c1ccccc1", c("M+H","M+2H","M+3Na"))

schymane/RChemMass documentation built on Jan. 25, 2021, 5:45 a.m.