Description Usage Arguments Details Slots Methods Author(s) See Also Examples
The MSImagingExperiment class is designed for mass spectrometry imaging experimental data and metadata. It is designed to contain full MSI experiments, including multiple runs and replicates, potentially across multiple files. Both 2D and 3D imaging experiments are supported, as well as any type of experimental metadata such as diagnosis, subject, time point, etc.
1 2 3 4 5 6 7 8 9 10  | ## Instance creation
MSImagingExperiment(
    imageData = matrix(nrow=0, ncol=0),
    featureData = MassDataFrame(),
    pixelData = PositionDataFrame(),
    metadata = list(),
    processing = SimpleList(),
    centroided = FALSE)
## Additional methods documented below
 | 
imageData | 
 Either a matrix-like object with number of rows equal to the number of features and number of columns equal to the number of pixels, or an   | 
featureData | 
 A   | 
pixelData | 
 A   | 
metadata | 
 A   | 
processing | 
 A   | 
centroided | 
 
  | 
The MSImagingExperiment class is designed as a replacement for the MSImageSet class, using a simplified, robust implementation that should be more future-proof and enable better support for large, high-resolution experiments, multimodal experiments, and experiments with specialized needs such as non-gridded pixel coordinates.
Subclasses MSContinuousImagingExperiment and MSProcessedImagingExperiment exist to allow downstream methods to make assumptions about the underlying data storage (dense matrices for 'continous' format and sparse matrices for 'processed' format), which can sometimes allow more efficient computations.
imageData:An object inheriting from ImageArrayList, storing one or more array-like data elements with conformable dimensions.
featureData:Contains feature information in a MassDataFrame. Each row includes the metadata associated with an m/z value.
elementMetadata:Contains pixel information in a PositionDataFrame. Each row includes the metadata for a single observation (e.g., a pixel), including specialized slot-columns for tracking pixel coordinates and experimental runs.
metadata:A list containing experiment-level metadata.
processing:A SimpleList containing processing steps (including both queued and previously executed processing steps).
centroided:FALSE if the object contains profile spectra and TRUE if the spectra have been peak-picked and centroided.
All methods for ImagingExperiment and SparseImagingExperiment also work on MSImagingExperiment objects. Additional methods are documented below:
spectraData(object), spectraData(object) <- value:Get or set the spectra list (alias for imageData(object)).
spectra(object), spectra(object) <- value:Get or set the spectra (alias for iData(object)).
mz(object), mz(object) <- value:Get or set the m/z values from pixelData.
resolution(object), resolution(object) <- value:Get or set the m/z resolution of the dataset. Typically, this should not be set manually.
centroided(object), centroided(object) <- value:Get or set the spatial position slot-columns from pixelData.
pixels(object, ..., coord, run):Returns the row indices of pixelData corresponding to conditions passed via ....
features(object, ..., mz):Returns the row indices of featureData corresponding to conditions passed via ....
pull(x, ...):Pull all data elements of imageData into memory as matrices.
peaks(object), peaks(object) <- value:Attempt to get or set the matrix of peaks. Alias for spectra() if centroided() is TRUE; replacement version also sets centroided to TRUE.
peakData(object), peakData(object) <- value:Attempt to get or set the underlying m/z and intensity arrays of the peak data in processed experiments. (Currently only implemented for MSProcessedImagingExperiment).
isCentroided(object):Attempts to infer if the mass spectra are centroided or not (without referencing the centroided slot.
msiInfo(object, ...):Returns metadata for writing the object to imzML.
rbind(...), cbind(...):Combine MSImagingExperiment objects by row or column.
Kylie A. Bemis
ImagingExperiment,
SparseImagingExperiment,
MSContinuousImagingExperiment,
MSProcessedImagingExperiment
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  | mz <- mz(from=200, to=220, by=400)
coord <- expand.grid(x=1:3, y=1:3)
data <- matrix(runif(length(mz) * nrow(coord)),
    nrow=length(mz), ncol=nrow(coord))
idata <- ImageArrayList(data)
fdata <- MassDataFrame(mz=mz)
pdata <- PositionDataFrame(coord=coord)
x <- MSImagingExperiment(
    imageData=idata,
    featureData=fdata,
    pixelData=pdata)
print(x)
 | 
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: ‘BiocGenerics’
The following objects are masked from ‘package:parallel’:
    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from ‘package:stats’:
    IQR, mad, sd, var, xtabs
The following objects are masked from ‘package:base’:
    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min
Loading required package: BiocParallel
Loading required package: EBImage
Loading required package: S4Vectors
Loading required package: stats4
Attaching package: ‘S4Vectors’
The following object is masked from ‘package:base’:
    expand.grid
Loading required package: ProtGenerics
Attaching package: ‘ProtGenerics’
The following object is masked from ‘package:stats’:
    smooth
Attaching package: ‘Cardinal’
The following object is masked from ‘package:stats’:
    filter
An object of class 'MSImagingExperiment'
  <239 feature, 9 pixel> imaging dataset
    imageData(1): data0
    featureData(0):
    pixelData(0):
    run(1): run0
    raster dimensions: 3 x 3
    coord(2): x = 1..3, y = 1..3
    mass range: 200.0000 to 219.9758 
    centroided: FALSE 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.