ehrapy.io.read_h5ad¶
- ehrapy.io.read_h5ad(dataset_path, backup_url=None, download_dataset_name=None, archive_format=None)[source]¶
Reads or downloads a desired directory of h5ad files or a single h5ad file.
- Parameters:
- Return type:
- Returns:
An
AnnData
object or a dict with an identifier (the filename, without extension) for eachAnnData
object in the dict
Examples
>>> import ehrapy as ep >>> adata = ep.dt.mimic_2(encoded=True) >>> ep.io.write("mimic_2.h5ad", adata) >>> adata_2 = ep.io.read_h5ad("mimic_2.h5ad")