SpatialQuery.spatial_query_multi.find_fp_dist_fov

spatial_query_multi.find_fp_dist_fov(ct, dataset_i, max_dist=20, min_size=0, min_support=0.5)[source]

Find frequent patterns within the radius-based neighborhood of specific cell type of interest in single field of view.

Parameters:
  • ct (str) – Cell type name.

  • dataset_i (str) – Dataset name in dataset_i format.

  • max_dist (float, default=20) – Maximum distance for considering a cell as a neighbor.

  • min_size (int, default=0) – Minimum neighborhood size for each point to consider.

  • min_support (float, default=0.5) – Threshold of frequency to consider a pattern as a frequent pattern.

Returns:

DataFrame with frequent pattern results. Columns include:
  • support: frequency of the pattern

  • itemsets: frozenset of cell types in the frequent pattern

Return type:

pd.DataFrame