glue_genes.glue_single_cell.anndata_factory.read_anndata#
- glue_genes.glue_single_cell.anndata_factory.read_anndata(file_name, skip_dialog=False, skip_components=[], subsample=False, subsample_factor=1, try_backed=False)#
Use AnnData to read a single-cell type data file into three linked glue Data objects.
AnnData objects are mapped into three glue Data objects that are linked by JoinLink
Currently supports .h5ad and .loom files, but reading in backed mode is only supported for .h5ad because of underlying limitations with AnnData.
- Parameters:
- file_name: str
The file to read
- skip_dialog: bool, optional
Whether to skip the GUI module (useful for scripts and testing)
- skip_components: list, optional
The names of columns in obs/var/obsm/varm to NOT load
- subsample: bool, optional
Whether to subsample on obs to reduce file size
- subsample_factor: int, optional
If specified, and subsample, reduce the size of obs by this factor
- try_backed: bool, optional
Attempt to use disk-based access to the data. If AnnData fails to load the file this way it will be loaded into memory.