anndict.utils.create_anndata#
- anndict.utils.create_anndata(sparse_array, genes, coords_top_left)[source]#
Creates an
AnnData
object from the sparse matrix and coordinates.- Parameters:
- sparse_array
csr_matrix
The sparse matrix with gene counts.
- genes
array
The unique genes.
- coords_top_left
list
[list
[int
]] The list of top-left coordinates of each box.
- sparse_array
- Return type:
AnnData
- Returns:
An
AnnData
object containing the gene counts and metadata.