Understanding how the cells' anatomical location and spatial molecular distribution determine the cellular response to a high-caloric diet requires developing machine-learning methods for analysis and visualization.
The R-package Csppa employs machine learning for cellular spatial point pattern analysis and visualization. Hence, Csppa enables a comprehensive characterization of how specific cellular gene expression patterns evolve spatially and temporally during different stages of adaptation to a high‑caloric diet.
Here, we focus on astrocytes in the arcuate nucleus of the mouse brain, examining the expression of the Gfap and Aldh1l1 genes and their spatial distributions under standard chow (SC), as well as 5‑day and 15‑day high-fat high-sugar (HFHS) diet conditions. The R package Csppa is used to assess whether these astrocyte populations are spatially organised and whether they form local clusters in response to the HFHS diet over time.
To address this, the method quantifies the spatial coherence of each astrocyte subtype across the experimental conditions (SC, 5‑day HFHS, and 15‑day HFHS). Spatial coherence—representing similarity among neighbouring cells—is measured using Moran’s I spatial autocorrelation coefficient, a well-established metric of spatial dependence. In addition, a random forest classifier is applied to characterise how astrocytes expressing Gfap and Aldh1l1 are distributed within the shared feature space for each experimental group.
The package Csppa depends on spatstat and on R >= 3.0.0 and is available from GitHub. This requires the package devtools:
devtools::install_github("viktormiok/Csppa", build_vignettes=TRUE)Please restart R before loading the package and its documentation:
library(Csppa)
utils::help(Csppa)
utils::vignette("Csppa")Data required for cellular spatial point pattern analysis will be deposited online soon:
| Data type | Data link |
|---|---|
| Aldh1l1 only | link |
| Gfap only | link |
| Double positive | link |
Please see the following tutorials for detailed examples of how to use Csppa:
Csppa is distributed under the MIT license. Please read the license, which is distributed in the LICENSE file, before using it.
Publications related to Csppa include:
-
Lutomska, L.M., Miok, V., Krahmer, N., González García, I., Gruber, T., Le Thuc, O., De Bernardis Murat, C., Legutko, B., Sterr, M., Saher, G., Lickert, H., Ussar, S., Tschöp, M., Lutter, D., García-Cáceres, C. (2022), Diet triggers specific responses of hypothalamic astrocytes in time and region dependent manner, Glia 70 (10), 1795-2008.
-
Lutomska, L.M., Miok, V., Krahmer, N., González García, I., Gruber, T., Le Thuc, O., De Bernardis Murat, C., Legutko, B., Sterr, M., Saher, G., Lickert, H., Ussar, S., Tschöp, M., Lutter, D., García-Cáceres, C.(2021), Hypercaloric diet selectively triggers a transient molecular rearrangement of astrocytes in the arcuate nucleus, bioRxiv, 4(1).
Please cite the relevant publications if you use Csppa.

