commot.tl.group_cluster_communication

commot.tl.group_cluster_communication(adata, clustering=None, keys=None, p_value_cutoff=0.05, quantile_cutoff=0.99, dissimilarity_method=None, leiden_k=5, leiden_resolution=1.0, leiden_random_seed=1, leiden_n_iterations=- 1, d_global_structure_weights=(0.45, 0.45, 0.1))

Idenfitify groups of cluster-cluster communication with similar pattern.

Parameters
  • adata (AnnData) – The data matrix with the cluster-cluster communication info stored in adata.uns.

  • clustering (Optional[str]) – Name of clustering with the labels stored in .obs[clustering].

  • keys – A list of keys for the analyzed communication connections as tuples (database_name, ligand, receptor).

  • quantile_cutoff (float) – The quantile cutoff for including an edge. Set to 1 to disable this criterion. The quantile_cutoff and p_value_cutoff works in the “or” logic to avoid missing significant signaling connections.

  • p_value_cutoff (float) – The cutoff of p-value to plot an edge.

  • dissimilarity_method (Optional[str]) – The dissimilarity measurement between graphs to use. ‘jaccard’ for Jaccard distance. ‘jaccard_weighted’ for weighted Jaccard distance. ‘global_structure’ for a metric focusing on global structure [Schieber2017].

  • leiden_k (int) – Number of neighbors for the knn-graph to be fed to leiden clustering algorithm.

  • leiden_resolution (float) – The resolution parameter for the leiden clustering algorithm.

  • leiden_random_seed (int) – The random seed for the leiden clustering algorithm.

  • leiden_n_iterations (int) – The maximum number of iterations for the leiden algorithm. The algorithm will run until convergence if set to -1.

  • d_global_structure_weights (tuple) – The weights for the three terms in the global structural dissimilarity. See [Schieber2017] for more information.

Returns

  • keys (list) – The list of keys for the analyzed communication connections as tuples (pathway_name, ligand, receptor).

  • communication_clusterid (np.ndarray) – The group id of the cluster-cluster communications.

  • D (np.ndarray) – The dissimilarity matrix for the cluster-cluster communications.

References

Schieber2017(1,2)

Schieber, T. A., Carpi, L., Díaz-Guilera, A., Pardalos, P. M., Masoller, C., & Ravetti, M. G. (2017). Quantification of network structural dissimilarities. Nature communications, 8(1), 1-10.