stlearn.create_stlearn¶
- stlearn.create_stlearn(count: DataFrame, spatial: DataFrame, library_id: str, image_path: Optional[Path] = None, scale: Optional[float] = None, quality: str = 'hires', spot_diameter_fullres: float = 50, background_color: ['black', 'white'] = 'white')[source]¶
Create AnnData object for stLearn
- Parameters:
count – Pandas Dataframe of count matrix with rows as barcodes and columns as gene names
spatial – Pandas Dataframe of spatial location of cells/spots.
library_id – Identifier for the visium library. Can be modified when concatenating multiple adata objects.
scale – Set scale factor.
quality – Set quality that convert to stlearn to use. Store in anndata.obs[‘imagecol’ & ‘imagerow’]
spot_diameter_fullres – Diameter of spot in full resolution
background_color – Color of the backgound. Only black or white is allowed.
- Return type:
AnnData