spacipy.Gem.binning

Gem.binning(bin_size=None, batch=None, inplace=False, outfile=None, add_cols=False)

Group gem into square bins with fixed width and height.

Parameters:
  • bin_size (int) – size of width and height of each bin

  • batch (str) – column name for Batch information if contain

  • add_cols (bool) – add bin coords values in new columns other than change the original x, y coords

  • outfile (str) – save grouped gem into file

  • inplace (bool) – Whether the binning should modify the data in place or return a modified copy.