stereo.io.stereo_to_anndata¶
- stereo.io.stereo_to_anndata(data, flavor='scanpy', sample_id='sample', reindex=False, output=None, base_adata=None, split_batches=True, compression='gzip')[source]¶
Transform the StereoExpData object into Anndata format.
- Parameters:
data (
StereoExpData) – the input StereoExpData object.flavor (
Literal['scanpy','seurat']) – if you want to convert the output file into h5ad of Seurat, please set'seurat'.sample_id (
str) – the sample name which will be set asorig.identin obs.reindex (
bool) – ifTrue, the cell index will be reindexed as{sample_id}:{position_x}_{position_y}format.output (
Optional[str]) – the path to output h5ad file.base_adata (
Optional[AnnData]) – the input Anndata object.split_batches (
bool) – Whether to save each batch to a single file if it is a merged data, default to True.compression (
Optional[Literal['gzip','lzf']]) – The compression method to be used when saving data as a h5ad file, None means uncompressed, default to gzip.
- Return type:
An object of Anndata.