API
API functions
- load_bin(gem_file, bin_size, library_id, image_file=None)
Read BGI data and image file, and return an AnnData object.
- Parameters:
gem_file – The path of the BGI data file
bin_size – The size of the bin
library_id – The library id
image_file – The path of the image file (optional)
- Returns:
AnnData object with the following keys:
anndata.AnnData.obsm['spatial']- spatial spot coordinatesanndata.AnnData.uns['spatial']['{library_id}']['images']- hires imagesanndata.AnnData.uns['spatial']['{library_id}']['scalefactors']- scale factors for the spots