Actualizar MSI_julia-python_mapping.md

This commit is contained in:
2026-06-18 19:58:26 +02:00
parent 24ce5545da
commit 9131074312
+4 -4
View File
@@ -74,7 +74,7 @@ To enable training on consumer-grade hardware (NVIDIA RTX 3050 Mobile, ~4 GB VRA
5. **Clustering and Optimization:** To determine the optimal number of clusters ($k$), we performed a multi-metric systematic sweep from $k = 2$ to $k = 20$ (Figure 1A). While global mathematical optima were observed at $k = 2$ and $k = 3$ —corresponding to a coarse differentiation between the leaf tissue and the background— these configurations failed to resolve the specialized anatomical compartments of the leaf. We identified $k = 10$ as the functional optimum, supported by a Silhouette Score of 0.6894 (Figure 1B), a Davies-Bouldin Index of 0.6243 (Figure 1C), and a Calinski-Harabasz Index of 2054.20 (Figure 1D). This value represents a stable convergence point where the latent space successfully deconvolutes the hierarchical vascular architecture (midrib and secondary veins) and localized metabolic sequestration sites without incurring over-segmentation. Consequently, this choice prioritizes anatomical fidelity over mathematical parsimony, ensuring that the resulting metabolic map accurately reflects the complex tissue compartmentalization of *D. innoxia*.
![Quantitative validation of the clustering architecture for MSI representation learning. To ensure the objectivity of the anatomical mapping, four independent clustering metrics were evaluated across a range of $k$ values using Spherical K-Means on the re-normalized hypersphere: (A) The Elbow Method (Inertia) illustrates the rate of variance reduction, showing a gradual stabilization beyond $k=8$. (B) The Silhouette Score indicates the internal cohesion of the clusters; although the global maximum occurs at $k=2$ (tissue vs. background), the score achieves 0.6894 at $k=10$, confirming a well-defined structure in the latent manifold. (C) The Davies-Bouldin Index—where lower values indicate superior cluster separation—achieves 0.6243 at $k=10$, well below the critical threshold of 1.0, demonstrating distinct boundaries between metabolic domains. (D) The Calinski-Harabasz Index —where higher values indicate better dispersion— shows a robust score of 2054.20 at the selected $k$. Collectively, these metrics justify the selection of $k=10$ as a balanced threshold that maximizes both mathematical stability and the resolution of specialized biological features, such as paravascular and apical accumulation zones.](cluster_validation_detailed_plot.png)
![Quantitative validation of the clustering architecture for MSI representation learning. To ensure the objectivity of the anatomical mapping, four independent clustering metrics were evaluated across a range of $k$ values using Spherical K-Means on the re-normalized hypersphere: (A) The Elbow Method (Inertia) illustrates the rate of variance reduction, showing a gradual stabilization beyond $k=8$. (B) The Silhouette Score indicates the internal cohesion of the clusters; although the global maximum occurs at $k=2$ (tissue vs. background), the score achieves 0.6894 at $k=10$, confirming a well-defined structure in the latent manifold. (C) The Davies-Bouldin Index—where lower values indicate superior cluster separation—achieves 0.6243 at $k=10$, well below the critical threshold of 1.0, demonstrating distinct boundaries between metabolic domains. (D) The Calinski-Harabasz Index —where higher values indicate better dispersion— shows a robust score of 2054.20 at the selected $k$. Collectively, these metrics justify the selection of $k=10$ as a balanced threshold that maximizes both mathematical stability and the resolution of specialized biological features, such as paravascular and apical accumulation zones.](Figure1.png)
---
@@ -82,7 +82,7 @@ To enable training on consumer-grade hardware (NVIDIA RTX 3050 Mobile, ~4 GB VRA
We conducted direct surface analysis of *D. innoxia* leaves using an LD-LTP-MS setup in positive ionization mode. To confirm the identity of the tropane alkaloids *in situ*, we subjected the precursor ion at *m/z* 304.17 to tandem mass spectrometry (MS/MS) at a collision energy of 20 eV. Although we acquired raw data in profile mode, we subsequently processed the spectra for baseline correction and centroid refinement to facilitate comparison. The resulting fragmentation pattern from the leaf surface showed an excellent spectral match with the commercial scopolamine reference standard. The presence of diagnostic product ions across the *m/z* 80–320 range confirms the unambiguous structural identification of scopolamine directly from the plant surface without the need for extensive sample preparation (Figure 2; García-Rojas et al., 2024).
![Mirrored MS/MS spectra for the confirmation of scopolamine (*m/z* 304.17) acquired via LD-LTP-MS in positive ion mode. The upper panel (blue) represents the fragmentation profile obtained directly from the leaf surface of *D. innoxia*, while the lower panel (red) shows the commercial reference standard. Data were acquired in profile mode and are presented as refined centroids after baseline subtraction. Both spectra were generated using collision-induced dissociation (CID) at 20 eV. The axes denote relative abundance (%) and the mass-to-charge ratio (*m/z*), respectively.](Mirror_Plot_Scopolamine_304_Academic.png)
![Mirrored MS/MS spectra for the confirmation of scopolamine (*m/z* 304.17) acquired via LD-LTP-MS in positive ion mode. The upper panel (blue) represents the fragmentation profile obtained directly from the leaf surface of *D. innoxia*, while the lower panel (red) shows the commercial reference standard. Data were acquired in profile mode and are presented as refined centroids after baseline subtraction. Both spectra were generated using collision-induced dissociation (CID) at 20 eV. The axes denote relative abundance (%) and the mass-to-charge ratio (*m/z*), respectively.](Figure2.png)
### 3.2 Latent Space Geometry and Chemical Validation
The high-dimensional embeddings generated by the custom GroupNorm backbone were projected into a 2-D manifold using t-SNE (Figure 3) (Van der Maaten & Hinton, 2008). The resulting latent space exhibits a highly structured geometry, where ions are grouped not by their absolute intensity, but by their shared spatial topographies. A cornerstone of the validation for this self-supervised approach is the emergence of **Isotopic Coherence** within the latent manifold (Table 2). In MSI, a molecular species and its naturally occurring isotopes (e.g., $[M+H]^+$ and $[M+H+1]^+$) are fundamentally tied by an identical spatial distribution, providing a form of natural "ground truth" that requires no manual annotation.
@@ -109,14 +109,14 @@ Furthermore, this structural mapping revealed the phenomenon of **Inverse Mask C
(Identified by MS/MS at *m/z* 304.17 (Figure 2). The signal is distributed across adjacent bins (*m/z* 304.00 and 304.33, both in Cluster 3) due to spectral binning of the imaging data, confirming internal consistency between the structural identification and the unsupervised clustering.)
![Visualizing metabolic specialization across anatomical zones of a *D. innoxia* leaf using t-SNE. This scatter plot displays the t-SNE dimensionality reduction of MSI data acquired from a leaf section at a spatial resolution of 150 µm. The original dataset of 588 *m/z* feature intensities was projected into a 2D space to visualize metabolic similarity. Ten distinct clusters are identified via automated segmentation of the co-localized ion images and are represented here by a qualitative color bar (right). Points of the same color indicate pixels with closely related metabolic signatures, corresponding to different anatomical regions within the leaf. The strong segregation between groups highlights a sharp molecular differentiation of metabolic functions across the tissue.](msi_tsne_corregido.png)
![Visualizing metabolic specialization across anatomical zones of a *D. innoxia* leaf using t-SNE. This scatter plot displays the t-SNE dimensionality reduction of MSI data acquired from a leaf section at a spatial resolution of 150 µm. The original dataset of 588 *m/z* feature intensities was projected into a 2D space to visualize metabolic similarity. Ten distinct clusters are identified via automated segmentation of the co-localized ion images and are represented here by a qualitative color bar (right). Points of the same color indicate pixels with closely related metabolic signatures, corresponding to different anatomical regions within the leaf. The strong segregation between groups highlights a sharp molecular differentiation of metabolic functions across the tissue.](Figure3.png)
### 3.3 Chemical-Anatomical Segmentation in *D. innoxia*
The unsupervised decomposition of the latent space yielded ten distinct molecular domains (Clusters 0–9), each representing a reproducible and spatially resolved chemical pattern across the *D. innoxia* leaf. These clusters capture the heterogeneity of ion distributions and reveal a structured organization of metabolites at the tissue level.
Rather than reflecting random variation, the observed spatial arrangements define consistent chemical domains characterized by differences in ion intensity, co-localization, and spatial continuity. In particular, the distribution of key ions such as atropine ($m/z \approx 290.02$) and scopolamine ($m/z \approx 304.0$) highlights the presence of chemically distinct regions associated with specific anatomical features, including the midrib, lamina, and apical tip (Figure 4, Table 3).
![t-SNE-based clustering reveals spatially resolved chemical domains in *D. innoxia* leaves ($k = 10$). The t-distributed stochastic neighbor embedding (t-SNE) projection of MSI data separates the dataset into ten distinct clusters (Clusters 0–9), each corresponding to a reproducible spatial ion distribution pattern. Representative ion images (one per cluster) illustrate the characteristic spatial topology associated with each molecular domain. Cluster 0 is characterized by large defined islands concentrated near the apex of the leaf. Cluster 1 displays a fully apical distribution, with highly defined signal concentrated exclusively at the leaf tip. Cluster 2 shows broad, uniform presence across the entire leaf surface, reflecting a vascular-parenchymal distribution of biosynthetic precursors. Cluster 3 combines midrib signal with small islands distributed across the lamina and enrichment toward the tip. Cluster 4 exhibits a mixed pattern encompassing the tip, midrib, and large islands distributed across the leaf. Cluster 5 presents medium-sized islands throughout the leaf in conjunction with midrib-associated signal. Cluster 6 shows combined presence at the tip, midrib, and across the entire leaf surface. Cluster 7 is dominated by large islands across the leaf with a minor component at the tip. Cluster 8 displays signal in the midrib, tip, and medium-sized islands across the leaf. Cluster 9 shows large and small islands distributed across the leaf with moderate apical presence. A representative photograph of a *D. innoxia* leaf is included to provide anatomical reference for the spatial patterns observed in the MSI-derived clusters.](TSNE_figure.png)
![t-SNE-based clustering reveals spatially resolved chemical domains in *D. innoxia* leaves ($k = 10$). The t-distributed stochastic neighbor embedding (t-SNE) projection of MSI data separates the dataset into ten distinct clusters (Clusters 0–9), each corresponding to a reproducible spatial ion distribution pattern. Representative ion images (one per cluster) illustrate the characteristic spatial topology associated with each molecular domain. Cluster 0 is characterized by large defined islands concentrated near the apex of the leaf. Cluster 1 displays a fully apical distribution, with highly defined signal concentrated exclusively at the leaf tip. Cluster 2 shows broad, uniform presence across the entire leaf surface, reflecting a vascular-parenchymal distribution of biosynthetic precursors. Cluster 3 combines midrib signal with small islands distributed across the lamina and enrichment toward the tip. Cluster 4 exhibits a mixed pattern encompassing the tip, midrib, and large islands distributed across the leaf. Cluster 5 presents medium-sized islands throughout the leaf in conjunction with midrib-associated signal. Cluster 6 shows combined presence at the tip, midrib, and across the entire leaf surface. Cluster 7 is dominated by large islands across the leaf with a minor component at the tip. Cluster 8 displays signal in the midrib, tip, and medium-sized islands across the leaf. Cluster 9 shows large and small islands distributed across the leaf with moderate apical presence. A representative photograph of a *D. innoxia* leaf is included to provide anatomical reference for the spatial patterns observed in the MSI-derived clusters.](Figure4.png)
**Table 3. Summary of unsupervised segmentation domains in *D. innoxia* leaf.**