plotChrom-peaksDataset-method: Plotting functions for GCMS data objects

plotChrom,peaksDataset-methodR Documentation

Plotting functions for GCMS data objects

Description

Store the raw data and optionally, information regarding signal peaks for a number of GCMS runs

Usage

## S4 method for signature 'peaksDataset'
plotChrom(
  object,
  runs = 1:length(object@rawdata),
  mzind = 1:nrow(object@rawdata[[1]]),
  mind = NULL,
  plotSampleLabels = TRUE,
  calcGlobalMax = FALSE,
  peakCex = 0.8,
  plotPeaks = TRUE,
  plotPeakBoundaries = FALSE,
  plotPeakLabels = FALSE,
  plotMergedPeakLabels = TRUE,
  mlwd = 3,
  usePeaks = TRUE,
  plotAcrossRuns = FALSE,
  overlap = F,
  rtrange = NULL,
  cols = NULL,
  thin = 1,
  max.near = median(object@rawrt[[1]]),
  how.near = 50,
  scale.up = 1,
  ...
)

Arguments

object

a peaksDataset object.

runs

set of run indices to plot

mzind

set of mass-to-charge indices to sum over (default, all)

mind

matrix of aligned indices

plotSampleLabels

logical, whether to display sample labels

calcGlobalMax

logical, whether to calculate an overall maximum for scaling

peakCex

character expansion factor for peak labels

plotPeaks

logical, whether to plot hashes for each peak

plotPeakBoundaries

logical, whether to display peak boundaries

plotPeakLabels

logical, whether to display peak labels

plotMergedPeakLabels

logical, whether to display 'merged' peak labels

mlwd

line width of lines indicating the alignment

usePeaks

logical, whether to plot alignment of peaks (otherwise, scans)

plotAcrossRuns

logical, whether to plot across peaks when unmatched peak is given

overlap

logical, whether to plot TIC/XICs overlapping

rtrange

vector of length 2 giving start and end of the X-axis

cols

vector of colours (same length as the length of runs)

thin

when usePeaks=FALSE, plot the alignment lines every thin values

max.near

where to look for maximum

how.near

how far away from max.near to look

scale.up

a constant factor to scale the TICs

...

further arguments passed to the plot

Details

Each TIC is scale to the maximum value (as specified by the how.near and max.near values). The many parameters gives considerable flexibility of how the TICs can be visualized.

Value

plot the chromatograms

Author(s)

Mark Robinson

References

Mark D Robinson (2008). Methods for the analysis of gas chromatography - mass spectrometry data PhD dissertation University of Melbourne.

See Also

peaksDataset

Examples


require(gcspikelite)

## paths and files
gcmsPath <- paste(find.package("gcspikelite"), "data", sep="/")
cdfFiles <- dir(gcmsPath, "CDF", full=TRUE)
eluFiles <- dir(gcmsPath, "ELU", full=TRUE)

## read data
pd <- peaksDataset(cdfFiles[1:3], mz=seq(50,550), rtrange=c(7.5,8.5))

## image plot
plotChrom(pd, rtrange = c(7.5,8.5), plotPeaks = TRUE,
          plotPeakLabels = TRUE)

rromoli/flagme documentation built on Feb. 10, 2023, 12:59 a.m.