insitupy.dataclasses.BoundariesData

insitupy.dataclasses.BoundariesData#

class insitupy.dataclasses.BoundariesData(cell_names, seg_mask_value)#

Object to read and load boundaries of cells and nuclei.

__init__(cell_names, seg_mask_value)#

Initialize the BoundariesData object.

Parameters:
  • cell_names (Union[np.ndarray, List]) – Cell names which need to correspond to .obs_names in the .matrix of CellData.

  • seg_mask_value (Optional[Union[np.ndarray, List]]) – Segmentation mask values. Required to have the same length as cell_names. Specifies which values in the “cells” segmentation mask correspond to which cell name.

For more details on how these values are saved in case of Xenium In Situ, see: https://www.10xgenomics.com/support/software/xenium-onboard-analysis/latest/tutorials/outputs/xoa-output-zarr

Methods

__init__(cell_names, seg_mask_value)

Initialize the BoundariesData object.

add_boundaries(cell_boundaries, pixel_size)

convert_to_shapely_objects()

copy()

Function to generate a deep copy of the current object.

crop(cell_ids, xlim, ylim[, inplace])

Crop the BoundariesData object.

save([bound_file, save_as_pyramid, ...])

Attributes

cell_names

is_empty

metadata

seg_mask_value