chanzuckerberg / cellxgene-census

CZ CELLxGENE Discover Census
https://chanzuckerberg.github.io/cellxgene-census/
MIT License
72 stars 19 forks source link

Census cell similarity search: experimental Python API for searching given AnnData #1114

Open mlin opened 2 months ago

mlin commented 2 months ago

Having built the vector indexes on Census embeddings (#694 chanzuckerberg/cellxgene-census#1113), develop the Python API inside cellxgene_census.experimental to input an AnnData and identify the most-similar Census cells.

This necessitates running a forward pass of the embedding model (starting with scVI) on the given AnnData. In case that causes a lot of complications, we can create an initial demo that searches existing Census cells against the index and break out the forward passes into a separate issue. It might even end up involving a docker image or web service of some sort.

mlin commented 2 months ago

Per 4/29 discussion:

For now (i) the API assumes the given AnnData will include a layer with suitable embeddings and (ii) we'll informally provide a notebook/docker showing how to do the forward pass to add them. To be revisited in H2.

mlin commented 1 month ago

Draft PR: https://github.com/chanzuckerberg/cellxgene-census/pull/1164

(finalization pending #1116)