stereo.io.read_h5ad¶
- stereo.io.read_h5ad(file_path=None, anndata=None, flavor='scanpy', bin_type=None, bin_size=None, **kwargs)[source]¶
Read a h5ad file or load a AnnData object
- Parameters:
file_path (
Optional[str]) – the path of the h5ad file.anndata (
Optional[AnnData]) – the object of AnnData which to be loaded, only available whileflavoris'scanpy'.file_pathandanndataonly can input one of them.flavor (
str) – the format of the h5ad file, defaults to'scanpy'.scanpy: AnnData format of scanpystereopy: h5ad format of stereobin_type (
Optional[str]) – the bin type includes'bins'or'cell_bins'.bin_size (
Optional[int]) – the size of bin to merge, whenbin_typeis set to'bins'.
- Return type:
Union[StereoExpData,AnnBasedStereoExpData]- Returns:
An object of StereoExpData while
flavoris'stereopy'or an object of AnnBasedStereoExpData whileflavoris'scanpy'