Again on insulation scores
Hi all, I'm trying again to interpret insulation scores from hicFindTAD, which I understand is not the one described here or here. Looking at the code I found this should be the section in which score is actually calculated, isn't it?
https://github.com/deeptools/HiCExplorer/blob/b020f9b2a0590a0c0958692cce92710c1d802cd4/hicexplorer/hicFindTADs.py#L612-L614
I understand it is calculated as the difference between the average score upstream and downstream a boundary and the score at the boundary itself. The stronger the boundary, the more negative the score is (as @LeilyR pointed in #730). Is this correct? Looking at the matrix indexes above I cannot understand the rationale of the choice of intervals:
min_idx + 3
min_idx - |
window_len |
| |
| min_idx |
>----------+---<
>------<
| |
min_idx |
+ 4 |
|
min_idx + window_len
shouldn't it be
local_tad_score = np.concatenate([matrix_avg[min_idx - window_len:min_idx - 3],
matrix_avg[min_idx + 4: min_idx + window_len]])
or
local_tad_score = np.concatenate([matrix_avg[min_idx - window_len:min_idx],
matrix_avg[min_idx + 1: min_idx + window_len]])
It's this publication: https://www.nature.com/articles/s41467-017-02525-w
@joachimwolff thanks, my bad, I missed it, sorry. And yet, what is the rationale behind the +3,+4 shifting of the min_idx when concatenating the matrices?
Very good question. This is old legacy code from a developer not involved in HiCExplorer anymore.
@fidelram In case you read these messages, can you answer this?