pickAdductPairImage: Display parent/adduct ion pair MSI images

Description Usage Arguments Details Value See Also

View source: R/pickAdductPairImage.R

Description

Interactively display MSI images for ion pairs of interest by clicking on the mass spectrum to select a specific peak (either in the role of a parent or adduct ion). This allows a visual inspection of the MSI image for the pair, to evaluate if the ions are spatially correlated.

Usage

1
2
pickAdductPairImage(d, diff, which = c("parent", "adduct"),
  match = NULL, nrow = NULL, ncol = NULL)

Arguments

d

msimat object used to plot the mass spectrum

diff

massdiff object containing the annotated mass differences of interest, with adduct matches found by adductMatch. If it has been annotated with correlation test results using corrPairsMSI, the correlation coefficient and p-value will also be used to label the plot, in addition to the adduct name and mass difference.

which

character; Whether the peak being selected represents the parent or adduct ion

match

character; Name of the adduct annotation to visualize. If match=NULL (default) then all annotated parent-adduct ion pairs involving this peak will be visualized (warning: there might be a lot of them!)

nrow

numeric

ncol

numeric; Number of rows or columns in the MS image. This will be passed to image.msimat, and at least one of them must be specified if you would like to display the images. Otherwise only the data frame will be returned, without visualization.

Details

The dimensions of the plot must be known and supplied to either the nrow or ncol options. Otherwise, no MSI images will be drawn and only the numerical data reported. Parent and adduct ion images will be plotted side by side, with a new dev object for each pair.

Value

massdiff object with all mass pairs that include the peak of interest subsetted from the object passed to argument diff

See Also

pointsAdducts Overlay adduct or parent ion peaks from a massdiff object onto a mass spectrum plot

plot.msimat Plot method for msimat object to draw mass spectrum with total intensities

identify.msimat Identify peaks on mass spectrum by clicking on the plot

image.msimat Image method for msimat object, to render MSI image for peaks of interest.


kbseah/mass2adduct documentation built on June 9, 2021, 9:20 p.m.