anndict.plot.module_score_umap#
- anndict.plot.module_score_umap(adata, score_cols, adt_key=None, **kwargs)[source]#
Generates UMAP plots for specified module scores in a single figure.
- Parameters:
- adata
AnnData
Annotated data matrix containing UMAP coordinates and module scores.
- score_cols
list
[str
] List of column names in adata containing module scores to plot.
- adt_key
tuple
[str
,...
] |None
(default:None
) Used by
adata_dict_fapply()
andadata_dict_fapply_return()
when passing this function.- **kwargs
Additional keyword arguments passed to sc.pl.umap, including
'vmax'
for color scaling (default is'p99'
).
- adata
- Return type:
Figure
- Returns:
Figure
containing the UMAP plots.
Examples
import anndict as adt # Calculate Scores adt.cell_type_marker_gene_score(adata, cell_type_col='cell_type', species='Human', list_length="longer") # Calculate a umap sc.pp.neighbors(adata) sc.tl.umap(adata) # Plot the results plots = adt.module_score_umap(adata, score_cols=score_cols + ['cell_type'])