MSnbase (version 1.20.7)

xic-methods: Extracted ion chromatograms

Description

These methods produce an extracted ion chromatogram given mass-spectrometry data and an ion to be extracted. In addition to the object (see 'Methods' section below), additional arguments are
mz
A numeric specifying the ion mass to be extracted.

width
The M/Z extraction with. Default is 0.5.

rtlim
The retention time limit to be displayed. When missing (default), the complete range of the matching extracted ions is plotted.

npeaks
The number of peaks to be annotated. Default is 3.
charge
The charge of the ion to be extracted. This value is optional; when provided, the mass of the ion (mz above) will first be divided by its charge before extraction.

clean
A logical, defining of the XIC data should be cleaned before plotting. Default if TRUE. See clean for details.
legend
A logical defining if the figure should be annotated.

plot
A logical defining if the plot should be rendered.

points
A logical specifying if points should be added to for each individual MS spectrum. Annotated peaks are coloured in orange and MS2 spectra with precursor M/Z matching the extracted ion are highlighted in red.

hd
The header data.frame corresponding to the object input. hd is generated automatically and can generally be omitted.

...
Additional arguments passed to the plot function.

Note: the methods are currently not vectorised.

xcms::plotEIC provides a similar functionality.

Arguments

Value

The methods invisibly return the data.frame with the the XIC intensities (column int), retention times (column rt) and extracted M/Z values (column mz) used to generate the figure.

Methods

signature(object = "character")
Plots the XIC for the mass-spectrometry data stored in the object file. The file format must be support by mzR. See mzR::openMSfile for details.
signature(object = "mzRramp")
Plots the XIC for the mzRramp instance. See the mzR package for details.

Examples

Run this code
## Not run: 
#     library("RforProteomics")
#     (f <- getPXD000001mzXML())
#     ms <- openMSfile(f)
#     x <- xic(ms, mz = 636.925, width = 0.01)
#     head(x)
#     xic(ms, mz = 636.925, width = 0.01,
#         npeaks = 1,
#         rtlim = c(2000, 2300))
# ## End(Not run)

Run the code above in your browser using DataCamp Workspace