GCIMSSpectrumSet is an S4 class to store one GCIMSSpectrum per sample of a GCIMSDataset, together with a copy of pData() so plots can use the dataset's annotations.

Samples are not required to share a common drift time axis: each spectrum keeps its own, exactly as extracted from its sample. No interpolation is performed.

# S4 method for class 'GCIMSSpectrumSet'
sampleNames(object)

# S4 method for class 'GCIMSSpectrumSet,ANY'
sampleNames(object) <- value

# S4 method for class 'GCIMSSpectrumSet'
pData(object)

# S4 method for class 'GCIMSSpectrumSet'
length(x)

# S4 method for class 'GCIMSSpectrumSet'
x[[i]]

# S4 method for class 'GCIMSSpectrumSet,ANY'
plot(x, color_by = "SampleID", ...)

Arguments

object

A GCIMSSpectrumSet object

value

A character vector of length the number of spectra with the new sample names

x

A GCIMSSpectrumSet object to plot

i

A number or a string with the sample index or name

color_by

The name of a pData(x) column (or "SampleID") used to color the spectra

...

Ignored

Value

A character vector with the sample names

The GCIMSSpectrumSet object, with samples renamed in both spectra and pData()

A tibble with the phenotype data, or NULL if not set

An integer with the number of spectra

The GCIMSSpectrum of the requested sample

A ggplot2 plot object

Functions

  • sampleNames(GCIMSSpectrumSet): Get the sample names

  • sampleNames(object = GCIMSSpectrumSet) <- value: Set the sample names

  • pData(GCIMSSpectrumSet): Get the phenotype data

  • length(GCIMSSpectrumSet): Number of spectra (samples) in the set

  • [[: Extract the spectrum of a single sample

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

Slots

spectra

A named list of GCIMSSpectrum objects, one per sample, named after their SampleID.

pData

A DataFrame with the phenotype data, or NULL.

See also