Cardinal is an R package that implements statistical & computational tools for analyzing mass spectrometry imaging datasets, including methods for efficient pre-processing, spatial segmentation, and classification.


  • May, 2024 — Cardinal 3.6 is released! This is a major update with breaking changes (which we believe are very much worth it). New features include:
    • Redesigned data structures
      • Updated MSImagingExperiment class for MS imaging data with shared m/z values
      • New MSImagingArrays class for MS imaging data with different m/z values
    • All statistical methods (including PCA, PLS, spatial k-means, and spatial shrunken centroids) have been updated for improved speed and simpler storage of results
    • New pre-processing workflow with better support for high-resolution experiments
    • New support for multiple-instance learning
    • New plotting engine
  • November, 2022 — Cardinal 3.0 is released! This is a major update with that will set the framework for many upcoming improvements over the next versions. While there are no big user-visible changes in 3.0, there have been significant improvements on the backend that will affect Cardinal’s support for high-resolution datasets. We will be continuing to build on these improvements over the next several versions, with a focus on easier data import/export and better pre-processing capabilities.
  • October, 2019 — We are teaching Cardinal Workshops at the following mass spectrometry imaging conferences:
  • May 3, 2019Cardinal 2.2 is officially live with Bioconductor 3.9! This is a major update with many changes. Cardinal 2.0 set the groundwork for a migration to the new MSImagingExperiment class, and Cardinal 2.2 fulfills that promise with many new updates, changes, and new features:
    • Defaults for data import have changed:
      • Datasets are imported as MSImagingExperiment objects
      • Spectra from imported datasets are not loaded into memory; they are loaded on-access
    • All statistical methods (including PCA, PLS, spatial k-means, and spatial shrunken centroids) are now fully supported for MSImagingExperiment
    • New statistical methods including spatial-DGMM and hypothesis testing via means-summarized linear models and segmentation-based linear models
    • Pervasive support for parallel computation via BiocParallel
    • New vignettes documenting both basic use and statistical methods for MSImagingExperiment
    • Visualization enhancements:
      • Colorkeys for images are now plotted on the side
      • Default colorscale for images is now “viridis”
      • “Dark mode”
    • Improved simulation of spectra and imaging experiments
    • Out-of-memory enhancements in matter backend
    • Exhaustive list of changes documented here on Bioconductor NEWS
  • May 1-3, 2019 — We will teach a Cardinal workshop as part of the May Institute short course series in computation and statistics for proteomics
    • See the May Institute course website for more details
    • Workshop will include an introductory lecture to basic Cardinal concepts, followed by a hands-on tutorial of common statistical analyses
  • October 30, 2018Cardinal 2.0 is available on Bioconductor 3.8! This is a major update with many new features including:
    • New MS imaging data classes with improved support for working with large experiments
    • Rewritten visualization methods with support for non-gridded pixel coordinates and new color schemes
    • Full read/write support for both imzML ‘continuous’ and ‘processed’ formats
    • New preprocessing workflows with support for queueing of delayed processing steps and out-of-memory parallel execution
  • May 4, 2016Cardinal 1.4 is available on Bioconductor 3.3
  • December 16, 2015Cardinal 1.3 is available on Github with *experimental* support for:
    • Working with larger-than-memory datasets on disk
    • 3D imaging datasets
    • imzML ‘processed’ format
  • June 10, 2015Cardinal wins the John M. Chambers Statistical Software Award 2015 presented by the American Statistical Association



  • Visualization of mass spectra and molecular ion images
  • Pre-processing including normalization, baseline correction, peak-picking and alignment
  • Principal components analysis (PCA)
  • Partial least squares discriminant analysis (PLS-DA)
  • Classification based on regularized nearest shrunken centroids
  • Spatial segmentation via regularized nearest shrunken centroid clustering