stlearn.add.positions¶
- stlearn.add.positions(adata: AnnData, position_filepath: Path | str, scale_filepath: Path | str, quality: str = 'low', copy: bool = False) AnnData | None[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.