locate#
- adata_query._core._locator.locate(adata: AnnData, key: str) str[source]#
Given
adataand a key that points to a specific matrix stored inadata, return the data, formatted either asnp.ndarrayortorch.Tensor. If formatted astorch.Tensor, device may be specified based on available devices.- Parameters:
adata (
anndata.AnnData) – The [annotated] single-cell data matrix of shape:[n_obs × n_vars]. Rows correspond to cells and columns to genes. [1].key (
str) – Key to access a matrix in adata. For example, if you wanted to accessadata.obsm['X_pca'], you would pass:"X_pca".
- Returns:
Attribute of adata containing the passed key.
- Return type:
str