mosaicmpi.dataset.Dataset.from_h5ad#
- classmethod Dataset.from_h5ad(h5ad_file: str, force_migrate=False, backed=False)#
Creates a
Datasetobject from an AnnData-compatible .h5ad file.- Parameters:
h5ad_file (str) – Path to .h5ad file produced by scanpy, AnnData, or mosaicMPI
force_migrate (bool, optional) – forces conversion of AnnData objects even when adata.X and adata.raw.X are not linearly scaled relative to each other, defaults to False
backed (bool, optional) – Use backed mode to open h5ad file. This can save memory when the dataset is very large, but is not compatible with h5ad files produced outside of mosaicMPI, defaults to False
- Returns:
Object with expression and metadata
- Return type: