anndata.read_loom

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

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 : PathLikePathLike

The filename.

sparse : boolbool

Whether to read the data matrix as sparse.

cleanup : boolbool

Whether to collapse all obs/var fields that only store one unique value into .uns['loom-.'].

X_name : strstr

Loompy key with which the data matrix .X is initialized.

obs_names : strstr

Loompy key where the observation/cell names are stored.

var_names : strstr

Loompy key where the variable/gene names are stored.

**kwargs

Arguments to loompy.connect

Return type:

AnnDataAnnData