stlearn.add.apply_mask(adata: AnnData, masks: Optional[list] = 'all', select: str = 'black', cmap: str = 'default', copy: bool = False) Optional[AnnData][source]

Parsing the old spaital transcriptomics data

  • adata – Anndata object.

  • masks – List of masks for parsing if all, apply on all masks

  • select – color for ROI, choose from black and white.

  • cmap – Color map to use.

  • copy – Return a copy instead of writing to adata.


  • Depending on copy, returns or updates adata with the following fields.

  • **mask_image** (adata.uns field) – Array format of image, saving by Pillow package.