Skip to content
Merged

Doc #40

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package

on:
push:
branches: [ "main" ]
branches: [ "main", "doc" ] # Added "doc" so you can see if it works before merging!
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -20,22 +17,27 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
uses: actions/setup-python@v5 # Updated to v5 (current best practice)
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install git+https://github.com/jsnagai/Nichesphere#subdirectory=nichesphere
if [ -f nichesphere/requirements.txt ]; then pip install -r nichesphere/requirements.txt; fi
# IMPORTANT: This installs YOUR local code from the current branch
pip install -e .
# Check if requirements exist in the new root or docs folder
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

- name: Test with pytest
run: |
pytest
# This tells pytest to look in your new root tests/ folder
pytest tests/
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build:

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: nichesphere/nichesphere/source/conf.py
configuration: docs/conf.py
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
# builder: "dirhtml"
# Fail on all warnings to avoid broken references
Expand All @@ -32,4 +32,4 @@ sphinx:
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: nichesphere/nichesphere/docs/requirements.txt
- requirements: docs/requirements.txt
12 changes: 12 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Ruiz"
given-names: "Mayra"
- family-names: "Nagai"
given-names: "James"
title: "NicheSphere"
version: 1.0.0
doi: 10.5281/zenodo.XXXXX # Update this AFTER you get your DOI from Zenodo
date-released: 2026-02-24 # Use today's date
url: "https://github.com/CostaLab/NicheSphere"
File renamed without changes.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<img align="right" src="nichesphere/nichesphere/source/_static/logo.png" alt="Nichesphere Logo" width="200">
<img align="right" src="docs/_static/logo.png" alt="Nichesphere Logo" width="200">

# NicheSphere

NicheSphere is an sc-verse compatible Python library which allows the user to find differential co-localization domains / niches based on cell type pair co-localization probabilities in different conditions. Cell type pair co-localization probabilities can be obtained in different ways, for example, through deconvolution of spatial transcriptomics / PIC-seq data (getting the probabilities of finding each cell type in each spot / multiplet) ; or counting cell boundaries overlaps for each cell type pair in single cell spatial data (MERFISH , CODEX …).
[![DOI](https://zenodo.org)](https://doi.org)

It also offers the possibility to look at biological process based differential communication among differential co-localization domains based on Ligand-Receptor pairs expression data, such as results from CrossTalkeR [ref.].
NicheSphere is an sc-verse compatible Python library which allows the user to find differential co-localization domains / niches based on cell type pair co-localization probabilities in different conditions. Cell type pair co-localization probabilities can be obtained in different ways, for example, through deconvolution of spatial transcriptomics / PIC-seq data (getting the probabilities of finding each cell type in each spot / multiplet) ; or counting nearest neighbors of each type for each cell in single cell spatial data like MERFISH or CODEX.

You can find our documentation and an application example on the Myocardial Infarction atlas data from Kuppe et. al. 2022 here: https://nichesphere.readthedocs.io/en/latest/
It also offers the possibility to look at biological process based differential communication between cell type pairs or differential co-localization domains based on Ligand-Receptor pairs expression data, which can be obtained from diverse cell cell communication tools, such as [CrossTalkeR](https://costalab.github.io/CrossTalkeR/).

You can find our documentation and an application example on the Myocardial Infarction atlas data from Kuppe et. al. 2022 here: https://nichesphere.readthedocs.io/en/latest/ , The data you'll need to run the tutorials is stored in [Zenodo](https://doi.org/10.5281/zenodo.15790389)


File renamed without changes.
File renamed without changes.
Binary file added docs/_static/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
9 changes: 9 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
API Reference
=============

.. toctree::
:maxdepth: 2

coloc
comm
tl
3 changes: 2 additions & 1 deletion nichesphere/nichesphere/source/coloc.rst → docs/coloc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ coloc module

Focused on differential co-localization

.. automodule:: coloc
.. automodule:: nichesphere.coloc
:members:
:undoc-members:
:show-inheritance:
3 changes: 2 additions & 1 deletion nichesphere/nichesphere/source/comm.rst → docs/comm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ comm module

Focused on differential communication

.. automodule:: comm
.. automodule:: nichesphere.comm
:members:
:undoc-members:
:show-inheritance:
13 changes: 7 additions & 6 deletions nichesphere/nichesphere/source/conf.py → docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@

# Add path to module
#sys.path.insert(0, os.path.abspath('/home/mayra/source/Nichesphere/nichesphere/nichesphere'))
sys.path.insert(0, os.path.abspath('../'))
sys.path.insert(0, os.path.abspath('../../'))
#sys.path.insert(0, os.path.abspath('../'))
#sys.path.insert(0, os.path.abspath('../../'))
sys.path.insert(0, os.path.abspath('../src'))

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'Nichesphere'
copyright = '2025, Mayra Ruiz'
author = 'Mayra Ruiz'
release = '0.1.0'
project = 'NicheSphere'
copyright = '2025, Mayra Ruiz, James Nagai'
author = 'Mayra Ruiz, James Nagai'
release = '1.0.0'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading