Learn R Programming

MALDIquant (version 1.11)

plotImsSlice: Plots an Imaging Mass Spectrometry dataset.

Description

This function allows to plot a slice of an Imaging Mass Spectrometry dataset represented by a list of AbstractMassObject objects.

Usage

plotImsSlice(x, range=c(0, Inf),
             sub=paste0("m/z: ", range[1L], "-", range[2L], ""),
             removeEmptyRows=TRUE, removeEmptyCols=TRUE,
             colRamp=colorRamp(c("black", "blue", "green", "yellow", "red")),
             interpolate=FALSE, ...)

Arguments

x
list, list of MassSpectrum/MassPeaks objects.
range
double, length 2, range/thickness of the slice.
sub
character, sub title for the plot, see title.
removeEmptyRows
logical, Should empty rows be removed?
removeEmptyCols
logical, Should empty columns be removed?
colRamp
colours as colorRamp function, see colorRamp for details.
interpolate
logical, use linear interpolation when drawing the image, see rasterImage for details.
...
arguments to be passed to plot.

Details

Each MassSpectrum/MassPeaks object in x must contain a list named imaging with an element pos that stores the x and y value of the spectrum, e.g.: > metaData(spectra[[1]])$imaging$pos x y 1 5

See Also

AbstractMassObject, MassSpectrum, MassPeaks, plot,MassSpectrum,missing-method

Website: http://strimmerlab.org/software/maldiquant/

Example: https://github.com/sgibb/MALDIquantExamples/blob/master/vignettes/ims.Rnw

Shiny example: http://spark.rstudio.com/sgibb/ims/, https://github.com/sgibb/ims-shiny/

Examples

Run this code
plotImsSlice(spectra, range = c(3361.8, 3362.8))

Run the code above in your browser using DataLab