GCIMSSpectrum is an S4 class to store a GCIMS Spectrum. It can be a single spectrum or the aggregation of several spectra.

GCIMSSpectrum(...)

# S4 method for class 'GCIMSSpectrum'
description(object)

# S4 method for class 'GCIMSSpectrum,ANY'
description(object) <- value

# S4 method for class 'GCIMSSpectrum'
dtime(object)

# S4 method for class 'GCIMSSpectrum'
rtime(object)

# S4 method for class 'GCIMSSpectrum'
intensity(object, dt_range = NULL, dt_idx = NULL)

# S4 method for class 'GCIMSSpectrum'
peaks(object)

# S4 method for class 'GCIMSSpectrum'
peaks(object) <- value

# S4 method for class 'GCIMSSpectrum,ANY'
plot(x, y, ...)

Arguments

...

See the slots section

object

A GCIMSSpectrum object

value

A data frame with the peak list

dt_range

The minimum and maximum drift times to extract (length 2 vector)

dt_idx

A numeric vector with the drift time indices to extract (or a logical vector of the length of drift time)

x

A GCIMSSpectrum object to plot

y

unused

Value

A GCIMSSpectrum object

A data frame with the peaks in the spectrum

The GCIMSSpectrum object

Functions

  • GCIMSSpectrum(): Friendly constructor

  • description(GCIMSSpectrum): Get the description

  • description(object = GCIMSSpectrum) <- value: Set the description

  • dtime(GCIMSSpectrum): Get the drift time vector

  • rtime(GCIMSSpectrum): Get the retention time where this spectrum was extracted

  • intensity(GCIMSSpectrum): Get the intensity matrix

  • peaks(GCIMSSpectrum): Get the peak list

  • peaks(GCIMSSpectrum) <- value: Set the peak list

  • plot(x = GCIMSSpectrum, y = ANY): plot method

Slots

drift_time

A numeric vector with drift times

intensity

A numeric vector with the corresponding intensities

baseline

A numeric vector of the same length as intensity with the corresponding baseline, or NULL if not set. Use estimateBaseline() to estimate it, baseline() to directly access it.

retention_time_idx

The index or indices used to get the intensity

retention_time_s

The retention times corresponding to the retention time indices.

description

A string with a description (used as plot title, useful e.g. to know the sample it came from)

peaks

A data frame with peaks, use findPeaks() to fill it, or peaks() to set/get it

peaks_debug_info

A list with arbitrary debug information from findPeaks()

Examples

spec <- GCIMSSpectrum(drift_time = 1:10, intensity = c(1:5, 6:2))