diff --git a/MSI_Toloache_Paper_English.md b/MSI_Toloache_Paper_English.md index 56a93aa..59a09df 100644 --- a/MSI_Toloache_Paper_English.md +++ b/MSI_Toloache_Paper_English.md @@ -7,7 +7,7 @@ --- ## Abstract -Mass Spectrometry Imaging (MSI) has emerged as a fundamental tool in spatial metabolomics (García-Rojas et al., 2024), enabling the *in situ* visualization of molecular distributions. However, the nature of these data—characterized by massive volumes of multivariate information and high levels of instrumental noise—poses critical challenges for traditional analysis methods. In this work, we present an innovative computational architecture that addresses the "two-language problem" by integrating **Julia** for high-performance data processing and **Python** for representation learning via deep neural networks. We implemented a self-supervised learning workflow based on the **SimCLR** architecture with an **EfficientNet-B0** encoder, designed to extract robust morphological features from ion images without the need for prior labeling. This system was applied to the study of *Datura innoxia* (toloache) leaves, achieving automated anatomical segmentation that accurately distinguishes vascular and parenchymal tissues. Our results demonstrate that the latent space generated by the neural network captures fundamental chemical relationships, such as the co-localization of isotopic patterns, offering a scalable and objective pathway for the interpretation of complex biological systems. +Mass Spectrometry Imaging (MSI) has emerged as a fundamental tool in spatial metabolomics (García-Rojas et al., 2024), enabling the *in situ* visualization of molecular distributions. However, the nature of these data—characterized by massive volumes of multivariate information and high levels of instrumental noise—poses critical challenges for traditional analysis methods. In this work, we present an innovative computational architecture that addresses the "two-language problem" by integrating **Julia** for high-performance data processing and **Python** for representation learning via deep neural networks. We implemented a self-supervised learning workflow based on the **SimCLR** architecture with an **EfficientNet-B0** encoder, designed to extract robust morphological features from ion images without the need for prior labeling. This system was applied to the study of *Datura innoxia* (toloache) leaves at a spatial resolution of 100 µm, achieving automated anatomical segmentation that accurately distinguishes vascular and parenchymal tissues. Our results demonstrate that the latent space generated by the neural network captures fundamental chemical relationships, such as the co-localization of isotopic patterns, offering a scalable and objective pathway for the interpretation of complex biological systems. --- @@ -23,7 +23,7 @@ Traditionally, MSI data analysis has relied on linear methods and standard imagi ### 2.1 Phase I: High-Performance Processing and Data Normalization (Julia) The preprocessing stage was conducted using the **JuliaMSI** framework (Sierra-Álvarez et al., 2025), a platform specifically engineered to address the computational bottlenecks of the "two-language problem." By leveraging Julia’s just-in-time (JIT) compilation and efficient memory-mapping capabilities, we facilitated the rapid ingestion and manipulation of massive **imzML** binary files. As demonstrated in previous benchmarks (Sierra-Álvarez et al., 2025), this architecture provides a significant performance advantage over interpreted environments such as Python or R, enabling the high-throughput extraction of mass slices without compromising spectral precision. -1. **Ion Extraction and Filtering:** Mass slices were extracted from the `Leaf.imzML` dataset within the ***m/z* 50.0 to 700.0** range. To ensure the inclusion of only chemically relevant signals, peaks were filtered using an intensity threshold of 2% relative to the base peak of the average spectrum, resulting in a refined subset of ion images for downstream analysis. +1. **Ion Extraction and Filtering:** Mass slices were extracted from the `Leaf.imzML` dataset within the ***m/z* 50.0 to 700.0** range. This upper limit was selected because no significant signals were detected beyond this threshold using the LD-LTP-MSI technique for this specific sample, and its implementation allowed for a more computationally manageable dataset. To ensure the inclusion of only chemically relevant signals, peaks were filtered using an intensity threshold of 2% relative to the base peak of the average spectrum, resulting in a refined subset of ion images for downstream analysis. 2. **TrIQ Normalization (Threshold Intensity Quantization):** A dynamic TrIQ algorithm was implemented, calculating the 98th percentile to mitigate hotspots and preserve contrast in low-intensity regions (Rosas-Román et al., 2024). For each ion map, the **98th percentile** of the intensity distribution was calculated; all pixels exceeding this value were capped at this threshold. This percentile-based approach prevents outliers from skewing the global contrast, thereby preserving the spatial details of low-abundance metabolites that would otherwise be suppressed in a standard linear scaling. By compressing the dynamic range, TrIQ ensures that the morphological features of the chemical distributions are standardized, which is essential for the stability of the subsequent contrastive learning phase. 3. **Spatial Standardization:** To ensure compatibility with the deep learning backbone, each normalized ion map was spatially resampled to a resolution of **224x224 pixels** using bilinear interpolation. This step standardizes the input geometry while maintaining the structural integrity of the leaf’s anatomical features, such as the vascular midrib and parenchymal regions(Hu et al., 2022). @@ -48,20 +48,24 @@ A cornerstone of the validation for this self-supervised approach is the emergen Figure X. **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 100 µ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. ### 3.2 Chemical-Anatomical Segmentation in *D. innoxia* -The unsupervised decomposition of the latent space yielded ten distinct molecular domains, each reflecting a specialized spatial organization within the *D. innoxia* leaf. The morphological patterns observed across these clusters provide significant insights into the metabolic compartmentalization of tropane alkaloids and other secondary metabolites. +The unsupervised decomposition of the latent space yielded ten distinct molecular domains (Clusters 0-9), each reflecting a specialized spatial organization within the *D. innoxia* leaf. The morphological patterns observed across these clusters provide significant insights into the metabolic compartmentalization of tropane alkaloids and other secondary metabolites. - 3.2.1 Vascular and Transport Systems (Clusters 3, 7, and 8) -The neural network accurately delineated the leaf’s transport system without prior anatomical knowledge. **Cluster 3** specifically isolates the primary venation, characterized by ions involved in the long-distance translocation of metabolites. A key finding was the assignment of scopolamine ($m/z \approx 304$) to this domain corroborating its active mobilization through the vascular conduit from its biosynthetic origin in the roots to the leaf lamina. Clusters 7 and 8 further define "transition zones" and "terminal sinks," where metabolites move from the xylem/phloem into the surrounding parenchyma or accumulate at the apical margins. + 3.2.1 Vascular and Midrib-Associated Domains (Clusters 9, 0, 2, 4, 6) +The neural network accurately delineated the leaf’s transport system, with **Cluster 9** acting as the primary vascular domain. This cluster is characterized by a very clear midrib presence, where ions such as atropine ($m/z \approx 290.02$) and scopolamine ($m/z \approx 304.0$) are highly distinguishable, alongside other ions distributed in small to medium islands across the lamina. +* **Cluster 4** and **Cluster 2** reinforce this vascular connectivity, with Cluster 4 showing a midrib distribution coupled with larger metabolic islands, while Cluster 2 combines venation signals with medium-to-large islands. +* **Cluster 0** exhibits a more subtle midrib presence integrated with medium-sized islands. +* **Cluster 6** identifies a unique distribution adjacent to anatomical vascular structures (paravascular) and throughout the rest of the leaf tissue. - 3.2.2 Apical Accumulation and Defense (Clusters 1, 6, 8, and 9) - * Cluster 1 (Pure Apical): Exclusively localized at the leaf tip, this cluster represents a highly specific chemical domain. Concentration at the leaf apex is a known defense strategy in Solanaceae, potentially related to guttation or the directed accumulation of toxins to deter herbivores at the most exposed parts of the leaf. - * Cluster 6 (Mixed Apical/Patchy): This cluster exhibits a unique combination of apical concentration and large, patchy distributions across the leaf surface. Hyoscyamine ($m/z \approx 290$) was assigned to this domain, suggesting a dual role of storage in specialized tissues (patchy "islands") and accumulation at the leaf tips for localized defense. + 3.2.2 Apical Accumulation and Terminal Sinks (Clusters 3, 5, 7) +Several clusters highlight the concentration of metabolites at the leaf tip, a known defensive and physiological strategy in *Datura*. +* **Cluster 3** is defined by small islands distributed across the leaf with a pronounced density near the apex. +* **Cluster 5** presents a mixed distribution of small and large islands with a clear accumulation at the leaf tip. +* **Cluster 7** exhibits multimodal characteristics, including clear apical localization, small-to-medium islands across the organ, and a slight presence in the midrib. - 3.2.3 Compartmentalized Patchy Distributions (Clusters 0, 4, 5) - * Clusters 0, 4, and 5 reveal a 'punctate' or 'island-like' topography, a spatial hallmark of specialized epidermal structures such as glandular trichomes. In *D. innoxia*, these chemical foci likely represent discrete sequestration sites where tropane alkaloids are concentrated to mitigate autotoxicity while maintaining a frontline defense against herbivory. - - 3.2.4 Ubiquitous Homogeneous Background (Cluster 2) - * Cluster 2 (Universal Distribution): This cluster encompasses ions distributed uniformly across the entire leaf surface. These signals are likely associated with primary metabolism (e.g., chlorophylls, lipids, and structural carbohydrates) or common background signals inherent to the biological matrix, serving as the metabolic baseline of the leaf tissue. + 3.2.3 Isolated Sequestration and Island-like Topographies (Clusters 1, 8) +These clusters represent discrete metabolic foci, likely corresponding to specialized structures like glandular trichomes or epidermal storage sites. +* **Cluster 1** shows a uniform distribution of small and medium islands throughout the entire leaf surface. +* **Cluster 8** is characterized by highly defined, isolated islands of intense presence surrounded by "empty" space. Additionally, this cluster exhibits notable signals along the midrib and slight presence at the apical tip, suggesting a complex mobilization pattern. ---