tfmindi.pl.dbd_topic_heatmap#
- tfmindi.pl.dbd_topic_heatmap(adata, cluster_column='leiden', dbd_column='cluster_dbd', vmax=0.01, cmap='RdPu', show_labels=True, **kwargs)#
Plot heatmap of average topic probabilities grouped by DNA-binding domain (DBD).
This shows how different DBD families are associated with specific topics.
- Parameters:
adata (
AnnData) – AnnData object containing cluster and DBD annotations in .obs and stored topic modeling resultscluster_column (
str(default:'leiden')) – Column name in adata.obs containing cluster assignmentsdbd_column (
str(default:'cluster_dbd')) – Column name in adata.obs containing DBD annotations per clustervmax (
float(default:0.01)) – Maximum value for colormapcmap (
str(default:'RdPu')) – Colormap nameshow_labels (
bool(default:True)) – Whether to show axis labels**kwargs – Additional arguments passed to render_plot()
- Return type:
- Returns:
matplotlib Figure or None if show=False
Examples
>>> import tfmindi as tmi >>> # After clustering and topic modeling >>> tm.tl.run_topic_modeling(adata, n_topics=40) >>> fig = tmi.pl.dbd_topic_heatmap(adata)