MS2spectrum-class {CluMSID} | R Documentation

## A custom S4 class for MS2 spectra, neutral loss patterns and respective metainformation

### Description

A custom S4 class for MS2 spectra, neutral loss patterns and respective metainformation

### Usage

    ## S4 method for signature 'MS2spectrum'
    show(object)

    ## S4 method for signature 'MS2spectrum'
    precursorMz(object)

    ## S4 method for signature 'MS2spectrum'
    rtime(object)

    ## S4 method for signature 'MS2spectrum'
    intensity(object)

    ## S4 method for signature 'MS2spectrum'
    mz(object)

    ## S4 method for signature 'MS2spectrum,ANY'
    peaksCount(object)

### Arguments

`object` | An object of class `MS2spectrum`

### Value

Prints information from the object slots with exception of 'spectrum' and 'neutral_losses' where only a summary is given.

### Methods (by generic)

- `show`: A show generic for `MS2spectra`.

- `precursorMz`: Method for`MSnbase::precursorMz` for `MS2spectrum` objects. Accesses `precursor` slot and returns precursor m/z as a numeric.

- `rtime`: Method for`MSnbase::rtime` for `MS2spectrum` objects. Accesses `rt` slot and returns retention time as a numeric.

- `intensity`: Method for`MSnbase::intensity` for `MS2spectrum` objects. Accesses `spectrum` slot and returns the intensity column as a numeric vector.

- `mz`: Method for`MSnbase::mz` for `MS2spectrum` objects. Accesses `spectrum` slot and returns the m/z column as a numeric vector.

- `peaksCount`: Method for`MSnbase::mz` for `MS2spectrum` objects. Accesses `spectrum` slot and returns the number of peaks as a numeric.

### Slots

`id`

  a character string similar to the ID used by XCMSonline or the ID given in a predefined peak list

`annotation`

  a character string containing a user-defined annotation, defaults to empty

`precursor`

  (median) m/z of the spectrum's precursor ion

`rt`

  (median) retention time of the spectrum's precursor ion

`polarity`

  the ionisation polarity, `"positive"` or `"negative"`

`spectrum`

  the actual MS2 spectrum as two-column matrix (column 1 is (median) m/z, column 2 is (median) intensity of the product ions)

`neutral_losses`

  a neutral loss pattern generated by subtracting the product ion mass-to-charge ratios from the precursor m/z in a matrix format analogous to the `spectrum` slot

[Package CluMSID version 1.0.0 Index]