phlower.pl.plot_density_grid

phlower.pl.plot_density_grid(adata: AnnData, graph_name=None, layout_name=None, cluster_name='trajs_clusters', trajs_name='knn_trajs', retain_clusters=[], sample_n=10000, figsize=(20, 16), title_prefix='cluster_', bg_alpha=0.5, node_size=2, return_fig=False, **args)

plot density grid of clusters

Parameters

adata: AnnData

an Annodata object

graph_name: str

key of the graph in adata.uns, default is None

layout_name: str

key of the layout in adata.obsm, default is None

cluster_name: str

key of the cluster in adata.obs, default is ‘trajs_clusters’

trajs_name: str

key of the trajs in adata.uns, default is ‘knn_trajs’

retain_clusters: list

list of clusters to plot, default is [] to use all

sample_n: int

number of cells to sample, default is 10000

figsize: tuple

figure size, default is (20,16)

title_prefix: str

prefix of the title, default is ‘cluster_

bg_alpha: float

background alpha, default is 0.5

node_size: float

node size, default is 2

return_fig: bool

whether to return the figure, default is False