This module contains helper functions for pipeline_cellbender.py

cellhub.tasks.cellbender.anndata_from_h5(file: str, analyzed_barcodes_only: bool = True) AnnData

Load an output h5 file into an AnnData object for downstream work.

  • file – The h5 file

  • analyzed_barcodes_only – False to load all barcodes, so that the size of the AnnData object will match the size of the input raw count matrix. True to load a limited set of barcodes: only those analyzed by the algorithm. This allows relevant latent variables to be loaded properly into adata.obs and adata.obsm, rather than adata.uns.


The anndata object, populated with inferred latent variables

and metadata.

Return type:


cellhub.tasks.cellbender.dict_from_h5(file: str) Dict[str, ndarray]

Read in everything from an h5 file and put into a dictionary.