popv.hub.HubMetadata#
- class popv.hub.HubMetadata(popv_version, anndata_version, scikit_learn_version, setup_dict, prediction_keys, method_kwargs, methods, cellxgene_url=None, organism=None)[source]#
Encapsulates the required metadata for popV hub models.
- Parameters:
popv_version (
str) – The version of popV that the model was trained with.anndata_version (
str) – The version of anndata used during model training.scikit_learn_version (
str) – The version of scikit-learn used during model training.setup_dict (
dict) – The setup dictionary used to preprocess the data.prediction_keys (
list[str]) – The keys used to store the predictions in the AnnData object.methods – The methods used to predict celltypes
method_kwargs (
dict) – The keyword arguments used in the methods.cellxgene_url (
str|None(default:None)) – Link to the data in the CELLxGENE portal (viewer).organism (
str|None(default:None)) – The organism of the data.
Attributes table#
Methods table#
|
Create a HubMetadata object from an AnnData file. |
|
Save the metadata to a JSON file. |
Attributes#
Methods#
- classmethod HubMetadata.from_anndata(adata, anndata_version, scikit_learn_version, popv_version, organism, **kwargs)[source]#
Create a HubMetadata object from an AnnData file.
- Parameters:
adata (
AnnData) – The AnnData object used to train the model.anndata_version (
str) – The version of anndata used during model training.scikit_learn_version (
str) – The version of scikit-learn used during model training.popv_version (
str) – The version of popV that the model was trained with.organism (
str) – The organism of the data.kwargs – Additional keyword arguments to pass to the HubMetadata initializer.