Package: SpaMTP 0.99.20

Tianyao Lu

SpaMTP: Spatial Metabolomics and Multi-Omics Analysis

Provides analysis, annotation, visualisation, and multi-omic integration methods for spatial metabolomics data. It interoperates with Cardinal and SpatialExperiment containers, with optional Seurat conversion, and supports indexed accurate-mass annotation using versioned RaMP resources. Methods include 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.20.tar.gz
SpaMTP_0.99.20.zip(r-4.7-any)SpaMTP_0.99.20.zip(r-4.6-any)SpaMTP_0.99.20.zip(r-4.5-any)
SpaMTP_0.99.20.tgz(r-4.6-any)SpaMTP_0.99.20.tgz(r-4.5-any)
SpaMTP_0.99.20.tar.gz(r-4.7-any)SpaMTP_0.99.20.tar.gz(r-4.6-any)
SpaMTP_0.99.20.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:

massspectrometryimagingmassspectrometrymetabolomicsspatialtranscriptomicsalignmentnetwork

4.54 score 129 exports 166 dependencies

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

TargetResultTimeFilesSyslog
bioc-checksNOTE299
linux-develOK556
source / vignettesOK838
linux-releaseOK568
macos-releaseOK692
macos-oldrelOK521
windows-develOK1398
windows-releaseOK1477
windows-oldrelOK1469
wasm-releaseOK203

Exports:addCustomMZAnnotationsaddFMP10AnnotationsaddSMImageaddSpatialImageaddSSCAnnotationaddTranscriptomeadductRulesalignSpatialOmicsanalyzeSpaMTPRegionsannotateAdductGroupsannotateBigDataannotateGeneIdentifiersannotateMZannotateSMannotateSMILESStructureannotationCandidatesannotationDatabaseScopeannotationIndexIonsannotationInfoannotationScoreCutoffapplySpatialAlignmentasCardinalasSpatialExperimentbinMetabolitesbinnedCardinalToSeuratbinSpaMTPbuildGeneMappingIndexbuildMZAnnotationIndexbuildPathwayIndexcalculateAnnotationStatisticscalculateSingleAnnotationStatisticscardinalToSeuratcardinalToSpatialExperimentcheckAlignmentcombineTransformationsconvertSeuratToCardinalcreateMergedModalityAssaycreatePathwayAssaycreatePathwayObjectdeconvolveSMILESdemsHeatmapdensityMapembedPathwayNetworkestimateAnnotationFDRfindAllDEMsfindCorrelatedFeaturesfindDuplicateAnnotationsfindNearestMZfindRegionalPathwaysfindSpatiallyVariableMetabolitesfishersPathwayAnalysisflagIsotopePeaksflagMatrixPeaksgetKmeanClustersgetMetaspacegetMZMetadatagetRefinedAnnotationsgetSpatiallyVariableMetabolitesgetSquareCoordinatesgroupAdductPeaksimageMZAnnotationPlotimageMZPlotinteractiveSpatialPlotkNeighborsGraphloadMetaspaceloadSMloadSpaMTPDataloadSpaMTPDatabasemaldiAdductPresetmaldiMatrixProfilesmaldiMatrixRulesmapGeneIdentifiersmapSpatialOmicsmarkerRanksmassIntensityPlotmatrixIonTablemetaspaceClientmetaspaceToFeatureMatrixmultiOmicIntegrationmzBoxPlotmzRidgePlotmzViolinPlotnormalizeSMDatapathwayMappingpathwayNetworkPlotspixelPlotplot3DFeatureplotAnnotationScoresplotPathwaysplotPathwaysSpatiallyplotRegionalPathwaysplotSinglePathwayplotSinglePathwaySpatiallyplotSpaMTPWorkflowplotSpatialFeatureplotSpatialLabelspredictAdductsFromSMILESqueryMZAnnotationIndexreadSMMatrixrefineLipidsrenderSpaMTPReportrunDErunMetabolicPCArunPoolingrunRAMPGesecarunSpaMTPWorkflowrunSpatialGraphPCAsavePheatmapAsPDFsaveSpaMTPDatascaleSMDatasearchAnnotationsselectROIsseuratToSingleCellExperimentseuratToSpatialExperimentspaMTPDatabaseInfospatialExperimentToCardinalspatialExperimentToSeuratspatialMZAnnotationPlotspatialMZPlotspectralBinningstatPlotsubsetMZFeaturessubsetSPMsummarizeAnnotationScoressummarizeFeaturestmmNormalizevisualisePathwaysworkflowMarkersworkflowMetrics

Dependencies:abindAnnotationDbiAnnotationHubaskpassassortheadbase64encbeachmatBHBiobaseBiocBaseUtilsBiocFileCacheBiocGenericsbiocmakeBiocManagerBiocNeighborsBiocParallelBiocSingularBiocVersionBiostringsbitbit64blobblusterbslibcachemCardinalCardinalIOclassclassIntcliclueclustercodetoolscommonmarkcowplotcpp11crayoncrosstalkcurldata.tableDBIdbplyrDelayedArraydigestdir.expirydplyrdqrnge1071edgeRevaluatefarverfastmapfastmatchfgseafilelockFNNfontawesomeformatRfsfutile.loggerfutile.optionsgenericsGenomicRangesggdendroggplot2ggridgesgluegtablehighrhtmltoolshtmlwidgetshttpuvhttrhttr2igraphIRangesirlbaisobandjquerylibjsonliteKEGGRESTKernSmoothknitrlabelinglambda.rlaterlatticelazyevallifecyclelimmamagickmagrittrMASSMatrixMatrixGenericsmatrixStatsmattermemoiseMetaboCoreUtilsmetapodmimeMsCoreUtilsnlmeontologyIndexopensslotelpillarpkgconfigplotlypngpromisesProtGenericsproxypurrrR6rappdirsRColorBrewerRcppRcppEigenrgoslinRigraphlibrjsonrlangrmarkdownRSpectraRSQLitersvds2S4ArraysS4VectorsS7sassScaledMatrixscalesscranscrapperscuttleSeqinfosfshinySingleCellExperimentsitmosnowsourcetoolsSpaMTPdbSparseArraySpatialExperimentstatmodstringistringrSummarizedExperimentsystibbletidyrtidyselecttinytexunitsutf8vctrsviridisLitewithrwkxfunxtableXVectoryaml

SpaMTP: Spatial metabolomics with native containers
Overview | Installation | Real tissue examples | Mouse bladder: compartments and lipid-associated ions | Source and spatial coverage | Tissue context | Transform intensities and select ions | Spatial distributions and regional summaries | Panel-composition sensitivity | Pig fetal section: organ-associated ion patterns | Prespecified windows across the complete source section | Spatial maps | Mouse brain: paired MSI and RNA | Native containers and raw data | Data locations | Raw imzML processing | Continue the analysis | Reproducibility | Citation | Session information

Last update: 2026-11-17
Started: 2026-08-14

SpaMTP: Data access and migration
Native containers and public accessors | Public accessors | Modality and expression layer | Mouse-brain MSI and paired RNA | Read a binned MSI table | Pixel and feature metadata | Normalized expression | Scale each feature | Coordinates and optical images | Coordinate axes and units | Image storage and registration | Paired modalities and standard subsetting | Analysis provenance | Convert Seurat objects | Explicit conversion | Coordinate and layer selection | Migrating existing scripts | Session information

Last update: 2026-11-17
Started: 2026-09-13

SpaMTP: Companion data and annotation resources
Choose data and reference resources | Installation and example scope | Data to a native analysis container | Native experiment structure | Normalization and spatial display | Find database resources | Load reference tables | Measured bladder ions and RaMP candidates | Candidate records | Published native datasets and historical archives | Direct native-data retrieval | Convert a historical Seurat object | Session information

Last update: 2026-11-17
Started: 2026-09-13

SpaMTP: Metabolite annotation and pathway follow-up
Overview | Annotation stages | RaMP snapshot and identifiers | A worked 2-hydroxyglutarate example | Functional-group interpretation | From functional groups to ion-mode behaviour | Evidence by ion mode | Predicted adduct families | Adduct rules and structural constraints | Expected mass-to-charge ratio | Build the reusable index | Index inspection and reuse | Chemical validity pruning | Query and rank candidates | Mass-tolerance boundary | Score components | Adduct-family support | Annotate individual mass values | Production use with the complete RaMP table | Precomputed structural features | Complete-reference annotation of selected measured features | Inspect isotope and matrix-ion candidates | Inspect stored candidates and score thresholds | Candidate identities for selected mass features | Sphingosine within the complete candidate search | Carry the annotation threshold into real pathway analysis | Network content | Reviewing candidate annotations | Candidate ranking and identity | Structure and acquisition context | Session information

Last update: 2026-11-17
Started: 2026-09-13

SpaMTP: Gene mapping and joint pathway analysis
Map genes to a reproducible reference | Reference snapshot and species | Gene mapping index and identifier resolution | Demonstration data and pinned inputs | Identifier resolution | Mapping status and ambiguity | Annotate experiment features | Feature annotation | Review mapped identifiers | Use the whole measured panel as the universe | Foreground and measured universe | Identity counting and multiple testing | Custom and species-specific references | One membership index for enrichment, expression and plots | Membership and coverage fields | Shared memberships | Pathway assays and spatial plots | Combine duplicate features and inspect coverage | Joint MS and RNA pathways | Candidate identities and measured coverage | Complete ranks and modality contributions | Compare regional pathway effects | Explore a joint pathway network | Find co-regulated pathways | Session information

Last update: 2026-11-17
Started: 2026-09-13

SpaMTP: Pathway resources and network provenance
Choose membership and network resources | Snapshot versions and interpretation | Choose an analysis and its display | Enrichment of measured glioma RNA markers | Pathway network example | Interaction availability | Inspect a pathway and its interactions | Interaction coverage | Inspect resource provenance | Session information

Last update: 2026-11-17
Started: 2026-09-21

SpaMTP: Spatial multi-omics analysis and evaluation
Analysis scope and workflow overview | Analysis stages | Demonstration datasets | Input modalities and study design | Paired measurements and modality definitions | Anatomical labels and spatial layout | Normalization and replication | Individual, spatial and joint representations | Workflow settings | Representation construction | Compare representation metrics | Molecular patterns across the striatum | Paired ion and transcript maps | Side differences within the caudoputamen | Regional marker characterization | Marker scores and heatmap | Spatial-block sensitivity | Inference across biological replicates | Paired design across specimens | Replicate means and effect interpretation | Regional composition and feature associations | Raw and adjusted correlations | Structure-constrained chemical follow-up | Matched spatial views | Identity mapping and pathway analysis | Extended reference workflows | Reference scripts | Spatial calibration and subset regeneration | Reports and exported results | Report generation | Embeddings and spatial partitions | Exported data and methods | Session information

Last update: 2026-11-17
Started: 2026-09-21

Readme and manuals

Help Manual

Help pageTopics
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
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
Assign identities to co-localised adduct groupsannotateAdductGroups
Annotates vector of m/z valuesannotateBigData
Store gene mapping in a native experiment's row metadataannotateGeneIdentifiers
Annotate one or more observed m/z valuesannotateMZ
Annotate m/z features in a SpatialExperimentannotateSM
Add SMILES-derived structural features to a metabolite databaseannotateSMILESStructure
Ranked annotation candidates for measured featuresannotationCandidates
Restrict a chemical table to pathway-connected compoundsannotationDatabaseScope
Inspect the expected ions in an annotation indexannotationIndexIons
Inspect stored metabolite annotation provenanceannotationInfo
Choose a cutoff from the mass-shift diagnosticannotationScoreCutoff
Apply automatic or precomputed spatial alignmentapplySpatialAlignment
SpaMTP argument names and migrationargumentNaming
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
Provenance of bundled pathway corrections and spatial calibrationbundledResourceFiles
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
Inspect the alignment of two spatial experimentscheckAlignment
Combines rigid transformation 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
Decompose explicit functional groups in SMILES stringsdeconvolveSMILES
Heatmap of Differentially Expressed MetabolitesdemsHeatmap
Export an interactive spatial detection-density viewerdensityMap
Embed a pathway network in an HTML documentembedPathwayNetwork
Assess annotation matches with mass-shift decoysestimateAnnotationFDR print.spamtp_annotation_fdr
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
Find the measured features nearest to target m/z valuesfindNearestMZ
Regional Pathway EnrichmentfindRegionalPathways
Find spatially variable metabolites using Moran's IfindSpatiallyVariableMetabolites
Fisher Exact Tests for Pathway EnrichmentfishersPathwayAnalysis
Flag peaks that are 13C isotopologues of other peaksflagIsotopePeaks
Flag peaks explained by MALDI matrix ionsflagMatrixPeaks
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
Group co-localised peaks that differ by adduct spacingsgroupAdductPeaks
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
Load METASPACE Data as a SpatialExperimentloadMetaspace
Load imzML data into a Bioconductor-native spatial containerloadSM
Load a versioned SpaMTPData experiment with native Bioconductor namingloadSpaMTPData
Load versioned SpaMTP annotation resourcesloadSpaMTPDatabase
MALDI-plausible adduct rulesmaldiAdductPreset
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
Convert regional marker statistics to a rank matrixmarkerRanks
Plot mean mass spectra from a native spatial experimentmassIntensityPlot
Ions formed by the MALDI matrix itselfmatrixIonTable
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
Inspect pathway identity mapping and coveragepathwayMapping
Construct an interactive pathway network visualizationpathwayNetworkPlots
Convert point symbols to squares without changing coordinates or scalespixelPlot
Compare two spatial features in 3Dplot3DFeature
Plot the best annotation score of each measured featureplotAnnotationScores
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
Draw the figures of a SpaMTP workflow resultplotSpaMTPWorkflow
Plot spatial features from a Bioconductor containerplotSpatialFeature plotSpatialFeature,MSImagingExperiment-method plotSpatialFeature,SpatialExperiment-method
Plot pixel labels at their spatial positionsplotSpatialLabels
Predict a structure-aware adduct search space from SMILESpredictAdductsFromSMILES
Print an indexed metabolite annotation search spaceprint.spamtp_mz_index
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 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
Small offline inputs for the function examplesspamtp_example
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
Summarize annotation candidates across score thresholdssummarizeAnnotationScores
Summarize feature intensities by groupsummarizeFeatures
Performs TMM normalization between categories based on a specified identtmmNormalize
Real spatial experiments for the vignettesvignetteData
Display Pathway EnrichmentvisualisePathways
Extract regional markers from a SpaMTP workflowworkflowMarkers
Extract representation metrics from a SpaMTP workflowworkflowMetrics