anndata.read_loom

anndata.read_loom(filename, sparse=True, cleanup=False, X_name='spliced', obs_names='CellID', var_names='Gene', dtype='float32')

Read .loom-formatted hdf5 file.

This reads the whole file into memory.

Beware that you have to explicitly state when you want to read the file as sparse data.

Parameters:
filename : PathLike

The filename.

sparse : bool

Whether to read the data matrix as sparse.

cleanup : bool

Whether to remove all obs/var keys that do not store more than one unique value.

X_name : str

Loompy key where the data matrix is stored.

obs_names : str

Loompy key where the observation/cell names are stored.

var_names : str

Loompy key where the variable/gene names are stored.

Return type:

AnnData