voyager-based kNN for single-cell data
Project description
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
AnnDataintegration - Flexible querying of neighbors in the constructed
kNNgraph 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].
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8501ed41f4d7e1e423624f1bcfdcea87110ac24e705ea0613c7d186cf4bd77c6
|
|
| MD5 |
5fe593b800f4ca03b9a12489c0dfad82
|
|
| BLAKE2b-256 |
a3ff68258a4cbfe0c85f2ef330c026a2ca54262d3b47662c259e8b627baa2e7b
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ced55f071dd97ee53c6367052f03fcb627b88319272414de8f7bd759ea1bc3ed
|
|
| MD5 |
47e589b74948416909d9715f0fde6d21
|
|
| BLAKE2b-256 |
47aad45817d3ef7c6e2781d685217836e2aa2db07b8b4b75c54e0a16d67e735c
|