gedi2py.io.load_model

gedi2py.io.load_model(adata, filename, *, key='gedi')[source]

Load GEDI model parameters from file.

Loads previously saved GEDI model parameters and stores them in adata.uns[key].

Parameters:
  • adata (AnnData) – Annotated data matrix to store model in.

  • filename (str | Path) – Path to saved model file.

  • key (str, default: 'gedi') – Key in adata.uns to store results.

Return type:

None

Examples

>>> import gedi2py as gd
>>> gd.io.load_model(adata, "gedi_model.npz")
>>> adata.uns["gedi"]["model"]["Z"]  # Loaded metagenes