| plotMsiSlice-methods {MALDIquant} | R Documentation |
Plots a Mass Spectrometry Imaging dataset.
Description
This function allows to plot a slice of a mass spectrometry imaging dataset
represented by a list of AbstractMassObject objects
or an array or a matrix.
Usage
## S4 method for signature 'list'
plotMsiSlice(x, center, tolerance,
colRamp=colorRamp(c("black", "blue", "green", "yellow", "red")),
interpolate=FALSE, legend=TRUE, alignLabels=FALSE, combine=FALSE,
...)
## S4 method for signature 'array'
plotMsiSlice(x,
colRamp=colorRamp(c("black", "blue", "green", "yellow", "red")),
interpolate=FALSE, legend=TRUE, alignLabels=FALSE, combine=FALSE,
plotInteractive=FALSE, ...)
## S4 method for signature 'matrix'
plotMsiSlice(x,
colRamp=colorRamp(c("black", "blue", "green", "yellow", "red")),
interpolate=FALSE, scale=TRUE, legend=scale, ...)
Arguments
x |
The mass spectrometry imaging dataset. It could be a |
center |
|
tolerance |
|
colRamp |
colours as |
interpolate |
|
scale |
|
legend |
|
alignLabels |
|
combine |
|
plotInteractive |
|
... |
arguments to be passed to |
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
Author(s)
Sebastian Gibb mail@sebastiangibb.de
See Also
AbstractMassObject,
MassSpectrum,
MassPeaks,
coordinates,AbstractMassObject-method,
msiSlices,
plot,MassSpectrum,missing-method
Please find real examples on:
Website: https://strimmerlab.github.io/software/maldiquant/
Vignette: https://github.com/sgibb/MALDIquantExamples/raw/master/inst/doc/nyakas2013.pdf
Shiny: https://github.com/sgibb/ims-shiny/
Examples
## load package
library("MALDIquant")
## load example data
data("fiedler2009subset", package="MALDIquant")
## please note: this is NOT a MSI data set
## we just add some coordinates for demonstration
coordinates(fiedler2009subset) <- cbind(x=rep(1:4, 2), y=rep(1:2, each=4))
plotMsiSlice(fiedler2009subset, center=8936.97, tolerance=0.25)
plotMsiSlice(fiedler2009subset, center=c(5864.49, 8936.97), tolerance=0.25,
combine=TRUE,
colRamp=list(colorRamp(c("#000000", "#FF00FF")),
colorRamp(c("#000000", "#00FF00"))))