Cell Distance Analysis for Spatial Omics Datasets

Cell Distance Analysis for Spatial Omics Datasets, primarily focused on vascular cells.

The notebooks are designed to process and analyze the distances between cells in spatial omics datasets, with a particular focus on endothelial cells. They calculate the distances between all pairs of cells and visualize the distribution of these distances. The notebooks also include functionality to filter the data based on specific cell types and to visualize the results using histograms, violin plots, and other visualizations.

Preprint

Preprint of the paper describing the work is available on bioRxiv (https://www.biorxiv.org/content/10.1101/2025.09.23.678129v1).

Data Availability

All datasets (cell coordinates and cell types) used in the paper, original and processed (including harmonized cell type labels), are made publicly available (https://drive.google.com/drive/folders/1VYhnCay3j4Oe1BMidTvKOxSGz9nrcJyc?usp=sharing).

For more information and original imaging datasets for individual studies used in this paper, see relevant citations in the Methods section in the paper.

Pancreas dataset (GeoMX) is available on Figshare (https://figshare.com/projects/HuBMAP_TMC_-_Pacific_Northwest_National_Laboratory_GeoMX_DSP_Images/256367).

Code Availability

All code for data processing and analysis for distance analysis is available on GitHub (https://github.com/cns-iu/hra-cell-distance-analysis).

Rendered Jupyter notebooks for the entire workflow are also available on GitHub Pages (https://cns-iu.github.io/hra-cell-distance-analysis).

The file containing all cell types, original and 3-level typology, mapped to Cell Ontology, is available as a CSV file on GitHub (https://github.com/cns-iu/hra-cell-distance-analysis/blob/main/data/mapping_files/generated_cell_type_complete_crosswalk.csv).

Code for hierarchical neighborhood analysis is available on GitHub (https://github.com/HickeyLab/Vasculature_neighborhoods).

The Cell Distance Explorer application is available on the Human Reference Atlas website (https://apps.humanatlas.io/cde).

More information, including usage tutorial, about the CDE can be found at (https://humanatlas.io/user-story/5).

The python package for CDE can be found as part of HRA Jupyter Widgets (https://github.com/x-atlas-consortia/hra-jupyter-widgets/).

Documentation to embed the CDE in webpages as a lightweight component is available at (https://github.com/hubmapconsortium/hra-ui/blob/main/apps/cde-visualization-wc/EMBEDDING.md).

For Developers

The repository uses quarto for documentation and nbdev for notebook processing.

To update the README file from the nbs/index.ipynb notebook, run the following command in the root directory of the repository:

nbdev_readme

Then, to save the notebooks and render them using the nbdev library, you can run the following command in the root directory of the repository:

rm -rf _proc && nbdev_proc_nbs && cd _proc && quarto publish gh-pages --no-prompt

Then, push to GitHub:

git add .
git commit -m 'Updated repo' # Update this text with your own message
git push

The rendered and deployed notebooks will be available via GitHub Pages at the following URL:

https://cns-iu.github.io/hra-cell-distance-analysis