The goal of unsupervised analysis of mass spectrometry (MS) imaging experiments is to discover regions in the data with distinct chemical profiles, and to select the m/z values that uniquely distinguish these different regions from each other.
Algorithmically, this means clustering the data. In imaging experiments, the resulting cluster configurations are called spatial segmentations, and the clusters are called segments.
In this vignette, we present an example segmentation workflow using Cardinal.
We begin by loading the package:
library(Cardinal)
This example uses the PIGII_206 dataset: a cross section of a pig fetus captured using a Thermo LTQ instrument using desorption electrospray ionization (DESI).
First, we load the dataset from the CardinalWorkflows package using exampleMSIData()
.
pig206 <- CardinalWorkflows::exampleMSIData("pig206")
The dataset contains 4,959 spectra with 10,200 m/z values.
pig206
## MSImagingExperiment with 10200 features and 4959 spectra
## spectraData(1): intensity
## featureData(1): mz
## pixelData(3): x, y, run
## coord(2): x = 10...120, y = 1...66
## runNames(1): PIGII_206
## mass range: 150.0833 to 1000.0000
## centroided: FALSE