netmap.masking.internal.find_consistent_pairs

netmap.masking.internal.find_consistent_pairs(grn_adata, gene_names)[source]

Compute Spearman correlation between forward and reverse edge attribution scores.

For every pair of genes (A, B), computes the Spearman correlation between the attribution columns A_B and B_A in grn_adata.X across all cells. Both directions receive the same correlation value.

Parameters:
  • grn_adata (anndata.AnnData) – GRN AnnData with attribution values in X.

  • gene_names (list of str) – Gene names to form pairs from.

Returns:

Mapping {edge_str: spearman_r} for all forward and reverse

pairs. Self-pairs are not included.

Return type:

dict