Actualizar MSI_julia-python_mapping.md

This commit is contained in:
2026-06-12 04:01:35 +02:00
parent 2fe645c23a
commit d0decb597a
+2 -2
View File
@@ -31,7 +31,7 @@ We conducted the preprocessing stage using the **JuliaMSI** framework (Sierra-Á
The selection of Julia as the primary engine for data ingestion is justified by its superior performance in handling the high-dimensional sparse matrices characteristic of imzML files. Recent benchmarks have demonstrated that Julia-based architectures, such as the JuliaMSI framework, outperform traditional R-based implementations (e.g., RmsiGUI) by significant margins, showing up to 5.2-fold faster processing on Linux environments (Sierra-Álvarez et al., 2025). Furthermore, at the library level, Julia's native parsing of binary spectral data has been shown to be up to 214 times faster than equivalent implementations in R (Rosas-Román et al., 2024). This computational efficiency is critical for resolving the "two-language problem," as it allows the rapid extraction of hundreds of mass slices and their subsequent normalization in a fraction of the time required by interpreted environments, effectively enabling a high-throughput bridge to the Python-based deep learning ecosystem. The selection of Julia as the primary engine for data ingestion is justified by its superior performance in handling the high-dimensional sparse matrices characteristic of imzML files. Recent benchmarks have demonstrated that Julia-based architectures, such as the JuliaMSI framework, outperform traditional R-based implementations (e.g., RmsiGUI) by significant margins, showing up to 5.2-fold faster processing on Linux environments (Sierra-Álvarez et al., 2025). Furthermore, at the library level, Julia's native parsing of binary spectral data has been shown to be up to 214 times faster than equivalent implementations in R (Rosas-Román et al., 2024). This computational efficiency is critical for resolving the "two-language problem," as it allows the rapid extraction of hundreds of mass slices and their subsequent normalization in a fraction of the time required by interpreted environments, effectively enabling a high-throughput bridge to the Python-based deep learning ecosystem.
1. **Ion Extraction and Filtering:** We extracted mass slices 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, we filtered peaks 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. Owing to the spectral binning inherent to the instrument's data acquisition, a single molecular species may be distributed across adjacent m/z channels; this discretization is reflected in the ion image filenames (e.g., m/z 304.00 and 304.33 for scopolamine) and must be considered when comparing imaging clusters with high-resolution MS/MS identifications. 1. **Ion Extraction and Filtering:** We extracted mass slices 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, we filtered peaks 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. Owing to the spectral binning inherent to the instrument's data acquisition, a single molecular species may be distributed across adjacent *m/z* channels; this discretization is reflected in the ion image filenames (e.g., *m/z* 304.00 and 304.33 for scopolamine) and must be considered when comparing imaging clusters with high-resolution MS/MS identifications.
2. **TrIQ Normalization (Threshold Intensity Quantization):** To mitigate the impact of "hotspots"—stochastic pixels with disproportionately high intensities that obscure lower-abundance metabolic distributions—we implemented a dynamic TrIQ algorithm (Rosas-Román & Winkler, 2021). For each raw ion map $I_{raw}$, the algorithm identifies a signal threshold $T$ based on the distribution of non-zero, finite intensity values $V = \{i \in I_{raw}\mid i > 0, i < \infty\}$. The threshold is defined as the 98th percentile of this distribution: 2. **TrIQ Normalization (Threshold Intensity Quantization):** To mitigate the impact of "hotspots"—stochastic pixels with disproportionately high intensities that obscure lower-abundance metabolic distributions—we implemented a dynamic TrIQ algorithm (Rosas-Román & Winkler, 2021). For each raw ion map $I_{raw}$, the algorithm identifies a signal threshold $T$ based on the distribution of non-zero, finite intensity values $V = \{i \in I_{raw}\mid i > 0, i < \infty\}$. The threshold is defined as the 98th percentile of this distribution:
@@ -114,7 +114,7 @@ $^{*}$Identified by MS/MS at *m/z* 304.17 (Figure 2). The signal is distributed
### 3.3 Chemical-Anatomical Segmentation in *D. innoxia* ### 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. 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). 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.](TSNE_figure.png)