top_expressed_genes

besca.pp.top_expressed_genes(adata, top_n=10)[source]

Give out the genes most frequently expressed in cells.

Calculates the genes most frequently expressed in cells and returns a table containing the top_n entries.

Parameters:
  • adata (AnnData) – The annotated data matrix.

  • top_n (int | default = 10) – Integer defining the number of entries to return. If None then the entire table is returned.

Returns:

pandas DataFrame containing the top_n genes

Return type:

DataFrame

Example

>>> import besca as bc
>>> adata = bc.datasets.simulated_pbmc3k_raw()
>>> genes = bc.pp.top_expressed_genes(adata)