snapatac2.tl.add_cor_scores#
- snapatac2.tl.add_cor_scores(network, *, gene_mat=None, peak_mat=None, select=None, overwrite=False)[source]#
Compute correlation scores for any two connected nodes in the network.
This function can be used to compute correlation scores for any type of associations. There are typically three types of edges in the network:
Region -> gene: CREs regulate target genes.
Gene -> gene: genes regulate other genes.
Gene -> region: TFs bind to CREs.
- Parameters:
network (
PyDiGraph
) – networkgene_mat (
AnnData
|AnnDataSet
|None
) – AnnData or AnnDataSet object storing the cell by gene count matrix, where the.var_names
contains genes.peak_mat (
AnnData
|AnnDataSet
|None
) – AnnData or AnnDataSet object storing the cell by peak count matrix, where the.var_names
contains peaks.select (
list
[str
] |None
) – Run this for selected genes only.overwrite (
bool
) – Whether to overwrite existing records.