stlearn.add.positions¶
- stlearn.add.positions(adata: AnnData, position_filepath: Optional[Union[str, Path]] = None, scale_filepath: Optional[Union[str, Path]] = None, quality: str = 'low', copy: bool = False) Optional[AnnData] [source]¶
Adding spatial information into the Anndata object
- Parameters:
adata – Annotated data matrix.
position_filepath – Path to tissue_positions_list file.
scale_filepath – Path to scalefactors_json file.
quality – Choosing low or high resolution image.
copy – Return a copy instead of writing to adata.
- Returns:
Depending on copy, returns or updates adata with the following fields.
**imagecol and imagerow** (adata.obs field) – Spatial information of the tissue image.