Installation
NicheMap is a Python package for spatial tissue architecture and neighborhood analysis in spatial transcriptomics.
We recommend installing NicheMap in a clean conda environment.
1. Create an environment
conda create -n nichemap python=3.10
conda activate nichemap
2. Install NicheMap
Install from PyPI:
pip install nichemap
Or install the development version from GitHub:
git clone https://github.com/yihe-csu/NicheMap.git
cd NicheMap
pip install -e .
3. Install notebook dependencies
From this tutorials repository:
pip install -r requirements.txt
4. Add a Jupyter kernel
pip install ipykernel
python -m ipykernel install --user --name=nichemap --display-name "Python (NicheMap)"
When opening the tutorial notebooks, select:
Python (NicheMap)
5. Prepare tutorial data
The notebooks expect the tutorial dataset at:
data/SSc_1_1_2_tutorial.h5ad
Create a local data/ directory in the tutorials repository and place SSc_1_1_2_tutorial.h5ad there before running the notebooks.
6. Open tutorials
jupyter lab docs/source/
Notes
The notebooks may produce small numerical or visualization differences across software environments. For reproducible analysis, use a fixed Python environment and keep package versions consistent.