Spatially resolved integrative analysis of transcriptomic and metabolomic changes in tissue injury studies

Domain: biology
Published: 2026-01-07
Editorial outcome: minor_revision

Abstract
Recent developments in spatially resolved -omics have enabled the joint study of gene expression, metabolite levels and tissue morphology, offering greater insights into biological pathways. Integrating these modalities from matched tissue sections to probe spatially-coordinated processes, however, remains challenging. Here we introduce MAGPIE, a framework for co-registering spatially resolved transcriptomics, metabolomics, and tissue morphology from the same or consecutive sections. We show MAGPIE’s generalisability and scalability on spatial multi-omics data from multiple tissues, combining Visium with MALDI and DESI mass spectrometry imaging. MAGPIE was also applied to new multi-modal datasets generated with a specialised sampling strategy to characterise the metabolic and transcriptomic landscape in an in vivo model of drug-induced pulmonary fibrosis and to link small-molecule co-detection with endogenous lung responses. MAGPIE demonstrates the refined resolution and enhanced interpretability that spatial multi-modal analyses provide for studying tissue injury especially in pharmacological contexts, and delivers a modular, accessible workflow for data integration.

Introduction
Recent advances in spatially resolved -omics technologies have enabled untargeted studies of spatial distributions of various molecular species1,2. Spatially resolved transcriptomics (SRT) enables genome-wide spatial gene expression profiling3–8, allowing the untargeted exploration of disease-driving mechanisms at an unprecedented scale and resolution9–13. To further evaluate disease- and drug-induced alterations in situ, it is highly valuable to capture multi-modal data14. The combination of SRT and mass spectrometry imaging (MSI)15,16 in the same tissue specimen has expanded the limits of spatial multi-modal analyses17–20, facilitating the study of smaller, endogenous and/or exogenous molecules and metabolites, and opening new avenues for functional characterisation of local compound-induced tissue responses. While parallel unimodal analyses offer valuable insights, fully integrated spatial multi-omics workflows allow the direct investigation of cross-modality covariation within the same microenvironment and histological context. To unlock such analysis, it is essential to align all modalities into a shared coordinate system. However, generating multi-modal data for successful co-registration and co-analysis relies on both experimental and computational considerations.

On the experimental front, there are two established approaches: (1) developing protocols that allow multiple measurements on the same tissue section18 or (2) collecting each data modality on separate, consecutive tissue sections17,19,20. In both cases, sample preparation requirements ensure high analyte quality and compatibility with each modality. A typical approach for SRT would include optimal cutting temperature (OCT) tissue embedding; however, this obstructs MSI data collection21,22, prompting more appropriate methods to be considered for joint SRT and MSI analysis. Furthermore, refined methods may allow the addition of extra modalities for the assessment of tissue morphology, as captured by default in the Visium protocol and optionally obtainable after MSI data acquisition by histological staining and imaging of the tissue section.

Computationally, spatial analyte abundance levels and images obtained for each modality need to be co-registered to enable direct comparisons. Many current methods use ‘landmarks’ (corresponding locations across different images), identified either manually or automatically23. Once landmarks are identified from histological or spatial expression patterns, the geometric transformations required to align multiple images are estimated and applied. Given the inherent differences between consecutive sections and potential distortions introduced during sample preparation, straightforward linear mappings may fail to achieve accurate alignments and lead to compromised interpretations; more complex, non-linear, and elastic transformations may thus be required to effectively link corresponding spatial features across images. Several methods have recently been developed for this co-registration process, including SpatialData24 and GiottoSuite25, which offer purpose-built frameworks with data structures designed for spatial-omics, coupled with functions for alignment and aggregation of observations across modalities, including Visium and others. Nonetheless, these toolkits lack full interoperability with the existing landscape of spatial tools, such as R-based and multi-omics methods26–29 and further lack specific support for MSI data. SOmicsFusion30 supports MSI data, although it focuses on imaging data with no support for Visium datasets and is currently solely provided as standalone scripts, which may limit the ease of use for some users. STalign31 and Eggplant32 enable the alignment of multiple SRT datasets, however, they do not specifically support MSI data and have not been tested in the multi-omics setting. Across these existing methods, we noted a distinct lack of tools that perform standalone, accessible, and interoperable co-registration of spatial modalities, with particular support for combining sequencing-based and imaging-based modalities such as Visium and MSI. Such interoperability is essential to access existing and upcoming downstream analysis options that require matching spatial coordinates and observations28,29,33–35. Additionally, integrating MSI with Visium is complicated by their differing spatial resolutions, which can obscure true molecular co-localisations, motivating specialised approaches to avoid resolution-driven artefacts.

To overcome these challenges, we present a streamlined open-source computational workflow, MAGPIE (Multi-modal Alignment of Genes and Peaks for Integrated Exploration), for integrating spatial transcriptomics (Visium) and metabolomics (MSI) datasets, alongside histological images, generated on same or consecutive sections. MAGPIE outputs standardised and readily usable files to be processed by downstream Python- or R-based spatial toolkits, making it versatile and scalable towards a wide variety of further computational spatial multi-omics analytical methods. The generalisability and scalability of MAGPIE was benchmarked on several datasets, covering different tissue types and MSI technologies, including publicly available brain and breast cancer datasets. To illustrate the full versatility of the framework, we generated and processed spatial multi-modal datasets in two tissue injury studies using lung tissue. As the lung is an inherently heterogeneous tissue type, requiring specific care to preserve its integrity, we developed a new sample preparation strategy to augment compatibility with both SRT and MSI analyses.

In summary, MAGPIE showcases the capacity of efficient spatial multi-modal data integration to reveal greater insights into disease-driving mechanisms and to enhance the study of local drug-induced alterations within a tissue.

Results
Integration of spatially resolved transcriptomics and metabolomics with MAGPIE
To enable and benefit from full spatial multi-omics integration, each modality should be generated from the same tissue specimen. This may require appropriate adaptations of the experimental protocols for each modality and tissue type. Specifically, to enhance the quality and subsequent interpretability of spatial multi-omics datasets from Visium and MSI in lung tissue, a highly heterogeneous and fragile tissue type, we developed a new experimental sampling approach (Methods). Inflation of fresh rodent lung tissue using an agarose solution followed by direct freezing allowed preservation of tissue morphology while avoiding the need for OCT embedding, hence facilitating MSI analyses in tissue sections adjacent to those analysed with Visium to provide matched spatial multi-modal data (Fig. 1a, and Supplementary note 1).

For the integrated computational analysis of spatial multi-omics assays, with a focus on transcriptomics and metabolomics, we developed the MAGPIE pipeline (Fig. 1b), implemented as a Snakemake workflow. As input, MAGPIE takes standard SpaceRanger (10x Genomics) outputs from Visium acquisition and MSI data processed through standard software (e.g., SCiLS Lab or Cardinal36) into a tabular peak-by-pixel format. To co-register the MSI data with the image acquired from the Visium workflow, an MSI-representative image is generated in MAGPIE through dimensionality reduction of the MSI intensity data, allowing for the identification of tissue boundaries and morphological features. For this step, the user may guide the process to include a priori knowledge of spatially informative peaks or to colour each pixel based on 1-3 principal components (visualised as RGB channels). To support the alignment, the pipeline also accepts an intermediate tissue image for the MSI modality, such as a microscopy image of the tissue section, preferably stained similarly to the matching Visium section, e.g., with haematoxylin and eosin (H&E) or with immunofluorescence (IF). In this case, co-registration is first performed between the MSI data-generated image and the MSI tissue image, and thereafter between the MSI tissue image and the Visium tissue image. To manually select spatial landmarks for co-registration, MAGPIE includes an interactive (Python Shiny) application developed for this purpose. Alternatively, users can opt to incorporate externally identified landmarks, such as those generated using the deep learning-based unsupervised landmark detection method, ELD23, providing flexibility in the landmark selection process.

Once landmarks are identified, transformations of the queried MSI image to the reference Visium image can be performed using linear (e.g., affine) or non-linear (e.g., thin plate splines (TPS)) transforms. The transformational alignment projects the two modalities into a common coordinate framework (CCF), such that an (x, y) coordinate in one modality (MSI) can be directly mapped onto the other modality (Visium). Thereafter, the pipeline prepares the aligned second modality (MSI) data for outputting, by converting all data into the standardised Visium SpaceRanger-style output (i.e., MSI ‘count’ data in .h5 file format and coordinates, scale factors, and the transformed tissue image into a ‘spatial’ folder), which is readily accessible for downstream analysis using several spatial analysis ecosystems, such as semla26, Squidpy37, or others24,27,38,39. To perform a fully integrative analysis, pixels and spots are further combined into common ‘observations’, to ensure a matching at 1:1 resolution across the two modalities. To achieve this, MAGPIE by default maximally expands the radius of each Visium spot, while avoiding intersections with the neighbouring expanded spot radii. Alternatively, it uses the actual Visium spot size (55 μm) or an estimated MSI pixel size according to user choice. It thereafter aggregates (by sum, mean, or weighted average) the values from all MSI pixels mapped within the selected spot radius (Fig. 1c, and Supplementary note 2). The MSI pixel observations are thereby assigned to the same coordinate identifiers as used for the Visium spots, resulting in matching spatial resolutions between the aggregated MSI and Visium data. Despite potentially lowering the spatial resolution of the original MSI data, we recommend this approach rather than generating computationally inferred super-resolved Visium data to avoid noise issues in MSI data. However, as differences in sampling scale can influence the apparent strength of co-localisation, users should carefully consider the resolution disparity in their own datasets when selecting an aggregation approach and interpreting their results. If the MSI dataset is of significantly higher resolution than its Visium counterpart, where entire MSI pixels may fall in the gaps between Visium spots, we recommend using the true Visium spot size to aggregate data instead of the expanded Visium radius. If the MSI resolution is lower than Visium, it may be useful to focus on the MSI pixel size for aggregation where one MSI pixel may contribute to multiple Visium spots. In addition, this aggregation approach has been added as a new function within the semla R package26 (v. ≥ 1.3.0) to allow the creation of a spatial multi-modal object and further analysis within the Seurat or semla R ecosystems.

MAGPIE is a straightforward, optimised framework which is fast and lightweight to run, as demonstrated by run time and computational requirement benchmarking for various MSI dataset resolutions (Supplementary Fig. 1a). Once the data is fully integrated, a breadth of downstream spatial multi-modal processing, analysis, and visualisation options become possible (Fig. 1d), facilitating discoveries on joint metabolomic and transcriptomic dynamics in healthy, diseased, or other perturbation settings.

Data-driven guidance for enhanced MAGPIE co-registration
To ensure the successful co-registration of Visium and MSI datasets using MAGPIE, both technical and experimental factors need to be considered. In particular, we explored the effect of sample quality and parameter selection on co-registration performance, both of high importance when working with consecutive tissue sections where the section similarity is greatly affected by the sectioning process and tissue quality.

Several decision juncture points along the MAGPIE pipeline can impact the success of the resulting co-registration (Fig. 2a). Specifically, these user decision points are (i) whether a microscopy image for the second modality is generated or if co-registration is performed directly from the data-generated image, where successful landmark identification can be more difficult, (ii) the colouring used for the data-generated image, which may impact the ease and accuracy of landmark identification, (iii) how many landmarks are used and (iv) whether an affine or TPS transformation is used to map between modalities, of particular importance when the tissue sections used for each modality differ strongly. To assess these factors and guide the study design and parameter settings when running MAGPIE, we generated DESI MSI data and performed H&E staining of consecutive sections of mouse lung tissue (n=11) previously analysed with Visium13.

Following the standard pre-processing of each modality for our generated paired Visium and MSI data, the data was processed with MAGPIE to benchmark the impact of altered input parameters. To assess the extent of co-registration success, we computed an alignment accuracy score based on the overlap between tissue and background labels in the Visium and MSI observations, specifically by comparing the number of spots labelled consistently in both modalities after transformation to the total number of spots (Methods).

For the successfully co-registered samples (8 out of 11), up to 20 distinct landmarks per sample were manually selected using the interactive application within MAGPIE, allowing the assessment of alignment accuracy as a function of the number of landmarks (Fig. 2b, and Supplementary Fig. 1b). Regardless of transformation type or the inclusion of an intermediate H&E image for the MSI modality, the accuracy score started to plateau at around 10 landmarks, with small additional improvements for some samples when including more landmarks (Supplementary Fig. 1b). To better understand the differences in co-registration between samples, we compared the maximum achieved alignment accuracy, across up to 20 landmarks, between samples with or without an intermediate H&E image and across image transformation types (affine vs TPS) (Fig. 2c). Compared to direct co-registration from MSI data to Visium, co-registration using an intermediate MSI H&E image attained higher alignment accuracy in terms of tissue overlap, with a larger difference observed when a TPS transformation was applied (Fig. 2d).

The co-registration accuracy differences across samples (Fig. 2c) underline extensive discrepancies between the sample section pairs, which may be explainable by the morphological distortions present within the H&E-stained tissue sections (Fig. 2e). The samples with the highest maximum accuracy were characterised by well-preserved tissue integrity, with only minor tears and folds (Supplementary Fig. 1c). In cases where a section was too severely damaged, co-registration using manual landmarks was not possible (e.g., sample SX), while relatively high alignment accuracies could be achieved with MAGPIE where there were moderate tears and shape differences in the section (e.g., sample S8). Some of the more dissimilar samples demonstrated greater accuracy differences when intermediate MSI H&E images were utilised, highlighting their added value.

Based on these experiments and benchmarking results, we strongly recommended obtaining an intermediate MSI image (e.g., H&E staining after MSI) for more robust landmark identification and enhanced co-registration. In addition, for cases where landmark identification is challenging, opting for a linear transformation, such as affine, can help to avoid exaggerated distortion of the image transformation potentially caused by improperly placed landmarks. Conversely, for more dissimilar serial sections, a non-linear transformation maybe necessary to achieve high-quality co-registration. Finally, an added benefit of selecting a high number of landmarks to aid the co-registration was observed, and we, therefore, recommend that users aim for higher numbers of manually selected landmarks.

MAGPIE provides flexibility across tissue types and technologies
Next, we showcased the versatility of MAGPIE on samples from different species, tissue types, and MSI technologies. Co-registration was performed on previously published same-section Visium and MALDI MSI data from human (n=3) and mouse (n=3) brain tissue18 (Spatial Multimodal Analysis or SMA dataset) (Fig. 2f, and Supplementary Fig. 1d). We performed co-registration on samples processed in both positive and negative ionisation modes and using different matrices (FMP-10, 9-AA, DHB) to showcase the versatility of the MAGPIE framework. Testing up to 15 landmarks for each sample, all the included SMA samples achieved near-perfect co-registration accuracy (≥ 0.9), illustrating the successful alignment of datasets and the benefit of having same-section multi-modal data (Fig. 2f, and Supplementary Fig. 1e). Nonetheless, challenges in landmark identification and alignment accuracy assessment were encountered for the human brain SMA samples, which likely stemmed from their complex underlying structure and morphology and the lack of visible tissue boundaries, since the data was acquired from small regions of interest within a larger tissue block. Conversely, the mouse brain SMA samples had distinct morphological features and section edges that eased the manual landmark selection process. Hence, as a consideration, the placement and integrity of the tissue section can aid landmark selection if more distinguishable features are present, where holes and tears may even be beneficial. In addition, the choice of alignment metric can impact the presented co-registration accuracy scores, which in our case was strongly influenced by the tissue-to-background selection and differences between MSI and Visium capture area sizes. Focusing on image-level differences, rather than spot- or pixel-level, might present a complementary alignment accuracy score metric, albeit reliant on having an intermediate H&E image from the MSI modality, which was not available in our case.

Our results show that successful co-registration with MAGPIE is achievable for different tissue types and data acquisition technologies. Further, we explored MAGPIE’s ability to resolve highly localised brain structures (Supplementary note 3), demonstrating MAGPIE’s generalisability to neuroscience contexts We highlight the importance of carefully selecting samples for multi-omics integration, particularly regarding the clarity of histological features, which are crucial for successful co-registration and especially important when working with larger or more complex tissue sections.

Alignment of spatial multi-omics in pulmonary fibrosis reveals disease-associated signatures
To explore the insights into disease-driving mechanisms provided by MAGPIE-integrated spatial multi-modal data, we further analysed the dataset comprising Visium and DESI MSI on mouse lung samples (introduced in Fig. 2). These samples were collected from a mouse model of bleomycin (BLM)-induced pulmonary fibrosis, a widely used preclinical animal model for studying lung fibrosis and for the identification and assessment of new therapeutic drugs for human idiopathic pulmonary fibrosis (IPF)40,41. The administration of the cytotoxic agent BLM induces acute inflammation and subsequent fibrotic scarring of the lungs42,43. Recently, an in-depth Visium-based characterisation of tissue samples from IPF patients and the BLM mouse model was published, describing and comparing molecular signatures associated with the fibrotic niches13. To further build on this study and previous reports of metabolic alterations seen in IPF and BLM-induced pulmonary fibrosis44–46, our spatial multi-modal Visium and DESI MSI data from mouse lungs collected 21 days following BLM administration (n=6) were integrated and analysed within their histopathological context along with cell type mapping inference13,47 (Fig. 3a).

The co-registration of the modalities into a shared coordinate system enabled us to summarise patterns across modalities using a multi-omics factor analysis (MOFA)29,48 for all samples, resulting in 20 factors (Supplementary Data 1). These factors were inspected for variance explained, modality contribution, and correlation with cell type density scores13,47 (Fig. 3b). While Factor 1 had the highest overall variance explained, the contribution was predominantly driven by the MSI modality. Several other factors, e.g., Factors 2, 4, 8, 16, and 19, displayed contributions from both modalities. Factor 2 showed a strong correlation with many disease-relevant cell types, including fibroblasts, myofibroblasts, interstitial/recruited macrophages, and other immune cell populations. Factors 8, 16, and 19 overlapped with alveolar type II (AT2) cells, while Factor 4 was associated with club, goblet, and ciliated cells commonly present in the ciliated epithelium of the lung (Fig. 3b, and Supplementary Fig. 2a).

Upon spatial inspection, we noted an overlap of areas with high Factor 2 activity and those manually annotated as suspected fibrosis (Fig. 3c, and Supplementary Fig. 2b). Examination of genes and peaks with the highest contribution to this factor revealed a distinct molecular signature which included a mix of genes associated with extracellular matrix (ECM) components (e.g., Mfap4, Col4a1, Col4a2, Fn1, Bgn, Eln), macrophage activity (e.g., Cd74, Apoe, Psap), immune functions (e.g., H2-Ab1, H2-Eb1, H2-Aa, H2-D1), and cathepsins (e.g., Ctsh, Ctsd, Ctsb, Ctss) (Fig. 3d). Several of these genes, such as Psap, Cd74, Cd9, and multiple cathepsins, align with markers previously described for a damage-associated macrophage population implicated in lung injury and fibrosis, where they play a role by modulating tissue responses to lung injury49 and suggests immune-modulatory and matrix remodelling roles within the fibrotic regions. These findings were consistent with many of the fibrosis-associated genes detected in our previous Visium data analysis13, however, a new dimension of metabolomic information could now be directly associated with the transcriptomic alterations.

The top mass spectrometry peaks contributing to Factor 2 were manually annotated as lactate (m/z 89.02435) and pantothenate (m/z 218.10372), followed by several long-chain fatty acids (FA) (e.g., m/z 253.21621, FA 16:1 palmitoleic acid; m/z 277.21621, FA 18:3 linolenic acid; m/z 305.24751, FA 20:3 eicosatrienoic acid; and m/z 303.2324, FA 20:4 arachidonic acid) and amino acids (e.g., m/z 118.05092, threonine; m/z 146.04588, glutamate; m/z 145.06187, glutamine; and m/z 154.06207, histidine) (Fig. 3d). Lactate has been repeatedly associated with pulmonary fibrosis, signifying a metabolic shift to anaerobic glycolysis, and may be directly involved in TGF-β-induced myofibroblast differentiation46,50–52. Factor 2 was further marked by metabolites of the citric acid cycle (TCA cycle; m/z 173.0092 aconitate) and glutamine metabolism, which have been implicated in TGF-β-induced myofibroblast activity53. The detection of TGF-β-related mechanisms within the fibrotic niche is also supported at a transcriptomic level, where fibrosis-associated TGF-β-signalling was previously reported based on the spatial gene expression data from IPF and BLM-injured lungs13.

As the identified genes and metabolomic peaks associated with Factor 2 and regions of fibrosis remained somewhat contained within their separate modalities for this analysis, we aimed to better deduce the connectivity and semantic links between these genes and metabolites. By constructing a covariation network using GENIE354, a gene regulatory network comprising both genes and metabolite peaks could be inferred (Fig. 3e, and Supplementary Data 2). Many genes were interconnected based on their similar functions, such as those encoding antigen presentation molecules, ECM-related proteins, as well as genes highly expressed by macrophages. Threonine and lactate metabolites emerged as hub nodes, pointing toward the involvement of their metabolism across a wider range of biological processes. Among them, threonine and lactate displayed covariation with Apoe, Psap, and Fn1, aligning with a previously identified fibrotic macrophage signature49. Additionally, lactate has been shown to induce profibrotic genes in macrophages55, a finding supported by their spatial covariation in our analysis. Another coregulated group of genes and peaks in the network was annotated to molecules involved in prostaglandin (m/z 351.21693, m/z 333.2071) and hydroxyretinoic acid (m/z 315.19698) metabolism, which associates with the genes Lrg1, Cd63, Clu, and Fn1. The presence of eicosanoids, including various prostaglandins, has previously been reported to be elevated in BLM-induced pulmonary fibrosis46 and of relevance for fibrotic progression56, making it an intriguing subject for further studies given its co-localisation with an increased gene expression of ECM constituents.

In summary, our MAGPIE-enabled integrated spatial multi-modal analysis of the BLM-injured mouse lungs both complemented the histopathological assessment of the tissue and further revealed, to our knowledge, new links between transcriptomic and metabolic alterations occurring during lung fibrosis.

MAGPIE facilitates spatial co-detection of drug substance and drug-induced transcriptional responses
The potential for spatial multi-modal analyses extends to many areas of application and, as such, we tested its unique utility in studying transcriptional responses linked to local drug distributions within a tissue. Through Visium and DESI MSI spatial multi-omics data collection on consecutive sections, and subsequent co-registration using MAGPIE, we could detect the localisation of compound AZX in a rat lung sample following inhaled administration, and explore its impact on the surrounding tissue (Fig. 4a). The inhaled administration of AZX, a drug previously in preclinical development by AstraZeneca, has been associated with adverse histopathological lung lesions in animal toxicology studies, thus prompting further exploration of its lung distribution and assessment of unwanted effects in situ.

Visual inspection of the AZX-dosed tissue revealed that dense AZX hotspots, as detected by MSI, co-localised with variably shaped luminal crystal-like structures observed on microscopic examination of the Visium H&E images (Supplementary Fig. 3). After aligning the transcriptome and metabolome data into a shared coordinate space using MAGPIE, we investigated the spatial relationship between AZX tissue depositions and local gene expression patterns. The Visium data was first deconvolved into 20 transcriptomics-driven factors using non-negative matrix factorisation (NMF). Next, the spatial cross-correlation between the transcriptomic NMF factors and the intensity of the AZX compound (m/z 550.15724), as captured by the MSI modality, could be computed directly owing to the integrated coordinate system. The results identified several transcriptomic NMF factors which showed a spatial association with the compound hotspots, of which Factor 14 showed the highest spatial cross-correlation with the compound, followed by Factors 8 and 4 (Fig. 4b). Of these three factors, Factor 14 displayed the most distinct spatially cohesive pattern that corresponded well to the distribution of AZX (Fig. 4c) and thus supported a transcriptomic signature localised to areas of drug deposition. Investigation of the underlying Factor 14 transcriptomic signature revealed a profile enriched for immune and defence response pathways, particularly in response to external and chemical stimuli (Fig. 4d). This transcriptional signature, identified through the use of integrated Visium and MSI data, suggests a localised inflammatory molecular response triggered by the drug deposition. It further proposes a unique strategy to assess mechanisms of drug-associated toxicity, aiding the development of compounds with a more favourable safety profile.

Here, we illustrated that multi-modal analyses of compound-exposed tissues can provide insights into drug distribution and its associated effects within the tissue and that MAGPIE offers a streamlined approach to correlate pharmacological compound localisation and metabolomics signatures with molecular responses at tissue resolution.

Spatial multi-modal analysis of human breast cancer through MAGPIE reveals changes in tumour microenvironment
The characterisation of tumour microenvironments is another research topic benefiting from spatial multi-omics analysis facilitated by the MAGPIE framework; here, we applied the workflow to three invasive lobular breast cancer samples from Godfrey et al.57 (Fig. 5a). After co-registering and aggregating MSI pixels to Visium spots, we performed MSI-driven k-means clustering (k=2) and assigned labels (cancer and non-cancer) to each cluster using H&E images (Fig. 5b). Cell type deconvolution of Visium data using CARD58 with a single-cell transcriptomic breast cancer dataset59 confirmed the localisation of cancer epithelial cells to our metabolically-assessed ‘cancer’ regions (Fig. 5c), of endothelial cells to ‘non-cancer’ regions, and of T-cell clusters around the periphery of cancer regions (Supplementary Fig. 4a).

To further illustrate the localisation of cell types, genes and metabolites, we calculated the radial distances from cancer regions (Fig. 5d), and analysed the relationship between radial distance and inferred cell type densities (Supplementary Fig. 4b). This allowed us to characterise the Visium-derived cellular composition in relation to MSI-derived cancer regions, revealing that cancer epithelial cells showed a sharp decrease in density with increasing distance from cancer regions, while plasmablasts, representing active immune infiltration, declined more gradually. At the tumour boundary, we observed enrichment of cancer-associated fibroblasts (CAFs) consistent with their role in tumour invasion through extracellular matrix remodelling.

We then correlated radial distance with individual genes and metabolite peaks to find molecules localised to specific regions (Fig. 5e), including genes high in tumour core corresponding to known epithelial (luminal) tumour markers (e.g., KRT8, KRT19, FOXA1), to RTK-linked signalling and motility (e.g., ERBB2, DDR1, ENAH), and to metabolic reprogramming and stress responses (e.g., FASN, S100A1). Specific metabolites were identified as preferentially localised in the tumour core, such as pantothenic acid (vitamin B5, m/z 218.10298), which is associated with high MYC expression in human mammary tumours60. Ceramide species, which are closely related to the necrotic nature of the tumour core, were detected within this niche, particularly Cer(d34:1) (m/z 572.48093), which is a known marker of necrotic tissue reported as absent from viable tumour regions61.

Further, we detected several genes localised to both the immediate tumour microenvironment and more distal tissue regions, such as genes involved in extracellular matrix and stromal remodelling, including TNXB, SPARCL1 and STAB1, genes regulating immune cell recruitment and modulation within the tumour microenvironment. e.g., CCL14, ACKR1, TGFBR2, and markers representing the more structured vasculature outside the tumour core, e.g., PECAM1, VWF, CDH5, CLDN5, CD93. The metabolic profile of the distal region was predominantly characterised by glucose (m/z 215.03267), the top positively correlated peak, in agreement with reports of pronounced glucose depletion observed in the tumour core relative to the surrounding stroma62.

Next, we looked for the strongest colocalisation between genes and selected metabolites within the tumour microenvironment (Fig. 5f). This approach uncovered gene-metabolite associations consistent with known tumour biology. For example, phosphatidylinositol (PI (38:4), m/z 885.5499) was strongly associated with extracellular matrix (ECM)-related genes, including COL5A2, COL5A1, and FN1. PI and its phosphorylated derivatives (phosphoinositides, PIPs) are known to play a crucial role in cancer development and progression, particularly through remodelling of the ECM in the tumour microenvironment63. Moreover, glutathione (GSH, m/z 306.07635) strongly correlated with genes such as GSR, CREB3L, and CACNB3, all of which are involved in mitochondrial dysfunction, a relationship supported by previous studies64. In addition to elucidating established biological processes, MAGPIE uncovered, to the best of our knowledge, novel insights and associations between metabolites and genes. For example, a strong correlation was observed between GSH and several genes, including GOLM1, MIA3, and TMEM132A, which are implicated in post-translational protein phosphorylation, interactions which, to our knowledge, have not been previously described.

Through this re-analysis of the human breast cancer data, we illustrated how MAGPIE can resolve the cellular and molecular heterogeneity and complexity of tumours by capturing spatial relationships between cell types, metabolic gradients, and gene expression patterns across tumour cores, stromal interfaces, and surrounding tissue. Together with our lung fibrosis and drug deposition studies, this demonstrates MAGPIE’s utility across a range of complex diseases, to provide molecular-level mechanistic understanding within intact tissues but also to provide the basis for new testable biological hypotheses.

Methods
Experimental data generation
Ethical considerations. Animal care and handling adhered to the standards established by the Council of Europe ETS123 AppA, the Helsinki Convention for the Use and Care of Animals, Swedish legislation, and AstraZeneca global internal standards. All experiments were ethically approved by the Gothenburg Ethics Committee for Experimental Animals in Sweden, complying with Directive 2010/63/EU. The studies received local Ethical committee approval in Gothenburg (EA000680-2017 and 2020-002853) with the assigned site number 31-5373/11.

Animals
Bleomycin-induced lung fibrosis mouse model. The mouse lung sample generation and collection were previously described in the study by Franzén and Olsson Lindvall et al.13. In short, female C57BL/6NCrl mice (Charles River, Germany; eight weeks of age upon arrival) were housed in a facility with ad libitum access to food (R70, Lantmännen AB, Vadstena, Sweden) and tap water. Following a five-day acclimatization period, mice were subjected to oropharyngeal administration of either 30 μl of bleomycin (Apollo Scientific, BI3543, Chemtronica Sweden; 40 µg/mouse) dissolved in saline or saline alone (vehicle control). Lung samples were collected on day 7 (d7) and day 21 (d21) post-bleomycin challenge, capturing both the early inflammatory and tissue remodelling phase (d7) and established tissue damage (d21).

AZX-dosed rat lung. Male Wistar Han rats (Charles River, Germany) were seven weeks old upon arrival and ~10 weeks at the start of dosing. They were group caged, 2–6 rats per cage, and maintained on a normal day/night cycle of dark 18:00 and light 06:30 at a uniform temperature (>25˚C) and humidity (<5%), with access to chew sticks and nesting material. Rats had free access to diet (R70) and tap water. Animals were randomised and regrouped into new cages prior to the first dose and housed with others in the same dosing group to minimise contamination by grooming and coprophagia. The animal used in this study (n=1) was subjected to daily inhalation exposure via snout-only administration for 14 days with 15 mg/kg/day of the AZX test formulation consisting of AZX (10%), MPEG-2000-DSPE (1.25%), trileucine (5%), and trehalose (83.75%), in a flowpast exposure chamber. The animal was acclimated to the method of restraint over a five-day period preceding the first test substance exposure. Animal body weight was recorded prior to the study, twice weekly, pre-dose, and at termination.

Tissue processing for spatial multi-modal analysis of rodent lung. The rodent lung tissue sampling protocols were optimised to enable high quality analysis using both the Visium Spatial Gene Expression platform and mass-spectrometry imaging (MSI), both with regard to analyte preservation and histological integrity. Fresh frozen tissue specimens are typically embedded in optimal cutting temperature (OCT) compound for Visium analysis, however, OCT is known to interfere with the quality of mass spectrometry readouts and should therefore be avoided or removed in MSI experiments21,22. Thus, we opted for careful inflation of the lungs using a low-melting point agarose solution prior to snap freezing of the tissue without any further embedding material. We employed agarose inflation in order to preserve anatomical structure and maintain natural spatial relationships between tissue compartments (Supplementary note 1). This approach is routinely used in lung histology and is critical for preventing collapse of the delicate alveolar architecture. However, MAGPIE is not reliant on agarose inflation and can be applied to tissues prepared via standard protocols appropriate for other organs.

For the mouse study, the mice were first anaesthetised using isoflurane (5% concentration, airflow ~2 L/min) and maintained with 3% isoflurane (airflow ~0.7 L/min). A midline incision was made from the abdominal midsection to the chin. Subsequently, 0.1 mL of heparin was injected through the diaphragm into the heart, followed by severing the abdominal aorta to exsanguinate the mice. The heart and right lung lobes were tied off and removed. The pulmonary circulation was perfused with 37˚C saline followed by 37˚C low-temperature melt agarose (SeaPlaque) solution. The lung was then gently inflated with 0.4-0.5 mL of 37˚C agarose solution via the trachea and tied off. The lung tissue was collected and snap-frozen in pre-chilled NaCl over dry ice and stored at -80°C for further analyses.

For the rat sample, the trachea was surgically exposed and secured using a 2–0 silk suture on the day of termination. Subsequently, 0.4 mL of heparin was injected into the heart through a small incision in the diaphragm, after exposing the abdominal wall. The pulmonary circulation was flushed via the pulmonary artery using a solution of 15 mL of 37°C saline followed by 7 mL of 37°C low-melting point agarose (SeaPlaque) solution (0.75 g agarose in 50 ml saline). A suture was placed around the heart to prevent heart leakage. A cannula was then introduced into the trachea, and the lung was gently inflated with 4.5 mL of agarose solution. Lungs and heart were removed as a single unit, placed in ice-cold PBS, and allowed to rest on wet ice for ~20 minutes to solidify the agarose. The right superior lobe of the lung tissue was thereafter placed on pre-chilled tinfoil in a plastic fixation cassette. The sample was rapidly frozen by immersion in isopentane, pre-chilled in liquid nitrogen. Samples were stored at -80°C until further analysis.

Spatial transcriptomics and metabolomics experimental procedures
Sectioning and RNA assessment. Agarose-inflated mouse and rat lung tissues were mounted to the cryostat specimen chuck using a drop of purified water, and thereafter cryo-sectioned at 10 µm thickness with the cryostat chamber temperature set to -20°C and -10°C for the specimen head. It is important to note that the frozen tissue samples are never embedded in OCT compound, given its incompatibility with MSI analysis. Consecutive sections from each lung were thaw-mounted on a Visium slide for spatial transcriptomics and a Superfrost slide (Fisher Scientific, Loughborough, UK) for desorption electrospray ionisation (DESI) MSI. Slides were stored in -80˚C until further analyses. For RNA quality assessment, ~ten sections from each lung tissue were collected and stored at -80°C prior to RNA extraction using the RNeasy micro kit (Qiagen). RNA quality was assessed using a 5300 Fragment Analyzer (Agilent), and the RIN values were >8 for all samples.

Generation of spatially resolved transcriptomics data. For the AZX-treated rat sample, tissue fixation and staining followed the Methanol Fixation, H&E Staining, and Imaging Visium protocol (10X Genomics). Imaging was performed at 40X magnification using the Aperio Digital Pathology Slide Scanner (Leica Biosystems), and sequencing libraries were prepared according to the Visium Spatial Gene Expression User Guide (10X Genomics; Rev E). The rat library (n=1) was sequenced on the NovaSeq 6000 (Illumina) platform with an S4 flow cell using the following set-up: Read 1: 28 bp, Index 1: 10 bp, Index 2: 10 bp, Read 2: 90 bp. A 1% PhiX spike-in was included in each run. A total of 177 M reads was generated for the rat sample.

Desorption electrospray ionisation mass spectrometry imaging (DESI MSI). For both mouse (n=11) and rat (n=1) lung samples, DESI MSI was carried out using an automated 2D DESI source (Prosolia Inc, Indianapolis, IN, USA) with a home-built sprayer assembly mounted to a Q-Exactive FTMS instrument (Thermo Scientific, Bremen, Germany). Analyzes were performed at spatial resolutions of 65 μm in negative ion mode and mass spectra were collected in the mass range of 80−900 Da with mass resolving power set to 70000 at m/z 200 and an S-Lens setting of 100. Methanol/water (95:5 v/v) was used as the electrospray solvent at a flow rate of 1.0 μL/min and a spray voltage of -4.5 kV. Distance between DESI sprayer to MS inlet was 7 mm, while distance between sprayer tip to sample surface was 1.5 mm at an angle of 75°. Nitrogen N4.8 was used as nebulising gas at a pressure of 6.5 bar. Omnispray 2D (Prosolia, Indianapolis, USA) and Xcalibur (Thermo Fisher Scientific Inc) software were used for MS data acquisition. Individual line scans were converted into centroided .mzML format using MSConvert (ProteoWizard toolbox version 3.0.4043) and subsequently into .imzML using imzML converter v1.3. Haematoxylin and eosin (H&E) staining was performed post-analysis on the same tissue sections and the stained sections were imaged at 20x with Aperio CS2 digital pathology scanner (Aperio Tech., Oxford, UK), and visualised with QuPath 0.2370 for histopathological annotations performed by a pathologist (L.S.).

Computational data processing
Preprocessing of mass spectrometry data. For the bleomycin mouse model, AZX-treated rat and human breast cancer datasets, the .imzml data files were initially imported into SCiLS Lab software (Bruker Daltonics, Germany, 2022a MVS). Bisecting k-means segmentation was performed within SCiLS Lab to create two regions of interest (ROIs): tissue and background (area outside the tissue). Individual samples were then segmented using the tissue/background ROIs with some manual alterations. Individual pixel-level total ion count (TIC) normalised peak intensities were extracted using the SCiLS Lab API, which yields a pixel-by-peak table with associated metadata. This table was later used as input to the MAGPIE pipeline. For the bleomycin mouse model and AZX-treated rat, peaks were annotated against compounds in the KEGG database71 using [M-H]- adducts with a mass tolerance of 5 ppm. Only peaks which could be annotated to a metabolite were retained for the downstream analysis of the bleomycin-treated mouse samples.

Preprocessing of Visium data. Raw FASTQ files were processed with SpaceRanger 1.2.2 for mouse bleomycin samples and 1.3.1 for rat AZX sample (10x Genomics). Sequencing reads were aligned to their respective reference genomes: rn6 for the rat sample and mm10 for the mouse samples. Alignment of H&E images to the fiducial frame was performed manually using the Loupe Browser software (v.6, 10X Genomics). For the bleomycin-treated mouse study, the SpaceRanger output data and associated metadata, including cell type deconvolution results, was published in conjunction with the publication by Franzén and Olsson Lindvall et al.13, and can be downloaded from Gene Expression Omnibus (GEO) (accession number GSE267904) and BioStudies (S-BSST1409).

The MAGPIE pipeline. The MAGPIE pipeline is written in Python (v3.10.11) and presented as a Snakemake workflow, with dependencies on snakemake, shiny, matplotlib, pandas, numpy, scikit-image, pathlib, scikit-learn, scipy, json, collections, shutil, gzip, h5py, and scanpy. All pipeline components can be initiated from the command line; detailed documentation for each component is provided at (https://core-bioinformatics.github.io/magpie). The full pipeline is open source under the MIT/ CC-BY licence and is found on GitHub at (https://github.com/Core-Bioinformatics/magpie).

As input, the MAGPIE pipeline takes the Visium data in the standard Space Ranger output format (including filtered_feature_bc_matrix.h5 containing gene expression information, tissue_hires_image.png with the H&E image, tissue_positions.csv containing spatial coordinates per spot and scalefactors_json.json translating from H&E image to spatial coordinates) and a peak-by-pixel table for the MSI data, with the option to add a microscopy image for the MSI section. The image alignment within MAGPIE utilises a landmark-based approach. Users may opt to select their own landmarks outside the pipeline, either manually or automatically using an external tool (e.g., ELD23). MAGPIE includes an interactive Python Shiny application which can be used before the Snakemake pipeline. Within this application, a lower dimensionality image is created based on the MSI data using a user-selected method, for example, using the first or first 3 principal components (based on all or a subset of peaks) as colour channels or using an individual peak of interest based on a priori knowledge. For manual landmark identification, users are thereafter prompted to select landmarks within the interactive application, either (1) between MSI dimensionality reduction image and Visium H&E image or (2) between MSI dimensionality reduction image and MSI microscopy image, if available, then between the MSI microscopy image and Visium H&E image. If users identify landmarks externally, they may add them in a tabular format and skip the in-built landmark selection tool.

The next stage of the pipeline is streamlined within a Snakemake workflow, which consists of three main modules. In the first module, the identified landmarks are used to map MSI coordinates to Visium coordinates, using either a linear (affine) or non-linear (TPS) transform based on the scikit-image implementation (v0.24) in accordance with user selection. This results in a common coordinate framework (CCF) between the two modalities where each (x, y) coordinate in the MSI modality can be directly mapped into the Visium modality. The second module of MAGPIE prepares and stores the new MSI data in a Space Ranger-style object, including a .h5 file and a ‘spatial’ folder containing coordinates and images, which can be read by other spatial analysis ecosystems. As a third optional module, the data points for the MSI modality can be aggregated into the Visium spot barcodes, creating a 1:1 spatial map between the MSI and Visium observations, following a strategy described in the next section.

Aggregation of MSI data per Visium spot. For performing fully integrated spatial multi-modal analysis, we match MSI pixels to Visium spots to create combined ‘observations’. Initially, we calculate the between-spot distance in the Visium data then find the MSI pixels within half that distance for each Visium spot (the spots’ expanded radius) (Fig. 1c). This is calculated efficiently by finding the k-nearest neighbours for each spot and then selecting the neighbours within the specified expanded radius distance. MSI pixels within each expanded Visium spot are then either averaged (mean or weighted by distance) or summed according to user choice to create the new matching observations. Alternatively, users can select to use the actual Visium spot radius, for example in cases where MSI data is of much higher spatial resolution that Visium and so MSI pixels may fall wholly outside Visium spots, or use the estimated MSI pixel size in cases where MSI data is of lower resolution to Visium and so an MSI pixel may contribute to multiple Visium spots (see Supplementary note 2). This step of the data integration was implemented within the MAGPIE Snakemake workflow as a final optional module and as a separate function, CreateMultiModalObject, in the semla R package (v. ≥ 1.3.0)26, with which the loaded Visium and MAGPIE-aligned MSI data can be joined into a multi-modal object.

MAGPIE pipeline benchmarking
Hyperparameter testing. The performance of co-registration was assessed on the overlap between MSI and Visium observations after coordinate transformation. We relied on the tissue/background annotation identified through the SpaceRanger pipeline and applied tissue/background labels to the MSI data based on the first principal component, using data-specific thresholds identified using underlying microscopy and lower dimensional images. We then calculated summary statistics to capture the accuracy of the transformation to match tissue to tissue and background to background (i.e., # spots annotated as tissue in both modalities + # spots annotated as background in both modalities divided by total # spots). For each sample (n=8) in the bleomycin-treated mouse dataset, 20 landmarks were identified (1) between MSI dimensionality reduction and MSI H&E then between MSI H&E and Visium H&E and (2) between MSI dimensionality reduction and Visium H&E directly. For numbers of landmarks ranging between 4 and 20 (with 5 repeats), the given number of landmarks was sampled from the total pool, the transformed coordinates calculated and pooled into matching Visium/MSI spots and the alignment accuracy of tissue/background labelling recorded. Samples were ranked for image similarity based on the best accuracy achieved across all numbers of landmarks and repeats.

Same-section spatial multi-modal data. For the same-section Visium MALDI MSI multi-modal data tests, the datasets were acquired from Mendeley Data (DOI: 10.17632/w7nw4km7xd.1) and three mouse brain (V11L12-038_B1, V11L12-038_D1, V11T16-085_C1) and three human brain (V11T17-102_A1, V11T17-102_B1, V11T17-102_D1) datasets were selected. A total of 15 landmarks were identified per sample and a number of landmarks ranging between 3 and 15 (with 5 repeats) was tested using the same approach as described above.

Downstream multi-modal data analysis
Bleomycin mouse model of pulmonary fibrosis. MAGPIE-aligned MSI data, using TPS transformation72, for mouse lung samples collected 21 days after bleomycin administration (one tissue section per animal; n=6) was loaded into R with semla v1.2.1. The corresponding Visium Space Ranger output data files (GSE26790413) were imported with ReadVisiumData, only keeping spots within tissue and image borders. The Visium data was filtered to exclude genes starting with Rpl, Rps, Mrp and mt-, pseudogenes and noncoding genes and focus solely on protein-coding genes detected in >5 spots. Spots were further filtered to remove those with ≤100 transcripts and ≥10% mitochondrial or haemoglobin gene content. The MSI data was TIC-normalised beforehand, and once in a semla object format, it was filtered to keep pixels with more than 300 detected peaks and a total intensity of >14×105. Peaks that had not been annotated to metabolites (using M-H adduct) were excluded from the downstream analysis. Further, peaks with the same mass down to two decimal points were combined by taking the peak with the highest sum of intensities across all samples. A multi-modal semla object was thereafter created with mean aggregating function to combine m/z peak intensity values per Visium spot. The full Visium data was subsequently normalised and scaled with NormalizeData and ScaleData. All annotated MSI peaks (scaled per peak) and top 2000 most abundant genes were used to create a MOFA+29 (v1.10.0) model with 20 factors (medium convergence mode). Cell type deconvolution results were obtained from previously generated data by Franzén and Olsson Lindvall et al.13; the Spearman correlation was calculated between inferred cell type densities and MOFA factor activities across spots. Factors showing the highest correlation with any cell type in the negative direction were reversed to favour interpretability (specifically factors 1, 2, 3, 4, 8, 9, 10, 12, 14, 15, 18, 19, 20). Spot factor scores were compared to histopathology annotations and the top genes and peaks in factors showing clear overlap with fibrotic and inflamed regions were inspected. Multi-omics covariation network analysis was performed on the top 50 genes and 25 peaks in Factor 2 using GENIE354 (v1.22.0). The Spearman correlation between all peaks and genes was also calculated and connections between nodes which showed negative correlation were removed to ensure all edges correspond to positive covariation. The top gene-gene, gene-peak, and peak-peak edges were selected (proportional to number of nodes included for each modality, specifically top 40 for gene-gene and gene-metabolite edges and top 20 for metabolite-metabolite) and the resulting network was visualised using the R package igraph (v2.0.3, Davidson-Harel layout algorithm, cooling factor 0.8). Disconnected subgraphs containing ≤3 nodes were removed from the network. Edge weights are proportional to covariation strength from GENIE3 and node sizes are proportional to degree in the network.

AZX-dosed rat lung tissue. After aligning observations between datasets, as detailed above, data from each modality was separately loaded into a semla26 (v. 1.2.1) object, removing spots outside of the tissue and image area. The Visium data was filtered to remove genes matching the regex patterns ^Rpl|^Rps, for ribosomal genes and ^Mt-, for mitochondrial genes, genes annotated as non-coding or pseudogenes, as well as genes detected in 5 or fewer spots. Low-quality spots with ≤300 transcripts or ≥30% mitochondrial or haemoglobin-related gene content were further removed. The TPS-aligned and TIC-normalised MSI data was filtered to keep only peaks with a metabolite annotation and m/z 550.15724 (AZX compound), and pixels with more than 300 assigned peaks and a total (normalised) ion intensity measure exceeding 23×105 were kept. The joint multi-modal semla object was thereafter created using the function CreateMultiModalObject, with the data aggregation argument set to mean. Normalisation and scaling of the Visium data were thereafter performed using Seurat (v4.4.0) functions NormalizeData and ScaleData. NMF analysis, specifying 20 factors, was run on the Visium data using the RunNMF function from the singlet R package73 v(0.0.99). Spatial co-localisation with m/z 550.15724 in the metabolomics modality was assessed using the spatial cross-correlation metric from MERINGUE74 (v1.0). Enrichment analysis of Gene Ontology (GO) biological processes terms was performed on the 100 top contributing genes for NMF Factor 14 using the R package gprofiler275 (v0.2.1), with the organism set to norvegicus.

Same-section spatial multi-modal mouse brain data. Data from MS3 (V11T16-085_C1) was obtained as above and coregistered using MAGPIE (default parameters except agg_fn = ‘weighted_average’ and radius_to_use = ‘msi’ in create_barcode_matrix). Both modalities were read using semla26 (v1.2.1). Visium data was filtered to remove low quality spots with ≤100 transcripts, ≤5 genes or ≥30% mitochondrial gene content. Genes matching regex patterns ^Rp[l|s], for ribosomal genes and ^mt- or ^Mrp[l|s] for mitochondrial genes were removed and only genes annotated as protein-coding were retained. Normalisation and scaling of the Visium data were performed using the Seurat (v4.4.0) functions NormalizeData and ScaleData. Cell type deconvolution results were downloaded from Mendeley Data (DOI: 10.17632/w7nw4km7xd.1). Spatial cross-correlation was performed between TIC-normalised MSI data, cell type scores and normalised Visium gene expressions using the spatial cross-correlation metric from MERINGUE74 (v1.0).

Same-section human breast cancer tumour samples. Breast cancer tissue sections BC_1_515, BC_1_525 and BC_2_515 were previously analysed using DESI-MSI and Visium spatial transcriptomics as described in Godfrey et al.57. Authors from the original study are co-authors of this manuscript and contributed to data generation and interpretation and provided Visium Space Ranger outputs and MSI .imzml files for re-analysis using MAGPIE. The MSI table extracted from SCiLS Lab was then used as input to the MAGPIE pipeline using default parameters except agg_fn = ‘weighted_average’ and radius_to_use = ‘msi’ in create_barcode_matrix. Both modalities were read using semla26 (v1.2.1). Visium data was filtered to remove low quality spots with ≤100 transcripts, ≤5 genes or ≥10% mitochondrial gene content. The Visium data was further filtered to remove genes matching the regex patterns ^RP[L|S], for ribosomal genes and ^MT- or ^MRP for mitochondrial genes and only genes annotated as protein-coding were retained. Normalisation and scaling of the Visium data were performed using the Seurat (v4.4.0) functions NormalizeData and ScaleData. Clustering of MSI data was performed per sample using kmeans function in R with centres=2, then combined into cancer/non-cancer clusters across all samples. Cell type deconvolution was performed using CARD58 (v1.1) on the Wu et al. human breast cancer atlas59. Radial distance analysis was performed using the RadialDistance function in semla26 to link metabolite peak intensity, gene expression and cell type scores with distance from cancer regions. Peak intensities and gene expressions were compared using Spearman correlation.

Statistics & Reproducibility. The approach was tested on 4 datasets: [1] bleomycin-treated mouse samples (n=11), [2] AZX-treated rat lung sample (n=1), [3] human (n=3) and mouse (n=3) brain tissue, and [4] human breast cancer tissue (n=3). No statistical method was used to predetermine sample size as this work focused on a new methodology and demonstrating its applicability on several different organ tissue types.

Whole samples were excluded where tissue disruption prohibited coregistration, as detailed in Supplementary Fig. 2c. Post-coregistration Visium data was filtered using spot and gene-based thresholds as described in Methods. DESI MSI data was filtered using pixel-based and peak-based parameters described in Methods.

In the full published bleomycin study, mice were randomly assigned to treatment groups to ensure that experimental conditions were evenly distributed. For the purposes of our methodology study we selected 9 of these animals. In the full AZX-dosed rat study, rats were randomly assigned to dose groups but we selected one sample for this methodology study. The Investigators were not blinded to allocation during experiments and outcome assessment.

Peer review rounds
[{"round": 1, "reviewer_comments": {"reviewer_1": "Spatial-omics, such as spatial transcriptome, spatial metabolite and fusion analysis of cell morphology, has important\nbiological significance for understanding disease development, especially cell heterogeneity and tumor microenvironment.\nThe development of a single spatial omics technology cannot solve complex physiological and pathological processes.\nMAGPIE represents a valuable first-step framework for spatial multi-omics integration but requires substantial\nmethodological upgrades to overcome resolution, dynamic, and translational limitations. The author in manuscript “Spatially\nresolved integrative analysis of transcriptomic and metabolomic changes in tissue injury studies” has made some useful\nattempts and obtained some results, however, there are no clear answers to the following questions:\n1. Resolution Disparity & Spatial Misalignment\nCore Issue:\nThe inherent resolution mismatch between Visium (55-µm spots, capturing 10–50 cells) and MALDI/DESI-MSI (10–50 µm\npixels, potentially diffusing to 100 µm) introduces false-negative correlations in co-localization analyses. MAGPIE’s reliance\non agarose expansion for lung tissue fails to address:\nOrgan-specific artifacts: Expansion dynamics may vary in dense (e.g., tumor) or fibrous (e.g., liver) tissues, risking over-\n/under-estimation of metabolite-gene distances.\nSubcellular effects: Expansion could distort intracellular metabolite gradients (e.g., mitochondrial vs. cytoplasmic pools), yet\nMAGPIE lacks validation via correlative microscopy (e.g., TEM-FISSEQ).\nSuggested Solutions:\nDeep learning-based super-resolution: Integrate SpatialScope’s VAE to computationally enhance Visium data to single-cell\nresolution, paired with NMF-based deconvolution of MSI data (Nat. Methods 2024, 21, 123–130).\nNanoscale landmarking: Use antibody-conjugated gold nanoparticles (AuNPs) as fiducial markers for both MSI and\ntranscriptomics, enabling sub-5 µm alignment (Cell 2025, 183, 1205–1218).\n2. Dynamic Biological Context & Temporal Decoupling\nCore Issue:\nMetabolite turnover (seconds) and transcriptional responses (hours) operate on divergent timescales, yet MAGPIE’s static\nintegration cannot resolve:\nCausal inference: Whether metabolic changes drive gene expression or vice versa remains speculative without time-\nresolved data.\nPathway ambiguity: Shared metabolites (e.g., α-ketoglutarate in TCA cycle/epigenetics) may map to multiple genes,\nnecessitating pathway-aware scoring (e.g., SPIRAL algorithm).\nSuggested Solutions:\nLive-cell spatial omics: Incorporate metabolic pulse-chase labeling (e.g., TREX probes) with nascent RNA capture (SLAM-\nseq) in the same tissue section (Science 2024, 384, eadj8791).\nDynamic modeling: Apply stochastic ordinary differential equations (sODEs) to infer metabolite-gene regulatory networks\nfrom snapshot data (Nat. Comput. Sci. 2025, 5, 200–212).\n3. Translational Relevance & Validation\nCore Issue:\nWhile MAGPIE demonstrates utility in pulmonary fibrosis, its generalizability to complex diseases (e.g., cancer) is unproven.\nCritical omissions include:\nClinical benchmarking: No comparison to gold-standard LC-MS/RNA-seq from laser-capture microdissected (LCM) regions.\nBatch effects: Unaddressed technical variability across MSI platforms (e.g., MALDI vs. DESI ionization efficiency).\nSuggested Solutions:\nMulticenter validation: Apply MAGPIE to CPTAC cohorts with matched spatial omics and bulk proteomics, assessing\nconcordance via rank-based metrics (e.g., Spearman’s ρ > 0.7).\nSingle-cell ground truth: Validate using Xenium (transcriptomics) + nano-DESI (metabolomics) co-assays on adjacent 5-µm\nsections (BioRxiv 2025, doi:10.1101/2025.04.05.588442).", "reviewer_2": "Innovation and Research Value Evaluation\nThe MAGPIE framework presents a significant advancement in spatial multi-omics integration by addressing critical\nchallenges in cross-modal data alignment and analysis. Its modular workflow for co-registering spatially resolved\ntranscriptomics, metabolomics, and tissue morphology data demonstrates generalizability across diverse tissues, including\nlung and brain, and compatibility with both MALDI and DESI mass spectrometry imaging. The integration of a \"specialized\nexperimental sampling strategy\" in drug-induced pulmonary fibrosis models highlights its potential to link small-molecule\ndynamics with endogenous transcriptomic responses, offering novel insights into tissue injury mechanisms . This approach\noutperforms traditional methods that struggle with heterogeneous data fusion and spatial-temporal alignment, as evidenced\nby existing limitations in multimodal models (e.g., weak cross-modal integration and resolution mismatches) .\nMAGPIE’s innovation lies in its ability to bridge resolution gaps between modalities while preserving spatial context—a\ncritical bottleneck in current workflows. By leveraging computational alignment rather than relying solely on experimental co-\nregistration, it enhances scalability for large-scale studies. The framework’s application to pharmacological contexts also\nunderscores its translational value in drug discovery and mechanistic toxicology .\nCritical Questions and Concerns\n1. Resolution Mismatch Between Modalities\nSpatial metabolomics (e.g., MALDI-MSI) typically achieves resolutions of 5–100 μm , while Visium transcriptomics operates\nat 50–100 μm . How does MAGPIE address potential discrepancies in resolution when aligning these datasets? For\ninstance, high-resolution metabolomic data (e.g., 5 μm) might not directly correspond to lower-resolution transcriptomic\nspots, risking misinterpretation of co-localized signals. Clarification of downsampling or interpolation methods is needed .\n2. Limited Demonstration of Brain Spatial Features\nWhile MAGPIE is validated on brain tissue, the results lack explicit visualization of brain region-specific spatial patterns\n(e.g., cortical layers, hippocampal subfields). Given the structural complexity of the brain, does the framework sufficiently\ncapture nuanced cytoarchitecture? Evidence from studies like STEREO-seq (0.5 μm resolution) suggests higher-resolution\nmodalities may better resolve such features. Including region-specific markers (e.g., NeuN for neurons) in case studies\nwould strengthen its utility in neurobiology .\n3. Applicability to Tumor Heterogeneity\nTumors exhibit extreme cellular and molecular heterogeneity, requiring simultaneous mapping of cell types, metabolic\nstates, and spatial niches . Current MAGPIE examples focus on fibrotic lung and brain tissues but omit tumor models. Can\nthe framework handle dense cellular interactions, stromal-tumor interfaces, or hypoxic gradients seen in cancers? Prior\nstudies like MuCST and Stereo-seq highlight the need for tumor-specific validation to assess MAGPIE’s robustness in\ncomplex microenvironments.\n4. Technical Scalability and Computational Demands\nHigh-resolution spatial omics datasets are computationally intensive. MAGPIE’s performance on terabyte-scale data (e.g.,\nwhole-tumor imaging) remains unaddressed. Comparisons with GPU-optimized workflows (e.g., LLaVA for satellite imaging\n) would clarify its feasibility for large-scale clinical studies.\nRecommendations\n• Include tumor case studies (e.g., lung or breast cancer) to demonstrate MAGPIE’s ability to resolve tumor-immune\ninteractions and metabolic reprogramming .\n• Provide resolution-adjustment protocols for datasets with mismatched pixel sizes.\n• Expand brain analyses to incorporate region-specific spatial markers and subcellular features.\nConclusion\nMAGPIE represents a promising tool for spatial multi-omics integration, particularly in pharmacological research. However,\nits broader adoption depends on addressing resolution limitations, expanding validation to complex tissues like tumors, and\nimproving computational transparency."}, "author_response": "We thank the reviewer for the summary of our work and for underlining the potential of the field of spatial -omics. We appreciate the acknowledgement of the added value that our method MAGPIE brings as an initial step towards spatial multi-omics integration. We hope that the improved description of the approach, its additional benchmarking and the new data we added will enhance the valuable contribution to the field by enabling researchers to explore novel biological questions in spatial context and across -omics layers.\n1. Resolution Disparity & Spatial Misalignment\nCore Issue:\nThe inherent resolution mismatch between Visium (55-µm spots, capturing 10–50 cells) and MALDI/DESI-MSI (10–50 µm pixels, potentially diffusing to 100 µm) introduces false-negative correlations in co-localization analyses. MAGPIE’s reliance on agarose expansion for lung tissue fails to address:\nOrgan-specific artifacts: Expansion dynamics may vary in dense (e.g., tumor) or fibrous (e.g., liver) tissues, risking over-/under-estimation of metabolite-gene distances.\nSubcellular effects: Expansion could distort intracellular metabolite gradients (e.g., mitochondrial vs. cytoplasmic pools), yet MAGPIE lacks validation via correlative microscopy (e.g., TEM-FISSEQ).\nSuggested Solutions:\nDeep learning-based super-resolution: Integrate SpatialScope’s VAE to computationally enhance Visium data to single-cell resolution, paired with NMF-based deconvolution of MSI data (Nat. Methods 2024, 21, 123–130).\nNanoscale landmarking: Use antibody-conjugated gold nanoparticles (AuNPs) as fiducial markers for both MSI and transcriptomics, enabling sub-5 µm alignment (Cell 2025, 183, 1205–1218).\nWe thank the reviewer for the query related to the handling of resolution differences between the MSI and Visium modalities. To address the comment, we added additional functionality to the MAGPIE pipeline to provide users with a wider set of options on how to aggregate MSI pixels, depending on the MSI resolution, to lower the risk of spurious correlations/co-localisations. The new options for aggregation are detailed in a new Supplementary note 2, with accompanying graphical summaries. Specifically, users can now choose whether to use MSI pixels which fall (i) within the actual Visium radius (55μm), (ii) in the expanded Visium radius (maximally expanded so radii do not overlap), or (iii) using an estimated MSI pixel size if this is larger than the Visium spots. We also added a new option where the aggregation output can be weighted on the distance from the Visium spot centre to the MSI pixel centre; this new option represents an addition to the previous mean and sum aggregation approaches. These new functionalities will enable users to customise and optimise their use of MAGPIE to the resolution of their MSI data and infer more robust conclusions for the integrated data. We have also altered the main text to reflect this additional functionality and make recommendations to users in lines 160-172 and Methods section, lines 833-838.\nWe further clarified that MAGPIE, as a computational framework, is not inherently reliant on agarose expansion of tissues; this wet-lab approach was used for the lung datasets due to the limitations of the tissue (to preserve native morphology and maintain the structural relationships between anatomical features such as alveoli, airways, and blood vessels) and not to artificially increase spatial resolution. This is a well-established practice in lung tissue preparation (Braber, et al., 2010, 10.1152/ajplung.00192.2010) and is essential due to the collapse-prone nature of pulmonary tissue. Agarose was chosen as the inflation medium due to its compatibility with both Visium and mass spectrometry imaging, unlike alternative embedding media such as OCT that are often used for Visium. To avoid confusion, we strengthened this point in the revised manuscript (Methods section, page 25, line 706-711) and added Supplementary note 1 expanding on the experimental setup for lung tissues and further highlighting the agnostic nature of MAGPIE to data generated using this procedure. MAGPIE is compatible with data generated from both expanded and non-expanded tissues, and performs robustly on datasets derived from non-expanded tissues (as illustrated in the brain and newly added breast cancer examples).\nWe appreciate the comments regarding how expansion may affect downstream analysis and agree that tissue-specific expansion dynamics could introduce subtle spatial distortions. To address this, MAGPIE includes non-linear transformation options during co-registration, which are intended to accommodate local tissue deformations. Further, downstream analyses such as calculating metabolite-gene distances are then performed on the transformed coordinate space and post-coregistration metabolite-gene spatial relationships are assessed, without assuming fixed distances a priori. Also, MAGPIE is optimised to operate at the spatial resolution of Visium and MSI which would limit the interpretations at subcellular compartments such as mitochondrial vs. cytoplasmic pools. While we agree that correlative high-resolution methods like TEM-FISSEQ could provide valuable insights for sub-organelle investigations, these case studies or customised optimisations fall outside the scope and resolution possibilities of the current framework which focuses on multi-modal alignment at the tissue level.\nFinally, we were unable to locate some references cited and were therefore unable to fully comprehend the extent and relevance of the suggestions. Moreover, as described earlier, detailed evaluation at single-cell or sub-cellular levels falls outside of the scope of our current work, given the multicellular resolution of the used methods (Visium, MSI). As such, we did not expand on these types of analyses in our revised manuscript and instead chose to focus on the other included analysis additions.\n2. Dynamic Biological Context & Temporal Decoupling\nCore Issue:\nMetabolite turnover (seconds) and transcriptional responses (hours) operate on divergent timescales, yet MAGPIE’s static integration cannot resolve:\nCausal inference: Whether metabolic changes drive gene expression or vice versa remains speculative without time-resolved data.\nPathway ambiguity: Shared metabolites (e.g., α-ketoglutarate in TCA cycle/epigenetics) may map to multiple genes, necessitating pathway-aware scoring (e.g., SPIRAL algorithm).\nSuggested Solutions:\nLive-cell spatial omics: Incorporate metabolic pulse-chase labeling (e.g., TREX probes) with nascent RNA capture (SLAM-seq) in the same tissue section (Science 2024, 384, eadj8791).\nDynamic modeling: Apply stochastic ordinary differential equations (sODEs) to infer metabolite-gene regulatory networks from snapshot data (Nat. Comput. Sci. 2025, 5, 200–212).\nWe thank the reviewer for pointing out this challenge regarding the temporal mismatch between metabolite turnover and transcriptional responses, which is a fundamental challenge for spatial multi-omics integration. MAGPIE is currently designed for single timepoint datasets, and the inference of causal relationships between gene expression and metabolic states falls beyond the scope of the framework. We added a Supplementary note 4 acknowledging the constraints of static spatial data and difficulties in resolving the dynamics of biological processes facing our community. We also outlined potential strategies to address these limitations, including the use of dynamic modelling approaches as suggested by the reviewer. A summary of this challenge is also included in the revised Discussion section (lines 488-523). Regarding the suggested references (Science 2024, Nat. Comput. Sci. 2025), we were unfortunately unable to locate these publications and could therefore not fully evaluate the relevance of the suggested solutions by the reviewer.\n3. Translational Relevance & Validation\nCore Issue: While MAGPIE demonstrates utility in pulmonary fibrosis, its generalizability to complex diseases (e.g., cancer) is unproven.\nCritical omissions include:\n Clinical benchmarking: No comparison to gold-standard LC-MS/RNA-seq from laser-capture microdissected (LCM) regions.\n Batch effects: Unaddressed technical variability across MSI platforms (e.g., MALDI vs. DESI ionization efficiency).\nSuggested Solutions:\n Multicenter validation: Apply MAGPIE to CPTAC cohorts with matched spatial omics and bulk proteomics, assessing concordance via rank-based metrics (e.g., Spearman’s ρ > 0.7).\n Single-cell ground truth: Validate using Xenium (transcriptomics) + nano-DESI (metabolomics) co-assays on adjacent 5-µm sections (BioRxiv 2025, doi:10.1101/2025.04.05.588442).\nWe thank the reviewer for their interest in the generalisability of the MAGPIE framework. To illustrate the versatility and generalisability of MAGPIE on diverse disease contexts, we added an additional cancer dataset to our revised manuscript, based on 3 human breast cancer samples for which Visium and DESI MSI data was generated from the same tissue sections, as presented in Integrating Ambient Ionization Mass Spectrometry Imaging and Spatial Transcriptomics on the Same Cancer Tissues to Identify RNA–Metabolite Correlations (Godfrey, et al., 2025, 10.1002/anie.202502028). We added a sub-section to the Results section of the revised manuscript entitled Spatial multi-modal analysis of human breast cancer through MAGPIE reveals changes in tumour microenvironment, Figure 5 and Supplementary figure 4 where we showcase MAGPIE’s ability to identify patterns in a data-driven manner that contribute significantly to the exploration of the cellular and molecular complexity of tumours. This additional case study underlines MAGPIE’s generalisability to characterise complex microenvironments and further proves its agnostic nature to tissue characteristics.\nAs an additional example of MAGPIE’s utility in understanding complex diseases, we would like to point to a recently published study in Nature Metabolism from May 2025 ( Tsyben, et al., 2025, 10.1038/s42255-025-01293-y), co-authored by three authors of this manuscript: Eleanor C. Williams, Lovisa Franzén and Gregory Hamm. In this study, an earlier version of MAGPIE was successfully applied to map metabolic states (glycolytic, oxidative and a mix of glycolytic and oxidative) defined using isotope labelling and mass spectrometry imaging of rapidly excised tumour sections from patients with glioblastoma onto spatial transcriptomics data generated from contiguous sections. This co-registration using the MAGPIE-based method enabled the authors to correlate metabolic states with cellular composition and tumour niches and propose the existence of metabolic phenotypes within glioblastoma which were tumour-cell-intrinsic and independent of the tumour microenvironment, and which are sufficiently large to be detected by clinically applicable metabolic imaging techniques. This study provides further evidence of the potential power of spatial multi-modal analysis through MAGPIE in a range of diseases including cancer.\nWe appreciate the reviewer’s suggestion to explore multicentre validation using large-scale cohorts such as CPTAC, however as far as we are aware CPTAC currently does not offer spatial omics data, which is required as input by MAGPIE. Bulk proteomic assays available in CPTAC lack spatial resolution which makes direct concordance assessments with MAGPIE impossible. We have therefore focused on the aforementioned cancer case studies to demonstrate MAGPIE’s utility in studying cancer.\nHowever, we would like to emphasize that fibrotic lung tissue represents a biological system of comparable complexity to cancer. The fibrotic lung is characterized by highly heterogenous pathological regions with co-existing areas of inflammation, tissue remodelling, and immune infiltration (Franzen, et al., 2024, 10.1038/s41588-024-01819-2; Madissoon, et al., 2022, 10.1038/s41588-022-01243-4; Wilson and Wynn, 2009, 10.1038/mi.2008.85; Smith and Smith, 2021, 10.1038/s41379-021-00889-5). Thus, the interplay between cell types and signalling niches in lung fibrosis shows strong parallels with the cellular ecosystems described in tumours. Additionally, fibrotic lesions often involve a high density of extracellular matrix deposition and metabolic reprogramming (Xie, et al., 2015, 10.1164/rccm.201504-0780OC; Rajesh, et al., 2023, 10.1016/j.pharmthera.2023.108436; Veith, et al., 2019, 10.1089/ars.2019.7742). Showcasing MAGPIE on fibrotic lung tissue therefore provides a highly relevant test case for the framework’s ability to resolve spatially complex pathophysiology.\nTo further address the impact of technical variability across MSI platforms brought up by the reviewer, we added a new Supplementary note 4. Moreover, by contrasting case studies on MALDI and DESI datasets, using a range of matrix choices for MALDI in the mouse brain dataset and different ionisation polarity in our various case studies (now clarified in the text in lines 244-246 and lines 447-449), we hope that we have sufficiently demonstrated the platform-agnostic utility of MAGPIE.\nFinally, we appreciate the reviewer’s suggestion of comparison against gold-standard LC-MS and RNA-seq from LCM regions; we agree this can be a valuable option for high-resolution validation by providing the opportunity to isolate targeted and specific regions and cell types with high accuracy while profiling transcripts and metabolites with high sensitivity. However, we believe our untargeted higher throughput analysis through Visium and MSI offers distinct benefits by capturing wider spatial context through continuous measurement across the tissue. This enables us to capture metabolic and gene expression gradients and gene-metabolite co-localisation patterns and so positions the Visium/MSI combination as an appealing exploratory option, which could be followed up by more targeted analysis for example through LCM, depending on the biological question under examination. As Visium and MSI are established technologies for studying gene expression and metabolite intensity at spatial resolution, respectively, we believe that additional validation as suggested using gold-standard LC-MS and RNA-seq from LCM regions or Xenium and nano-DESI co-assays on adjacent 5-µm sections fall outside the scope of our methodological manuscript. Additionally, we were unable to identify the suggested preprint detailing Xenium/nano-DESI co-assays and are thus unable to access any such data. We added Supplementary note 4 highlighting these targeted validation approaches, provided alongside further discussion points on the difficulty in assessing causal relationships.\nWe thank the reviewer for their thoughtful and encouraging summary of our work. We are grateful for the recognition of the potential of MAGPIE to advance spatial multi-omics integration in pharmacological and translational contexts. We also appreciate the comments on the potential of MAGPIE to bridge resolution gaps between modalities while preserving spatial context.\n1. Resolution Mismatch Between Modalities\nSpatial metabolomics (e.g., MALDI-MSI) typically achieves resolutions of 5–100 μm, while Visium transcriptomics operates at 50–100 μm. How does MAGPIE address potential discrepancies in resolution when aligning these datasets? For instance, high-resolution metabolomic data (e.g., 5 μm) might not directly correspond to lower-resolution transcriptomic spots, risking misinterpretation of co-localized signals. Clarification of downsampling or interpolation methods is needed.\nWe thank the reviewer for the constructive feedback on the downsampling procedure. We have now added extra functionality to the MAGPIE pipeline to allow users greater flexibility to decide whether MSI pixels should be selected for each Visium spot (i) only within the actual Visium spot radius of 55 µm, (ii) in the expanded Visium spot radius (maximally expanded so radii do not overlap but avoid gaps between spots), (iii) using an estimated MSI pixel size if this is larger than the Visium spots.\nWe envisage that option (i) would be the most commonly used option when the MSI data has much higher resolution than Visium, where whole MSI pixels may fall outside of the measured Visium spot radius; in such circumstances using the expanded Visium radius may risk false positives and misinterpretations of colocalised signals. We also expect that option (iii) would be relevant when the MSI resolution is lower than that of Visium, where one MSI pixel may contribute to multiple Visium spots. We have also added a new option where aggregation can be weighted by the distance from the Visium spot centre to the MSI pixel centre, in addition to the previous mean and sum aggregation options. These additional functionalities will enhance the usability of MAGPIE in a more tailored manner based on the resolution of the MSI data.\nTo clarify the aggregation process, we added an additional Supplementary note 2 providing more details and graphical summaries on the aggregation process. We also added a few sentences to the main text to highlight this new functionality and included recommendations to users in lines 160-172 and Methods section, page 25, line 706-711.\n2. Limited Demonstration of Brain Spatial Features\nWhile MAGPIE is validated on brain tissue, the results lack explicit visualization of brain region-specific spatial patterns (e.g., cortical layers, hippocampal subfields). Given the structural complexity of the brain, does the framework sufficiently capture nuanced cytoarchitecture? Evidence from studies like STEREO-seq (0.5 μm resolution) suggests higher-resolution modalities may better resolve such features. Including region-specific markers (e.g., NeuN for neurons) in case studies would strengthen its utility in neurobiology .\nWe agree with the reviewer that technologies with subcellular resolution, such as STEREO-seq, offer unique advantages in resolving very small structures which may be undetectable at the 55μm Visium resolution and so inherently limits the ability to capture smaller spatial structures. Although MAGPIE cannot overcome the limitations introduced by the underlying technologies or data types received as input (Visium and MSI), we have now included additional analyses showcasing its ability to identify fine-grained structures using the routinely acquired high resolution H&E modality.\nSpecifically we focused on sample MS3 from the same mouse brain study already included in the manuscript (Vicari, et al., 2024, 10.1038/s41587-023-01937-y, shown in Fig. 2f, Supplementary fig. 1d-e), which is a coronal section containing the substantia nigra from a mouse model of Parkinson’s disease where several small molecules were originally identified via MALDI-tandem MS (MS/MS). In our new Supplementary note 3 and ne SN3 Figure 1, we show that MAGPIE accurately distinguishes between two closely located but functionally distinct nuclei: the pars compacta (SNpc), where we find colocalization of dopamine, Th expression and dopaminergic neuron scores, and the pars reticulata (SNr), showing enrichment in GABA, Pvalb expression and inhibitory neuron signatures. MAGPIE also identifies excitatory neuron scores, Hpca expression and tocopherol localisation to hippocampal subfields CA1/CA3 stratum pyramidale, confirmed by morphology.\nThese examples highlight MAGPIE’s capacity to align transcriptomic, metabolomic, cell type data and morphology to resolve complex and compact structures despite resolution constraints of Visium. While high-resolution methods like STEREO-seq still have clear use-cases in resolving very small structures, MAGPIE provides a scalable, multi-modal approach that we showed can be used to resolve fine-grained spatial heterogeneity within the limits of existing platforms. Further details of this analysis can be found in Supplementary note 3.\n3. Applicability to Tumor Heterogeneity\nTumors exhibit extreme cellular and molecular heterogeneity, requiring simultaneous mapping of cell types, metabolic states, and spatial niches . Current MAGPIE examples focus on fibrotic lung and brain tissues but omit tumor models. Can the framework handle dense cellular interactions, stromal-tumor interfaces, or hypoxic gradients seen in cancers? Prior studies like MuCST and Stereo-seq highlight the need for tumor-specific validation to assess MAGPIE’s robustness in complex microenvironments.\nWe thank the reviewer for the feedback on the need to evaluate MAGPIE in tumour samples. We agree that tumour biology presents unique challenges for spatial multi-omics integration, including high cellular heterogeneity, dynamic microenvironmental gradients (e.g. hypoxia), and complex cell-cell interactions. We would however like to emphasize that fibrotic lung tissue represents a biological system of comparable complexity to case studies on cancer. The fibrotic lung is characterized by highly heterogenous pathological regions with co-existing areas of inflammation, tissue remodelling, and immune infiltration (Franzen, et al., 2024, 10.1038/s41588-024-01819-2; Madissoon, et al., 2022, 10.1038/s41588-022-01243-4; Wilson and Wynn, 2009, 10.1038/mi.2008.85; Smith and Smith, 2021, 10.1038/s41379-021-00889-5) . Thus, the interplay between cell types and signalling niches in lung fibrosis shows strong parallels with the cellular ecosystems described in tumours. Additionally, fibrotic lesions often involve a high density of extracellular matrix deposition and metabolic reprogramming (Xie, et al., 2015, 10.1164/rccm.201504-0780OC; Rajesh, et al., 2023, 10.1016/j.pharmthera.2023.108436; Veith, et al., 2019, 10.1089/ars.2019.7742). Showcasing MAGPIE on fibrotic lung tissue therefore provides a highly relevant test case for the framework’s ability to resolve spatially complex pathophysiology.\nIn response to the reviewer’s suggestion, we have additionally incorporated a cancer dataset case study into the revised manuscript to demonstrate the versatility of MAGPIE in a tumour context. Specifically, we have analysed 3 human breast cancer samples where Visium and DESI MSI data was generated from the same tissue sections, as presented in Integrating Ambient Ionization Mass Spectrometry Imaging and Spatial Transcriptomics on the Same Cancer Tissues to Identify RNA–Metabolite Correlations (Godfrey, et al., 2025, 10.1002/anie.202502028). We have added a new Results section, entitled Spatial multi-modal analysis of human breast cancer through MAGPIE reveals changes in tumour microenvironment, Figure 5 and Supplementary figure 4 where we showcase MAGPIE’s ability to assist in the exploration of the cellular and molecular heterogeneity exhibited in tumours and study stromal-tumour interfaces.\nAs an additional example of MAGPIE’s utility in understanding complex diseases, we would like to point to a recently published study in Nature Metabolism (Tsyben et al, May 2025, 10.1038/s42255-025-01293-y), co-authored by three authors of this manuscript: Eleanor C. Williams, Lovisa Franzén and Gregory Hamm. In this study, an earlier version of MAGPIE was successfully applied to map metabolic states (glycolytic, oxidative and a mix of glycolytic and oxidative) defined using isotope labelling and mass spectrometry imaging of rapidly excised tumour sections from patients with glioblastoma onto spatial transcriptomics data generated from contiguous sections. This co-registration using the MAGPIE-based method enabled the authors to correlate metabolic states with cellular composition and tumour niches and propose the existence of metabolic phenotypes within glioblastoma which were tumour-cell-intrinsic and independent of the tumour microenvironment, and which are sufficiently large to be detected by clinically applicable metabolic imaging techniques. This study provides further evidence of the potential power of spatial multi-modal analysis through MAGPIE in a range of diseases including cancer.\n4. Technical Scalability and Computational Demands\nHigh-resolution spatial omics datasets are computationally intensive. MAGPIE’s performance on terabyte-scale data (e.g., whole-tumor imaging) remains unaddressed. Comparisons with GPU-optimized workflows (e.g., LLaVA for satellite imaging ) would clarify its feasibility for large-scale clinical studies.\nWe thank the reviewer for this point on MAGPIE’s scalability. We have conducted additional benchmarking to assess the robustness and reliability of the MAGPIE framework in increasing MSI resolution, which is the primary variable affecting data volume (since Visium data will be of roughly fixed size and resolution). These results are now summarised in Supplementary figure 1a.\nWe see a linear increase in both peak memory usage and runtime with the number of MSI pixels. For the core steps of the pipeline, all configurations tested completed in under 3 minutes and 13GB of RAM on CPU. The optional MSI-to-spot aggregation step, which is more memory-intensive, reached a peak of 122GB of RAM in and took just over 15 minutes in the highest-resolution setting tested.\nTo contextualize these benchmarks, our largest practical use case corresponds to ~30 MSI pixels per Visium spot (∼3 μm/pixel). We also tested the pipeline at much higher resolutions (up to ∼500 pixels per Visium spot, or ∼0.2 μm/pixel), where the core steps completed in ~30 minutes and used a peak of 107 GB RAM on a MacBook Pro with an M3 Max chip and 128 GB of RAM (not shown in Supplementary figure 1a but included below in Fig R1). MAGPIE can also be run in parallel via Snakemake and is compatible with common high-performance computing environments, allowing flexible deployment on local workstations or clusters.\nFurther to this point, our tool prioritises interpretability, reproducibility, and wide accessibility, particularly to clinical or wet-lab scientists who may have more limited access to GPU resources. By avoiding reliance on specialised hardware, MAGPIE would remain accessible for a wider range of users and institutions. In contrast to GPU-heavy, deep-learning frameworks like LLaVA for interpreting high-dimensional visual data, MAGPIE is designed to be lightweight, deterministic, and interpretable, without relying on neural networks or GPU-specific libraries."}, {"round": 2, "reviewer_comments": {"reviewer_1": "Spatial omics, such as spatial transcriptomics, spatial metabolomics, and integrated analysis of cell morphology, has\nsignificant biological implications for understanding the development of diseases (especially cell heterogeneity and tumor\nmicroenvironment). A single spatial omics technique cannot address the complex physiological and pathological processes.\nMAGPIE represents a valuable first framework for integrating spatial multi-omics, but a large number of methodological\nimprovements are still needed to overcome the limitations in resolution, dynamics, and translatability. In the paper \"Spatial\nIntegration Analysis of Transcriptomic and Metabolomic Changes in Tissue Injury Studies\", the authors made beneficial\nattempts and explanations; however, for this issue, such as \"the inherent resolution mismatch between Visium (55\nmicrometers dots, capturing 10 - 50 cells) and MALDI/DESI-MSI (10 - 50 micrometer pixels, possibly spreading to 100\nmicrometers) introduces false negative correlations in co-localization analysis\", no reasonable and convincing answers\nhave been provided.", "reviewer_2": "This is a comprehensive and well-designed study that addresses an important challenge in spatial multi-omics data\nintegration. The authors present MAGPIE, a novel computational framework that is both generalisable and scalable, as\nconvincingly demonstrated on datasets from multiple technologies and tissues. The application to a pharmacologically\nrelevant model of lung injury effectively highlights the method's utility in deriving biologically and clinically meaningful\ninsights.\nIn the revised manuscript, the authors have adequately addressed the reviewers' comments and have satisfactorily improved\nthe clarity of the methodology and the discussion of the results. The revisions have strengthened the paper overall."}, "author_response": "We thank the reviewer for highlighting the important issue of resolution differences between Visium and MSI. We agree that these differences can influence co-localisation analyses and represent a key consideration for multimodal integration. Alongside our previous additions to the MAGPIE tool and manuscript, we have further expanded the manuscript to more clearly acknowledge this limitation and to make this clear to users when interpreting results. In particular, we added additional text to the Introduction (lines 158-160), Results (lines 227-229) and Discussion (lines 579-583) sections outlining how resolution mismatches may blur co-localisations, as well as how MAGPIE’s resolution-aware aggregation strategies help mitigate, but cannot fully eliminate, such effects. We believe these revisions now more transparently convey the caveat and provide appropriate context for users when applying MAGPIE to datasets with differing spatial resolutions.\nWe thank the reviewer for their positive assessment and thoughtful feedback. We are pleased that the revisions improved the clarity and presentation of the work, and we appreciate the reviewer’s supportive comments on the utility and robustness of MAGPIE."}]

Decision letter