mass2adductmz: Conversions between real mass and M/Z of possible ion adducts

Description Usage Arguments Details Value Methods Author(s) References Examples

Description

The mass2adductmz and adductmz2mass enable the conversion between the mass of a compound and the M/Z value for a specific, or all possible, ion adducts for that compound. For conversion the data provided by the Fiehn lab (in their ESI-MS-adduct calculator) is used.

Usage

1
2
3
4
5
6
7
8
## S4 method for signature 'numeric'
adductmz2mass(x, ionAdduct=supportedIonAdducts())

## S4 method for signature 'numeric'
mass2adductmz(x, ionAdduct=supportedIonAdducts())

## S4 method for signature 'missing,character'
supportedIonAdducts(x, charge="both")

Arguments

(in alphabetic order)

charge

For supportedIonAdducts: either "pos", "neg" or "both" (the default) to return the names of the supported positive, negative, or all ion adducts, respectively.

ionAdduct

A character string or vector representing the name of an ion adduct. By default, the most commonly found adducts in ESI are used. See supportedIonAdducts for all supported ion adduct names. If NULL is used, the compound is supposed to be already an ion and thus no conversion is performed.

x

For adductmz2mass and mass2adductmz: A numeric representing either the mass of a compound (for mass2adductmz) or the M/Z (for adductmz2mass) to be converted.

Details

The mass and adduct information are taken from the ESI MS adduct calculator from the Fiehn lab [Huang 1999].

Value

See method description above.

Methods

adductmz2mass

Converts the M/Z value to the mass of the compound, assuming that the measured M/Z value corresponds to one of the most commonly seen ion adducts. The name of the ion adduct (or of several adducts) can be specified with the ionAdduct argument. By default, the M/Z for the most common adducts are used (those returned by the supportedIonAdducts method). If ionAdduct is NULL the input values are returned, i.e. it is assumed that the mass corresponds already to an ion

The method returns a list of masses, with the names of the list representing the ion adduct and the elements the mass for these ion adducts.

mass2adductmz

Converts the mass of a compound to M/Z values for the most commonly found ion adducts. The name of the ion adduct (or of several adducts) can be specified with the ionAdduct argument. By default, the M/Z for the most common adducts are used (those returned by the supportedIonAdducts method). If ionAdduct is NULL the input values are returned, i.e. it is assumed that the mass corresponds already to an ion.

The method returns a list of M/Z values, the names corresponding to the name of the ion adduct and the elements being the M/Z values for these.

supportedIonAdducts

Returns a character vector with the names of the supported ion adducts.

Author(s)

Johannes Rainer

References

Huang N, Siegel MM, Kruppa GH & Laukien FH (1999) Automation of a Fourier transform ion cyclotron resonance mass spectrometer for acquisition, analysis, and e-mailing of high-resolution exact-mass electrospray ionization mass spectral data. Journal of the American Society for Mass Spectrometry. pp1166-1173.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Get the names of all supported ion adducts
supportedIonAdducts()

## Get the names of the negative ion adducts
supportedIonAdducts(charge="neg")

## Specify some M/Z values.
mzs <- c(169.2870, 169.5650, 346.4605)

## Get the masses for these M/Z values assuming that they are from negative ion
## adducts of the real compound.
negMass <- adductmz2mass(mzs, ionAdduct=supportedIonAdducts(charge="neg"))

## The mass assuming that the M/Z corresponds to the M-H adduct.
negMass[["M-H"]]

## Calculating the mass form the 'M-H' adduct.
mass2adductmz(negMass[["M-H"]], ionAdduct="M-H")

jotsetung/xcmsExtensions documentation built on May 19, 2019, 9:42 p.m.