Skip to main content

cell-neighbors

Neighbor graphs for single-cell data (AnnData)

This repository provides a Python package for building k-nearest neighbor (kNN) graphs from AnnData objects.

The package is built on the Voyager library from Spotify.

Features

  • Efficient kNN Graph Construction from Voyager.
  • Direct AnnData integration
  • Flexible querying of neighbors in the constructed kNN graph index.

Installation

Install the latest release from PyPI:

pip install cell-neighbors

or, if you use uv:

uv pip install cell-neighbors
# or, to add it to your pyproject.toml
uv add cell-neighbors

Example

import cell_neighbors

# Initialize kNN graph builder
knn_graph = cell_neighbors.kNN(adata), use_key="X_pca")

# Query neighbors
X_query = [...]  # Your query points as numpy array
neighbors = knn_graph.query(X_query)

Documentation

For real examples, detailed usage instructions, and API reference, please refer to the documentation [coming soon].

Download files

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

Source Distribution

cell_neighbors-0.2.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

cell_neighbors-0.2.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file cell_neighbors-0.2.0.tar.gz.

File metadata

  • Download URL: cell_neighbors-0.2.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cell_neighbors-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8501ed41f4d7e1e423624f1bcfdcea87110ac24e705ea0613c7d186cf4bd77c6
MD5 5fe593b800f4ca03b9a12489c0dfad82
BLAKE2b-256 a3ff68258a4cbfe0c85f2ef330c026a2ca54262d3b47662c259e8b627baa2e7b

See more details on using hashes here.

File details

Details for the file cell_neighbors-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cell_neighbors-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for cell_neighbors-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ced55f071dd97ee53c6367052f03fcb627b88319272414de8f7bd759ea1bc3ed
MD5 47e589b74948416909d9715f0fde6d21
BLAKE2b-256 47aad45817d3ef7c6e2781d685217836e2aa2db07b8b4b75c54e0a16d67e735c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

0.0.2

2 files

0.0.0

2 files

Supported by

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