stereo.utils.cluster_bins_to_cellbins

stereo.utils.cluster_bins_to_cellbins(bins_data, cellbins_data, bins_cluster_res_key)[source]

Mapping cluster result of bins to corresponding cellbins.

The cluster of a cell will be mapped to the cluster of a bin if this cell’s coordinate is within this bin.

Parameters:
  • bins_data (StereoExpData) – StereoExpData object of bins.

  • cellbins_data (StereoExpData) – StereoExpData object of cellbins.

  • bins_cluster_res_key (str) – cluster result key in bins_data.tl.result, the mapped result will be named as {bins_cluster_res_key}_from_bin and added into cellbins_data.tl.result.

Returns:

The object of StereoExpData assigned to parameter cellbins_data.