remove_nonshared

besca.tl.auto_annot.remove_nonshared(adata_train, adata_pred, celltype='dblabel')[source]

removes all celltypes not in all datasets

NOTE: requires annotated testing dataset

Parameters:
  • adata_train (AnnData) – training dataset anndata object

  • adata_pred (AnnData) – testing dataset anndata object

  • celltype (str) – names of columns to compare.

Returns:

  • AnnData – An anndata object containing training dataset with non-shared celltypes removed

  • AnnData – An anndata object containing testing dataset with non-shared celltpyes removed