Package: SpaMTP 0.99.10

Tianyao Lu

SpaMTP: Spatial Metabolomics and Multi-Omics Analysis

Provides analysis, annotation, visualisation, and multi-omic integration methods for spatial metabolomics data. SpaMTP interoperates with Cardinal and SpatialExperiment containers, with optional Seurat conversion; supports indexed accurate-mass annotation using versioned RaMP resources; and implements spatial feature analysis, pathway enrichment, pathway-network visualisation, and alignment with spatial transcriptomics data.

Authors:Andrew Causer [aut], Tianyao Lu [aut, cre], Christopher C.J. Fitzgerald [aut], GML Lab [lbr], Brain Cancer Research Lab [lbr], UQ Institute [fnd], QIMR Institute [fnd], WEHI Institute [fnd]

SpaMTP_0.99.10.tar.gz
SpaMTP_0.99.10.zip(r-4.7-any)SpaMTP_0.99.10.zip(r-4.6-any)SpaMTP_0.99.10.zip(r-4.5-any)
SpaMTP_0.99.10.tgz(r-4.6-any)SpaMTP_0.99.10.tgz(r-4.5-any)
SpaMTP_0.99.10.tar.gz(r-4.7-any)SpaMTP_0.99.10.tar.gz(r-4.6-any)
SpaMTP_0.99.10.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
SpaMTP/json (API)

# Install 'SpaMTP' in R:
install.packages('SpaMTP', repos = c('https://biocstaging.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/spamtp-project/spamtp/issues

Pkgdown/docs site:https://genomicsmachinelearning.github.io

Datasets:

On CRAN:

Conda:

massspectrometryimagingmassspectrometrymetabolomicsspatialtranscriptomicsalignment

4.45 score 20 scripts 107 exports 220 dependencies

Last updated from:2c54b7bdef. Checks:1 NOTE, 9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
bioc-checksNOTE299
linux-develOK626
source / vignettesOK2358
linux-releaseOK615
macos-releaseOK508
macos-oldrelOK421
windows-develOK595
windows-releaseOK569
windows-oldrelOK584
wasm-releaseOK255

Exports:addCustomMZAnnotationsaddFMP10AnnotationsaddSMImageaddSpatialImageaddSSCAnnotationaddTranscriptomeadductRulesalignSpatialOmicsanalyzeSpaMTPRegionsannotateBigDataannotateGeneIdentifiersannotateMZannotateSMannotateSMILESStructureannotationInfoapplySpatialAlignmentasCardinalasSpatialExperimentbinMetabolitesbinnedCardinalToSeuratbinSpaMTPbuildGeneMappingIndexbuildMZAnnotationIndexbuildPathwayIndexcalculateAnnotationStatisticscalculateSingleAnnotationStatisticscardinalToSeuratcardinalToSpatialExperimentcheckAlignmentcombineTransformationsconvertSeuratToCardinalcreateMergedModalityAssaycreatePathwayAssaycreatePathwayObjectdeconvolveSMILESdemsHeatmapdensityMapfindAllDEMsfindCorrelatedFeaturesfindDuplicateAnnotationsfindNearestMZfindRegionalPathwaysfindSpatiallyVariableMetabolitesfishersPathwayAnalysisgetKmeanClustersgetMetaspacegetMZMetadatagetRefinedAnnotationsgetSpatiallyVariableMetabolitesgetSquareCoordinatesimageMZAnnotationPlotimageMZPlotinteractiveSpatialPlotkNeighborsGraphloadMetaspaceloadSMloadSpaMTPDatabasemaldiMatrixProfilesmaldiMatrixRulesmapGeneIdentifiersmapSpatialOmicsmassIntensityPlotmetaspaceClientmetaspaceToFeatureMatrixmultiOmicIntegrationmzBoxPlotmzRidgePlotmzViolinPlotnormalizeSMDatapathwayNetworkPlotspixelPlotplot3DFeatureplotPathwaysplotPathwaysSpatiallyplotRegionalPathwaysplotSinglePathwayplotSinglePathwaySpatiallyplotSpatialFeaturepredictAdductsFromSMILESqueryMZAnnotationIndexreadSMMatrixrefineLipidsrenderSpaMTPReportrunDErunMetabolicPCArunPoolingrunRAMPGesecarunSpaMTPWorkflowrunSpatialGraphPCAsavePheatmapAsPDFsaveSpaMTPDatascaleSMDatasearchAnnotationsselectROIsseuratToSingleCellExperimentseuratToSpatialExperimentspaMTPDatabaseInfospatialExperimentToCardinalspatialExperimentToSeuratspatialMZAnnotationPlotspatialMZPlotspectralBinningstatPlotsubsetMZFeaturessubsetSPMtmmNormalizevisualisePathways

Dependencies:abindaffyaffyioAnnotationDbiAnnotationFilterAnnotationHubapeaskpassassortheadbase64encbeachmatbeeswarmBHBiobaseBiocBaseUtilsBiocFileCacheBiocGenericsbiocmakeBiocManagerBiocNeighborsBiocParallelBiocSingularBiocVersionBiostringsbitbit64blobblusterbslibcachemCardinalCardinalIOclassclassIntcliclueclustercodetoolscommonmarkcowplotcpp11crayoncrosstalkcurldata.tableDBIdbplyrDelayedArrayDelayedMatrixStatsdigestdir.expirydoParalleldplyrdqrngDropletUtilse1071edgeRevaluatefarverfastmapfastmatchfgseafilelockFNNfontawesomeforeachformatRfsfutile.loggerfutile.optionsfuturefuture.applygenericsGenomicRangesggbeeswarmggdendroggplot2ggrepelggridgesglobalsgluegridExtragtableh5mreadHDF5Arrayhighrhtmltoolshtmlwidgetshttpuvhttrhttr2igraphimputeIRangesirlbaisobanditeratorsjquerylibjsonliteKEGGRESTKernSmoothknitrlabelinglambda.rlaterlatticelazyevallifecyclelimmalistenvlocfitmagickmagrittrMALDIquantMASSMatrixMatrixGenericsmatrixStatsmattermclustmemoiseMetaboCoreUtilsmetapodmimeMsCoreUtilsMSnbaseMultiAssayExperimentmzIDmzRnaturalsortncdf4nlmeontologyIndexopensslotelparallellypcaMethodspheatmappillarpkgconfigplotlyplyrpngpreprocessCorepromisesProtGenericsproxyPSMatchPTModspurrrQFeaturesR.methodsS3R.ooR.utilsR6rappdirsRColorBrewerRcppRcppAnnoyRcppEigenRcppMLRcppProgressreshape2rgoslinrhdf5rhdf5filtersRhdf5librjsonrlangrmarkdownRSpectraRSQLitersvdRtsnes2S4ArraysS4VectorsS7sassScaledMatrixscalesscaterscranscuttleSeqinfosfshinySingleCellExperimentsitmosnowsourcetoolsSpaMTPdbSparseArraysparseMatrixStatsSpatialExperimentSpectrastatmodstringistringrSummarizedExperimentsystibbletidyrtidyselecttinytexunitsutf8uwotvctrsviporviridisviridisLitevsnwithrwkxfunXMLxtableXVectoryaml

SpaMTP: Modern Data Access and Workflow Migration
One container, public accessors | Read a binned MSI table | Pixel and feature metadata | Coordinates and optical images | Paired modalities and standard subsetting | Optional Seurat boundary

Last update: 2026-09-22
Started: 2026-09-13

Auditable gene mapping with SpaMTPdb and SpaMTPData
Reference ownership and reproducibility | Build once, inspect before testing | Annotate experiment features without altering expression | Use the whole measured panel as the universe | One membership index for enrichment, expression and plots

Last update: 2026-09-22
Started: 2026-09-13

Designing and evaluating a spatial multi-omics workflow
Analysis questions determine the workflow | Supply modalities and study design explicitly | Compare representations using the same observations and features | Region characterization is richer than a mean difference | Keep biological-replicate inference separate | Ask whether colocalization survives regional composition | Map identities before pathway statistics | Run the real mouse-brain reference recipes | Render and retain a reviewable analysis

Last update: 2026-09-22
Started: 2026-09-21

Pathway databases, interaction provenance, and rebuilding graphs
Membership and topology are separate resources | Identifier consolidation | Interaction correction | Loading and inspecting corrected graphs | Reproducing the correction

Last update: 2026-09-22
Started: 2026-09-21

SpaMTP, SpaMTPdb and SpaMTPData: A Native Companion Workflow
Clear responsibilities | Data to a native analysis container | Database discovery without network access | Annotate without inventing a downloaded database | Published native datasets and historical archives

Last update: 2026-09-22
Started: 2026-09-13

SpaMTP: Indexed Metabolite Annotation with RaMP 3.0
Overview | RaMP snapshot and identifiers | A small 2-hydroxyglutarate example | From functional groups to ion-mode behaviour | Validated adduct rules | Build the reusable index | Chemical validity pruning | Query and rank candidates | Adduct-family support | Mass-defect heuristic | Annotate individual values or a SpaMTP object | Choose thresholds without re-annotation | Production use with the complete RaMP table | Carry the annotation threshold into real pathway analysis | Interpretation and limitations

Last update: 2026-09-22
Started: 2026-09-13

SpaMTP: Spatial Metabolite Annotation
Overview | Bioconductor container model | A binned MSI workflow | Alignment and pixel mapping | Binning and statistical reuse | Native feature plots and annotation ranking | Optional Seurat conversion boundary | Inspect available database resources | Create a small structure-aware database | Build and query an indexed search space | Reproducibility

Last update: 2026-09-22
Started: 2026-08-14

Readme and manuals

Help Manual

Help pageTopics
Adds in backslashes required to take into account special using grepl such as brackets and +add_backslashes_to_specialfeatures
Assign custom annotations to m/z valuesaddCustomMZAnnotations
Annotates FMP10 matrix dataaddFMP10Annotations
Attach and optionally align an optical image to MSIaddSMImage
Add an image using SpatialExperiment infrastructureaddSpatialImage addSpatialImage,SpatialExperiment-method
Adds Cardinal ssc segmentation annotation to m/z count data objectaddSSCAnnotation
Store a paired transcriptome as an alternative experimentaddTranscriptome addTranscriptome,SpatialExperiment-method
Common adduct constantsadduct_file
Return the validated SpaMTP adduct rule tableadductRules
Align two spatial experiments using an affine transformationalignSpatialOmics
Add region summaries and native spatial analyses to a workflow resultanalyzeSpaMTPRegions
Annotates vector of m/z valuesannotateBigData
Store gene mapping in a native experiment's row metadataannotateGeneIdentifiers
Annotate one or more observed m/z valuesannotateMZ
Annotates m/z values stored in a SpaMTP ObjectannotateSM
Add SMILES-derived structural features to a metabolite databaseannotateSMILESStructure
Annotates m/z values stored in a data.frame based on reference metabolite datasetannotateTable
Inspect the metabolite annotation provenance stored in a SpaMTP objectannotationInfo
Apply automatic or precomputed spatial alignmentapplySpatialAlignment
Convert a SpatialExperiment to a Cardinal experimentasCardinal asCardinal,MSImagingArrays-method asCardinal,MSImagingExperiment-method asCardinal,SpatialExperiment-method
Convert an object to a SpatialExperimentasSpatialExperiment asSpatialExperiment,MSImagingArrays-method asSpatialExperiment,MSImagingExperiment-method asSpatialExperiment,SpatialExperiment-method asSpatialExperiment,SummarizedExperiment-method
Sum selected metabolite features per pixelbinMetabolites
Convert a binned Cardinal matrix to an optional Seurat objectbinnedCardinalToSeurat
Bin aligned spatial metabolomics featuresbinSpaMTP binSpaMTP,ANY-method binSpaMTP,MSImagingArrays-method binSpaMTP,MSImagingExperiment-method binSpaMTP,SpatialExperiment-method
Build a gene identity index from RaMP and HGNCbuildGeneMappingIndex
Build a reusable indexed metabolite annotation search spacebuildMZAnnotationIndex
Build a shared, auditable pathway membership indexbuildPathwayIndex
Calculates the mz range of the observed_dfcalculate_bounds
Rank annotations for all MSI featurescalculateAnnotationStatistics
Rank candidate metabolite annotations using paired pathway expressioncalculateSingleAnnotationStatistics
Convert a Cardinal object to an optional Seurat objectcardinalToSeurat
Convert an aligned Cardinal experiment to SpatialExperimentcardinalToSpatialExperiment
Checks if the complete adduct is in the data base, else returns a truncated adductcheck_and_truncate_adduct_vector
Check Cardinal Versioncheck_cardinal_version
Inspect the alignment of two spatial experimentscheckAlignment
Combines rigid tranformation matricescombineTransformations
Convert an optional Seurat object to CardinalconvertSeuratToCardinal
Combine paired modalities in a scaled alternative experimentcreateMergedModalityAssay
Create a RaMP identity alternative experimentcreatePathwayAssay
Store pathway scores in an alternative experimentcreatePathwayObject
Filters the provided metabolomic database by polarity and adductsdb_adduct_filter
Decompose explicit functional groups in SMILES stringsdeconvolveSMILES
Heatmap of Differentially Expressed MetabolitesdemsHeatmap
Export an interactive spatial detection-density viewerdensityMap
Access SpaMTP data through Bioconductor containersexperimentAccess
Finds differentially expressed m/z values/metabolites between all comparison groups.findAllDEMs
Find features correlated with a metabolite, gene, or pixel groupfindCorrelatedFeatures
Finds if any metabolite is duplicated across multiple m/z values.findDuplicateAnnotations
Finds the nearest m/z peak to a given value in a SpaMTP ObjectfindNearestMZ
Regional Pathway EnrichmentfindRegionalPathways
Find spatially variable metabolites using Moran's IfindSpatiallyVariableMetabolites
Fisher Exact Tests for Pathway EnrichmentfishersPathwayAnalysis
Filters reference Database to only select natural elementsformula_filter
Helper function for building a pathway db based on detectedget_analytes_db
Perform K-means clustering on a specified reductiongetKmeanClusters
Core METASPACE Data RetrievalgetMetaspace
Gets values from a single metadata column for a respective m/z value.getMZMetadata
Refines and reduces m/z annotationsgetRefinedAnnotations
Get the top spatially variable metabolitesgetSpatiallyVariableMetabolites
This function computes the coordinates of a square's four corners based on a given center point and width.getSquareCoordinates
Plot annotated metabolites without an optical imageimageMZAnnotationPlot
Plot MSI features from a Bioconductor spatial containerimageMZPlot
Interactively inspect mass windows in a spatial experimentinteractiveSpatialPlot
Construct a k-Nearest Neighbour Graph from Spatial Coordinates.kNeighborsGraph
Filters the annotation list to only include the first n number of annotations per m/zlabels_to_show
Load METASPACE Data as a SpatialExperimentloadMetaspace
Load imzML data into a Bioconductor-native spatial containerloadSM
Load versioned SpaMTP annotation resourcesloadSpaMTPDatabase
List MALDI matrix and on-tissue derivatization profilesmaldiMatrixProfiles
Select annotation rules from the MALDI matrix/reagent profilemaldiMatrixRules
Map gene identifiers with an auditable HGNC identitymapGeneIdentifiers
Map metabolite intensities to transcriptomic pixels or cellsmapSpatialOmics
Plot mean mass spectra from a native spatial experimentmassIntensityPlot
Metaspace R Client ConstructormetaspaceClient
Convert METASPACE Images to Feature MatrixmetaspaceToFeatureMatrix
Integrate paired modalities using native PCA embeddingsmultiOmicIntegration multiOmicIntegration,ANY-method multiOmicIntegration,SpatialExperiment-method
Generates a Boxplot of spatial metabolic intensity datamzBoxPlot
Generates a ridge plot of spatial metabolic intensity datamzRidgePlot
Generates a violin plot of spatial metabolic intensity datamzViolinPlot
Normalize spatial metabolomics intensity datanormalizeSMData normalizeSMData,ANY-method normalizeSMData,MSImagingArrays-method normalizeSMData,MSImagingExperiment-method normalizeSMData,SingleCellExperiment-method
Construct an interactive pathway network visualizationpathwayNetworkPlots
Convert point symbols to squares without changing coordinates or scalespixelPlot
Compare two spatial features in 3Dplot3DFeature
Plot named pathways on a dimensionality reductionplotPathways
Plot named pathways in tissue coordinatesplotPathwaysSpatially
Plot significantly enriched pathways per regionplotRegionalPathways
Plot a pathway score on a Bioconductor dimensionality reductionplotSinglePathway
Plot a pathway score in tissue coordinatesplotSinglePathwaySpatially
Plot spatial features from a Bioconductor containerplotSpatialFeature plotSpatialFeature,MSImagingExperiment-method plotSpatialFeature,SpatialExperiment-method
Calculates the ppm error as a valveppm_error
Check whether m/z values match within a ppm toleranceppm_range_match
Predict a structure-aware adduct search space from SMILESpredictAdductsFromSMILES
Print an indexed metabolite annotation search spaceprint.spamtp_mz_index
Find all library spectra10 above a cosine threshold for each imaging peak, restricting to a global precursor-mz range.Pseudo_msms
Query an indexed metabolite annotation search spacequeryMZAnnotationIndex
Pathway-network reaction stylesreaction_type
Read a binned spatial metabolomics matrixreadSMMatrix
Uses common lipid nomenclature to simplify lipid annotationsrefineLipids
Render a portable, self-contained multi-omics reportrenderSpaMTPReport
Run limma contrasts on log-transformed technical poolsrunDE
Compute PCA with scater on a selected experimentrunMetabolicPCA
Pools Bioconductor experiment into random pools for pseudo-bulking.runPooling
Runs multilevel Monte-Carlo variant for performing gene sets co-regulation analysis using the RAMP_DB metabolite/gene database.runRAMPGeseca
Run a reproducible spatial multi-omics workflow and HTML reportrunSpaMTPWorkflow
Perform Dimensionality Reduction using Graph-Regularised PCA on Spatial DatarunSpatialGraphPCA
Saves a demsHeatmap as a PDFsavePheatmapAsPDF
Export an experiment's expression matrix and metadatasaveSpaMTPData
Centre and scale features within a Bioconductor experimentscaleSMData
Find AnnotationsearchAnnotations
Launch an Interactive ROI Annotation App for SpatialExperimentselectROIs
Convert Seurat expression data to SingleCellExperimentseuratToSingleCellExperiment
Convert a Seurat object to SpatialExperimentseuratToSpatialExperiment
Inspect SpaMTP database resourcesspaMTPDatabaseInfo
Convert a SpatialExperiment to CardinalspatialExperimentToCardinal
Convert a SpatialExperiment to an optional Seurat objectspatialExperimentToSeurat
Plot annotated metabolites with optional optical imagesspatialMZAnnotationPlot
Plot MSI features with optional optical imagesspatialMZPlot
Spectral binning of intensity values stored in a Matrix object, converted from matter.spectralBinning
Helper function for QC plots by generating intensity count datastatPlot
Subset a Bioconductor experiment by a list of m/z'ssubsetMZFeatures
Subset features and pixels through Bioconductor containerssubsetSPM
Performs TMM normalization between categories based on a specified identtmmNormalize
Visualise Significant PathwaysvisualisePathways