TAD clustering

pytadbit.tad_clustering.tad_cmo.optimal_cmo(hic1, hic2, num_v=None, max_num_v=None, verbose=False, method='frobenius', long_nw=True, long_dist=True)[source]

Calculates the optimal contact map overlap between 2 matrices

TODO: make the selection of number of eigen vectors automatic or relying on

the summed contribution (e.g. select the EVs that sum 80% of the info)

Note

penalty is defined as the minimum value of the pre-scoring matrix.

Parameters
  • hic1 – first matrix to align

  • hic2 – second matrix to align

  • num_v (None) – number of eigen vectors to consider, max is: max(min(len(hic1), len(hic2)))

  • max_num_v (None) – maximum number of eigen vectors to consider.

  • method (score) – distance function to use as alignment score. if ‘score’ distance will be the result of the last value of the Needleman-Wunsch algorithm. If ‘frobenius’ a modification of the Frobenius distance will be used

Returns

two lists, one per aligned matrix, plus a dict summarizing the goodness of the alignment with the distance between matrices, their Spearman correlation Rho value and pvalue.