embedding_density
Analyze cell density within embeddings to identify spatial patterns in single-cell RNA sequencing data. Supports UMAP or custom embeddings, group-based density calculation, and integration into existing analysis workflows.
Instructions
Calculate the density of cells in an embedding
Input Schema
Name | Required | Description | Default |
---|---|---|---|
basis | No | The embedding over which the density will be calculated. This embedded representation should be found in `adata.obsm['X_[basis]']`. | umap |
components | No | The embedding dimensions over which the density should be calculated. This is limited to two components. | |
groupby | No | Key for categorical observation/cell annotation for which densities are calculated per category. | |
key_added | No | Name of the `.obs` covariate that will be added with the density estimates. |