spatialdata_io.dbit

Contents

spatialdata_io.dbit#

spatialdata_io.dbit(path=None, anndata_path=None, barcode_position=None, image_path=None, dataset_id=None, border=True, border_scale=1)#

Read DBiT experiment data (Deterministic Barcoding in Tissue)

This function reads the following files:

  • '.h5ad' : Counts matrix.

  • 'barcode_list' : Barcode file.

  • 'tissue_lowres_image.png' : Histological image | Optional.

Parameters:
  • path (Optional[str | Path] (default: None)) – Path to the directory containing the data.

  • anndata_path (Optional[str] (default: None)) – path to the counts and metadata file.

  • barcode_position (Optional[str] (default: None)) – path to the barcode coordinates file.

  • dataset_id (Optional[str] (default: None)) – Dataset identifier to name the constructed SpatialData elements. If not given, filename is used as dataset_id

  • image_path (Optional[str] (default: None)) – path to the low resolution image. It expect the image to be correctly cropped and transformed.

  • border (bool (default: True)) – Value passed internally to _xy2edges() If True, the square is shrinked toward its center, leaving an empty border.

  • border_scale (float (default: 1)) – Value passed internally to _xy2edges() The factor by which the border is scaled. The default is 1. It corresponds to a border length of (0.125 * length of the square’s edge)

Return type:

SpatialData

Returns:

: spatialdata.SpatialData.