bandhic.scc#

bandhic.scc(A, B, max_k=None, min_n=10, method='pearson')[source]#

Stratified correlation coefficient (SCC) for Hi-C using BandHiC.

Parameters:
  • A (band_hic_matrix) – Two BandHiC matrices (same shape, same diag_num)

  • B (band_hic_matrix) – Two BandHiC matrices (same shape, same diag_num)

  • max_k (int) – Max diagonal (distance bin) to consider

  • min_n (int) – Minimum number of valid pixels per stratum

  • method ({"pearson", "spearman"}) –

Returns:

  • scc (float)

  • per_diag (dict {k: rho_k})

Examples

>>> import bandhic as bh
>>> A = bh.straw_chr("./data/GSE130275_mESC_WT_combined_1.3B_microc.hic", "chr1", 100_000, diag_num=20)
>>> B = A.copy()
>>> scc, per_diag = scc(A, B)
>>> scc
1.0