sc_toolbox.tools.generate_expression_table#

sc_toolbox.tools.generate_expression_table(adata, cluster='all', subset_by='cell_type', xlabel=None, condition=None, use_raw=None)[source]#

Generates a table of cells by genes of expression values as a Pandas DataFrame.

Parameters:
  • adata – Anndata object

  • cluster (str) – Which label of the subsets to generate the table for. Use ‘all’ if for all subsets.

  • subset_by (str) – Which label to subset the clusters by

  • xlabel (Optional[str]) – Label that will be used for subsequent line plots as x-axis label. Typically a time series such as “days”.

  • condition (Optional[str]) – Column name of the condition to include.

  • use_raw (Optional[bool]) – Whether to use adata.raw.X for the calculations

Returns:

Gene expression table.