mantispy.io.read#
- mantispy.io.read(path, backed=None, migrate_schema=True)#
Read a mantispy h5ad or zarr store, checking its schema version.
- Parameters:
path (
str|Path) – File to read. A.zarrsuffix selects the zarr reader.backed (
Literal['r','r+'] |None(default:None)) –"r"leavesXon disk and reads it a group at a time.obsandvarare always in memory, so QC, feature flags and metadata work unchanged, but a function that rewritesXneedscopy=Trueorkey_added=. h5ad only; zarr stores are read whole.migrate_schema (
bool(default:True)) – Bring an older but known schema up to the current one on read. Set it toFalseto see the version the file carries.
- Return type:
- Returns:
The object, backed or in memory.
adata.to_memory()loads a backed one into memory.- Raises:
ValueError –
backedwas given for a zarr store, or the file carries a schema version this build cannot migrate from or was told not to migrate.