Skip to content

Commit abb9292

Browse files
authored
Merge pull request #2 from quadbio/docs/update
Update docstrings and README
2 parents 4481e5c + 0020cd7 commit abb9292

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[badge-tests]: https://github.com/quadbio/cellmapper/actions/workflows/test.yaml/badge.svg
77
[badge-docs]: https://img.shields.io/readthedocs/cellmapper
88

9-
k-NN-based mapping of cells across representations to tranfer labels, embeddings and expression values. Works for millions of cells, on CPU and GPU, across molecular modalities, between spatial and non-spatial data, for arbitrary query and reference datasets.
9+
k-NN-based mapping of cells across representations to tranfer labels, embeddings and expression values. Works for millions of cells, on CPU and GPU, across molecular modalities, between spatial and non-spatial data, for arbitrary query and reference datasets. Using `faiss` to compute k-NN graphs, CellMapper takes about 30 seconds to transfer cell type labels from 1.5M cells to 1.5M cells on a single RTX 4090 with 60 GB CPU memory.
1010

1111
## Getting started
1212

@@ -40,15 +40,13 @@ See the [changelog][].
4040

4141
## Contact
4242

43-
For questions and help requests, you can reach out in the [scverse discourse][].
4443
If you found a bug, please use the [issue tracker][].
4544

4645
## Citation
4746

4847
Please cite this GitHub repo if you find CellMapper useful for your research.
4948

5049
[uv]: https://github.com/astral-sh/uv
51-
[scverse discourse]: https://discourse.scverse.org/
5250
[issue tracker]: https://github.com/quadbio/cellmapper/issues
5351
[tests]: https://github.com/quadbio/cellmapper/actions/workflows/test.yaml
5452
[documentation]: https://cellmapper.readthedocs.io

src/cellmapper/cellmapper.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,14 @@ def compute_mappping_matrix(
235235
236236
Parameters
237237
----------
238-
n_neighbors
239-
Number of nearest neighbors.
240-
use_rep
241-
Data representation based on which to find nearest neighbors.
242-
use_rapids
243-
Whether to use cuML and cuPy for GPU-accelerated nearest neighbor search.
244-
batch_size
245-
Batch size for processing rows during Jaccard computation.
238+
method
239+
Method to use for computing the mapping matrix. Options include:
240+
- "jaccard": Jaccard similarity. Inspired by GLUE: Cao et al., Nature Biotechnology, 2022: https://www.nature.com/articles/s41587-022-01284-4
241+
- "gaussian": Gaussian kernel with adaptive bandwith. Loosely inspired by MAGIC: Van Dijk et al., Cell, 2018: https://www.sciencedirect.com/science/article/pii/S0092867418307244?via%3Dihub
242+
- "scarches": scArches kernel. Inspired by scArches: Lotfollahi et al., Nature Biotechnology, 2021: https://www.nature.com/articles/s41587-021-01001-7
243+
- "inverse_distance": Inverse distance kernel.
244+
- "random": Random kernel, useful for testing.
245+
- "hnoca": HNOCA kernel. Inspired by HNOCA-tools: He et al., Nature 2024: https://www.nature.com/articles/s41586-024-08172-8
246246
247247
Returns
248248
-------

0 commit comments

Comments
 (0)