hest.readers.pool_bins_visiumhd_per_cell

hest.readers.pool_bins_visiumhd_per_cell(nuc_seg: str | gpd.GeoDataFrame, bc_matrix: str | sc.AnnData, path_bins_pos: str, pixel_size: float, save_dir: str = None, exp_um=5, exp_nuclei: bool = True) Tuple[sc.AnnData, gpd.GeoDataFrame]

Pool Visium-hd bins per cell.

Parameters:
  • nuc_seg (Union[str, gpd.GeoDataFrame]) – nuclei segmentation

  • bc_matrix (Union[str, sc.AnnData]) – bc_matrix representing Visium-hd bins.

  • path_bins_pos (str) – path to tissue_positions.parquet

  • pixel_size (float) – pixel size of path_bins_pos in um/px

  • save_dir (str, optional) – whenever to save to aligned_cells.h5ad. Defaults to None.

  • exp_um (int, optional) – nuclei expansion in um if exp_nuclei is True. Defaults to 5.

  • exp_nuclei (bool, optional) – whenever to expand nuclei to derive cells. Defaults to True.

Returns:

binned adata and (expended) nuclei

Return type:

Tuple[sc.AnnData, gpd.GeoDataFrame]