You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
13
+
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.
14
14
15
-
## Getting started
16
-
17
-
Please refer to the [documentation][],
18
-
in particular, the [API documentation][].
15
+
Inspired by scanpy's [ingest][] and the [HNOCA-tools][] packages.
19
16
20
17
## Installation
21
18
22
19
You need to have Python 3.10 or newer installed on your system.
23
20
If you don't have Python installed, we recommend installing [uv][].
24
21
25
-
There are several alternative options to install cellmapper:
22
+
There are two alternative options to install ``cellmapper``:
26
23
27
-
<!--
28
-
1) Install the latest release of `cellmapper` from [PyPI][]:
This package assumes that you have ``ref`` and ``query`` AnnData objects, with a joint embedding computed and stored in ``.obsm``. We explicilty do not compute this joint embedding, but there are plenty of method you can use to get such joint embeddings, e.g. [GimVI][] or [ENVI][] for spatial mapping, [GLUE][], [MIDAS][] and [MOFA+][] for modality translation, and [scVI][], [scANVI][] and [scArches][] for query-to-reference mapping - this is just a small selection!
39
+
40
+
With a joint embedding in ``.obsm["X_joint"]`` at hand, the simplest way to use ``CellMapper`` is as follows:
This will transfer data from the reference to the query dataset, including celltype labels stored in ``ref.obs``, a UMAP embedding stored in ``ref.obsm``, and expression values stored in ``ref.X``.
50
+
51
+
There are many ways to customize this, e.g. use different ways to compute k-NN graphs and to turn them into mapping matrices, and we implement a few methods to evaluate whether your k-NN transfer was sucessful.
52
+
41
53
## Release notes
42
54
43
55
See the [changelog][].
@@ -59,3 +71,16 @@ Please cite this GitHub repo if you find CellMapper useful for your research.
0 commit comments