The R Shiny app CsppaRshiny performs machine learning analysis and visualization of cellular spatial point patterns under hypercaloric diet shifts, and it is based on Csppa R-package.
The application visualises spatial point pattern density in both 2D and 3D, offering flexible data representation tailored to the research question. It also enables both global and local significance assessment of these densities using a range of statistical methods.
K-Nearest Neighbour and Random Forest classification algorithms are implemented to compare the grouping of the cells expressing different markers within and between the diets. Additionally, the correlation and spatial autocorrelation of cells expressing different markers can be compared using the Mantel and Moran's I tests, respectively.
Here, we focus on astrocytes in the arcuate nucleus of the mouse brain, examining the expression of Gfap and Aldh1l1 and reconstructing their spatial point patterns under standard chow (SC), 5‑day, and 15‑day high‑fat high‑sugar (HFHS) diets. The R package Csppa enables the assessment of whether these astrocyte populations exhibit spatial organisation and a tendency to form locally homogeneous clusters in response to HFHS exposure over time. Spatial coherence of each astrocytic subtype, defined as similarity among neighbouring cells, is quantified across conditions (SC, 5d, and 15d HFHS) using Moran’s I, a well-established measure of spatial autocorrelation. In addition, a random forest classifier is applied to identify shared feature space partitions among astrocytes expressing Gfap and Aldh1l1 across experimental groups.
To run the CsppaRshiny app locally, ensure all dependencies are installed. Open the app.R file in RStudio and click Run App. Before launching, either load the functions from the R folder into RStudio or install the R-package Csppa.
Data required for cellular spatial point pattern analysis will be deposited online soon:
| Data type | Link to the data | Code to get the data |
|---|---|---|
| Aldh1l1 only | link | link |
| Gfap only | link | link |
| Double positive | link | link |
Please see the following notebook for detailed examples of what you can do with CsppaRshiny:
CsppaRshiny is distributed under the MIT license. Details about the license of CsppaRshiny are provided in the LICENSE file. Please read the license before using CsppaRshiny.
Publications related to CsppaRshiny 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 CsppaRshiny.

