SpatialQuery.spatial_query.plot_motif_rand

spatial_query.plot_motif_rand(motif, max_dist=100, n_points=1000, figsize=(10, 5), seed=2023, save_path=None)[source]

Display the random sampled points with motif in radius-based neighborhood, and cell types of motif in the neighborhood of these random points.

Parameters:
  • motif (str or List[str]) – Motif (names of cell types) to be colored.

  • max_dist (float, default=100) – Radius for neighborhood search.

  • n_points (int, default=1000) – Number of random points to generate.

  • figsize (tuple, default=(10, 5)) – Figure size.

  • seed (int, default=2023) – Random seed for reproducibility.

  • save_path (str, optional) – Path to save the figure. If None, the figure will not be saved.

Returns:

Displays a figure.

Return type:

None