spapros.pl.clf_genes_umaps
- spapros.pl.clf_genes_umaps(adata, df, basis='X_umap', ct_key='celltype', n_cols=4, size_factor=1, fontsize=18, show=True, save=None)
Plot umaps of genes needed for cell type classification of each cell type.
- Parameters:
adata (AnnData) –
AnnData
withct_key
inadata.obs
andbasis
inadata.obsm
.df (DataFrame) –
Dataframe with genes as index and the following columns:
’decision_celltypes’: List of celltypes for which the gene is needed for classification.
’rank’: Forest classification rank of the gene.
’importance_score’: Importance score of the gene.
- Optional columns: TODO: do we need to list them here?
- ’marker_celltypes’: List of celltypes for which the gene is a marker according to the known marker
list. TODO: check if also DE “markers” alowed?
’decision_title’: Subplot title.
’marker_title’: Subplot title used if gene is marker. TODO: why decision_title AND marker_title?
’decision_cmap’: Matplotlib colormap.
’marker_cmap’: Matplotlib colormap used if gene is marker. TODO: why decision_cmap and marker_cmap (and why cmap at all…)
basis (str) – Name of the
obsm
embedding to use.ct_key (str) – Column name in
adata.obs
where celltypes are stored.n_cols (int) – Number of subplot columns.
fontsize (int) – Matplotlib fontsize.
size_factor (float) – Scale factor for figure width and height.
show (bool) – Whether to display the plot.
save (Optional[str]) – Save the plot to path.
- Returns:
Figure can be shown (default True) and stored to path (default None). Change this with
show
andsave
.- Return type:
None