Skip to contents

The MassSpecResults_Chromatograms class represents the results of chromatograms from mass spectrometry analyses.

Usage

MassSpecResults_Chromatograms(
  chromatograms = list(),
  replicates = character(),
  is_averaged = FALSE,
  peaks = list(),
  calibration_model = list()
)

# S3 method for class 'MassSpecResults_Chromatograms'
validate_object(x)

# S3 method for class 'MassSpecResults_Chromatograms'
show(x)

# S3 method for class 'MassSpecResults_Chromatograms'
x[i]

# S3 method for class 'MassSpecResults_Chromatograms'
get_chromatograms(
  x,
  analyses = NULL,
  chromatograms = NULL,
  rtmin = 0,
  rtmax = 0,
  minIntensity = NULL
)

# S3 method for class 'MassSpecResults_Chromatograms'
plot_chromatograms(
  x,
  analyses = NULL,
  chromatograms = NULL,
  rtmin = 0,
  rtmax = 0,
  minIntensity = NULL,
  normalized = TRUE,
  xLab = NULL,
  yLab = NULL,
  title = NULL,
  colorBy = "analyses+targets",
  legendNames = NULL,
  interactive = TRUE,
  renderEngine = "webgl"
)

# S3 method for class 'MassSpecResults_Chromatograms'
plot_chromatograms_baseline(
  x,
  analyses = NULL,
  chromatograms = NULL,
  xLab = NULL,
  yLab = NULL,
  title = NULL,
  colorBy = "analyses",
  interactive = TRUE,
  renderEngine = "webgl"
)

# S3 method for class 'MassSpecResults_Chromatograms'
get_chromatograms_peaks(
  x,
  analyses = NULL,
  chromatograms = NULL,
  rtmin = 0,
  rtmax = 0,
  minIntensity = NULL
)

# S3 method for class 'MassSpecResults_Chromatograms'
plot_chromatograms_peaks(
  x,
  analyses = NULL,
  chromatograms = NULL,
  rtmin = 0,
  rtmax = 0,
  minIntensity = NULL,
  xLab = NULL,
  yLab = NULL,
  title = NULL,
  colorBy = "analyses+targets",
  legendNames = NULL,
  interactive = TRUE,
  renderEngine = "webgl"
)

Arguments

chromatograms

A character or integer vector with the ID (i.e. name) or the index of the chromatograms.

replicates

A character vector of replicate identifiers.

is_averaged

A logical value indicating whether the chromatograms are averaged across replicates.

peaks

A list of peaks, each represented as a data frame.

calibration_model

A list representing the calibration model used for the chromatograms.

x

An object of class MassSpecResults_Chromatograms.

i

A character or numeric vector to perform subsetting. Check the specific method for details.

analyses

Character or numeric vector with names or indexes of analyses in the Analyses object.

rtmin

Numeric (length 1) with the minimum retention time.

rtmax

Numeric (length 1) with the maximum retention time.

minIntensity

Numeric (length 1) with the minimum intensity.

normalized

A logical value indicating whether the result should be normalized.

xLab

A string with the title for the x axis.

yLab

A string with the title for the y axis.

title

A string with the title.

colorBy

A string defining how to legend the plot. Possible values are analyses, targets (the default) or replicates.

legendNames

A character vector with the same length as the targets or TRUE or FALSE for using the name in the added targets as legend of the plot.

interactive

Logical (length 1). When TRUE, the data is plotted interactively using plotly.

renderEngine

The engine to render the data. The default is "webgl".

Value

An object of class MassSpecResults_Chromatograms.

Methods (by generic)

  • validate_object(MassSpecResults_Chromatograms): Validate the MassSpecResults_Chromatograms object, returning NULL if valid.

  • show(MassSpecResults_Chromatograms): Show the MassSpecResults_Chromatograms object.

  • [: Subset the chromatograms object.

  • get_chromatograms(MassSpecResults_Chromatograms): Get chromatograms from the MassSpecResults_Chromatograms object, returning a list of data.table objects for each analysis.

  • plot_chromatograms(MassSpecResults_Chromatograms): Plot chromatograms from the MassSpecResults_Chromatograms object.

  • plot_chromatograms_baseline(MassSpecResults_Chromatograms): Plot chromatograms with baseline from the MassSpecResults_Chromatograms object.

  • get_chromatograms_peaks(MassSpecResults_Chromatograms): Get peaks from the chromatograms object.

  • plot_chromatograms_peaks(MassSpecResults_Chromatograms): Plot peaks from the chromatograms object.