SpatialQuery.spatial_query.plot_motif_celltype
- spatial_query.plot_motif_celltype(ct, motif, max_dist=20, figsize=(5, 5), save_path=None)[source]
Display the distribution of interested motifs in the radius-based neighborhood of certain cell type. This function could be used to visualize significant motifs by motif_enrichment_dist() or motif_enrichment_knn(), or customized motifs by users.
- Parameters:
ct (str) – Cell type as the center cells.
motif (str or List[str]) – Motif (names of cell types) to be colored.
max_dist (float, default=20) – Spacing distance for building grid. Make sure using the same value as that in find_patterns_grid.
figsize (tuple, default=(5, 5)) – Figure size.
save_path (str, optional) – Path to save the figure. If None, the figure will not be saved.
- Returns:
Displays a figure.
- Return type:
None