plotAvgMS1: A function to plot averaged MS1 spectrum from a 'xcmsRaw'...

Description Usage Arguments Value

Description

This function accepts xcmsRaw object with MS/MS data (direct infusion, data-dependent acquisition) and plot the spectrum and overlay colored lines over the precursors. Additionally, label some selected peaks.

Usage

1
2
3
4
5
6
7
plotAvgMS1(xcmsraw, normalization = "constant", int.divide = 1000,
  col = 1, type = "l", plot.precursor = TRUE, custom.precursor = NULL,
  col.precursor = "light blue", lwd.precursor = 2, lty.precursor = 1,
  baseline = FALSE, col.baseline = "gray50", lty.baseline = 1,
  scans = NULL, mzrange = NULL, ylim = NULL, ad.lab.mzrange = NA,
  ad.top = 3, top = 12, halfWindowSize = NULL, SNR = 50, digits = 4,
  ...)

Arguments

xcmsraw

xcmsRaw object.

normalization

Type of normalization for plotting. Default, "constant". Either "constant", "relative", or "TIC" (percent of total ion current).

int.divide

Intensity normalization factor (simple division). Default, 1000.

col

Default, 1 (=black).

type

Default, "l" (line).

plot.precursor

Logical (default, TRUE). If true, plot lines at the precursor m/z values.

custom.precursor

Default, NULL.

col.precursor

Default, "light blue".

lwd.precursor

Default, 2.

lty.precursor

Default, 1.

baseline

Logical (default TRUE)

col.baseline

The color of baseline. Default, "gray50"

lty.baseline

Line type of baseine. Default, 1.

scans

A numeric vector of scan indexes. If provided, only the indicated scans are averaged and plotted.

mzrange

m/z range to plot.

ylim

Y axis range to plot.

ad.top

The number of additional peak labels.

top

The number of peak labels.

halfWindowSize

See MALDIquant::labelPeaks() for detail.

SNR

See MALDIquant::labelPeaks() for detail.

digits

Digits for peak labels.

ad.lab.

mzrange m/z range to add additional peak labels.

Value

Plot spectrrum. Plus, if assigned to a variable (= invisibly), returns the averaged spectrum as a data frame.


ohgane/ShotgunLipidomicsR documentation built on May 24, 2019, 11:55 a.m.