plotPeak: Plot the identified peaks over the spectrum

View source: R/plotPeak.R

plotPeakR Documentation

Plot the identified peaks over the spectrum

Description

Plot the identified peaks over the spectrum. The identified peaks are returned by peakDetectionCWT() or identifyMajorPeaks()

Usage

plotPeak(
  ms,
  peakIndex = NULL,
  mz = 1:length(ms),
  range = c(min(mz), max(mz)),
  method = c("p", "l"),
  main = NULL,
  log = "",
  ...
)

Arguments

ms

the MS spectrum

peakIndex

m/z indexes of the identified peaks

mz

m/z value correspond to m/z index

range

the plot range of m/z value

method

plot method of the identified peaks. method 'p' plot circles on the peaks; method 'l' add vertical lines over the peaks.

main

parameter of plot()

log

parameter of plot()

...

other parameters of points()

Value

No value is returned; this function is called for its side effects (plot).

Author(s)

Pan Du

See Also

peakDetectionCWT(), identifyMajorPeaks()

Examples


data(exampleMS)
SNR.Th <- 3
peakInfo <- peakDetectionCWT(exampleMS, SNR.Th = SNR.Th)
majorPeakInfo <- peakInfo$majorPeakInfo
peakIndex <- majorPeakInfo$peakIndex
plotPeak(exampleMS, peakIndex, main = paste("Identified peaks with SNR >", SNR.Th))


zeehio/MassSpecWavelet documentation built on May 6, 2023, 1:32 a.m.