dotools_py.bm.graph_connectivity

dotools_py.bm.graph_connectivity#

dotools_py.bm.graph_connectivity(adata, annotation_key)[source]#

Graph Connectivity.

Quantify the connectivity of the subgraph per cell type. The final score is the average for all cell types.

Parameters:
adata AnnData

Integrated annotated data matrix with neighborhood graph computed.

annotation_key str

Column in adata.obs containing the group labels.

Return type:

floating

Returns:

Returns a float number between 0 and 1 that represents the connectivity of the subgraph. Larger values represent a better batch removal.

Examples

>>> import dotools_py as do
>>> adata = do.dt.example_10x_processed()
>>> do.bm.graph_connectivity(adata, "annotation")
Out[48]: np.float64(0.594)