netmap.downstream.clustering.unify_group_labelling¶
- netmap.downstream.clustering.unify_group_labelling(adata, grn_adata, col_adata, col_grn_adata) float¶
Adjust group labelling such that grn_adata has the same group label than the corresponding column in adata based on the grn column.
Tee prrocessed GRN Anndata object wwill contian ith an additional column in the .obs slot containing a ‘_remap’ column which contains a relabelled column matching the clustering in adata
Returns a score of the matching as the cost of the matching divided by the number of cells. The score ranges between 1/n_clusters and 1, with 1 indicating an identical clustering and 1/n_clu a random matching.
- Parameters:
adata (AnnData) – original Anndata object containing a clustering column in the obs object specified as col_adata
grn_adata (AnnData) – original Anndata object containing a clustering column in the obs object specified as col_grn_adata
col_adata_clu (str) – Name of the reference column in expression object
col_grn_adata (str) – Name of the novel clustering column in GRN object
- Returns:
score – The score of the linear sum assignment divided by the number of cells.
- Return type:
int