sainsc.GridCounts.filter_mask

sainsc.GridCounts.filter_mask(mask, crop=True)

Filter all genes with a binary mask.

Parameters:
  • mask (ndarray[bool]) – All counts where mask is False will be set to 0.

  • crop (bool) – Whether to crop the data to the bounding box of the selected region. This can improve performance by minimizing the sample size.