Skip to main content

CellNiche represents cellular microenvironments in atlas-scale spatial omics data with contrastive learning

Project description

CellNiche

Overview

CellNiche is a scalable, cell-centric framework for identifying and characterizing cellular micro-environments from atlas-scale, heterogeneous spatial omics data.
Instead of processing entire tissue slices, CellNiche samples local subgraphs around each cell and learns context-aware embeddings via contrastive learning, while explicitly decoupling molecular identity (gene expression or cell-type labels) from spatial proximity modeling.

Key Features

Installation

From Source

git clone https://github.com/Super-LzzZ/CellNiche.git
cd cellniche

From PyPI

pip install CellNiche

Requirements

  • Python ≥ 3.7
  • PyTorch ≥ 1.12
  • PyTorch Geometric (torch-geometric, torch-scatter, torch-sparse, torch-cluster, torch-spline-conv)
  • Scanpy ≥ 1.9
  • Anndata ≥ 0.9
  • scikit-learn ≥ 1.3
  • numpy ≥ 1.22
  • scipy ≥ 1.10
  • pandas ≥ 2.0
  • networkx ≥ 3.1
  • tqdm ≥ 4.67.1

You can install most dependencies with:

pip install torch torchvision torchaudio
pip install torch-geometric torch-scatter torch-sparse torch-cluster torch-spline-conv
pip install scanpy anndata scikit-learn numpy scipy pandas networkx tqdm

Tutorials

Coming soon

Getting Started

bash

python ./cellniche/main.py --config ./configs/xxx.yaml

python

import cellniche

# Parse arguments from a YAML config
opts = cellniche.parse_args([
    "--config", "configs/xxx.yaml"
])
# Run training/inference
cellniche.main(opts)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cellniche-0.1.2.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cellniche-0.1.2-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file cellniche-0.1.2.tar.gz.

File metadata

  • Download URL: cellniche-0.1.2.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.20

File hashes

Hashes for cellniche-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ab70a5b35f288417779dcd4beaa1f8c4f21d932922e997784e7c71d4ab8a3e74
MD5 c2c47a1e13ca4285c48c177d6550d51b
BLAKE2b-256 de9816cca2370bfc930e12d38bb4bde2b2713da1a97b882cd229f913aecf3c7d

See more details on using hashes here.

File details

Details for the file cellniche-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: cellniche-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.20

File hashes

Hashes for cellniche-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2e7f1fb3d9e96da597f71dc299db66b3210c9af6b0e716b471d2346ff9ba0ac2
MD5 64f89a80f3a27b44567322c0df95c276
BLAKE2b-256 24fbb9b28bfd2d91ffc46d65f54da86db8f91548fac8c0644b0e06322da04d29

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page