c2v.tl.group_connectivity

c2v.tl.group_connectivity#

c2v.tl.group_connectivity(adata, groupby, graph_key='connectivities', directed=True, uns_key_added='group_connectivity')#

Computes connectivities (number of observed over the number of expected edges) of groups based on the graph.

Parameters:
adata sc.AnnData

Annotated data matrix at the cell level.

groupby str

Key in adata.obs to use for grouping cells.

graph_key str, optional

Key in adata.obsp to use for the graph, by default “connectivities”.

directed bool, optional

Whether to assume a directed graph, by default True.

uns_key_added str, optional

Key in adata.uns to store the group connectivity matrix, by default “group_connectivity”.

Returns:

None The adata object is modified in place with the group connectivity matrix stored in .uns[uns_key_added].