popv.algorithms.ONCLASS#

class popv.algorithms.ONCLASS(batch_key='_batch_annotation', labels_key='_labels_annotation', layer_key=None, max_iter=30, cell_ontology_obs_key=None, result_key='popv_onclass_prediction', seen_result_key='popv_onclass_seen')[source]#

Class to compute OnClass cell-type prediction.

Parameters:
  • batch_key (str | None (default: '_batch_annotation')) – Key in obs field of adata for batch information. Default is “_batch_annotation”.

  • labels_key (str | None (default: '_labels_annotation')) – Key in obs field of adata for cell-type information. Default is “_labels_annotation”.

  • layer_key (str | None (default: None)) – Layer in adata used for Onclass prediction. Default is adata.X.

  • max_iter (int | None (default: 30)) – Maximum iteration in Onclass training. Default is 30.

  • cell_ontology_obs_key (str | None (default: None)) – Key in obs in which ontology celltypes are stored.

  • result_key (str | None (default: 'popv_onclass_prediction')) – Key in obs in which celltype annotation results are stored. Default is “popv_onclass_prediction”.

Methods table#

compute_integration(adata)

Compute integration of adata inplace.

compute_umap(adata)

Compute UMAP embedding of adata inplace.

predict(adata)

Predict celltypes using OnClass.

Methods#

abstractmethod ONCLASS.compute_integration(adata)[source]#

Compute integration of adata inplace.

abstractmethod ONCLASS.compute_umap(adata)[source]#

Compute UMAP embedding of adata inplace.

ONCLASS.predict(adata)[source]#

Predict celltypes using OnClass.

Parameters:

adata – Anndata object. Results are stored in adata.obs[self.result_key].