def call_tad_borders(ii_results, cutoff=0):
"""
Calls TAD borders using the first derivative of the insulation index.
:param ii_results: (raw) insulation index results, numpy vector
:param cutoff: raw insulation index threshold for "true" TAD boundaries
"""
tad_borders = []
g = np.gradient(ii_results)
for i in range(len(ii_results)):
border_type = _border_type(i, g)
if border_type == 1 and ii_results[i] <= cutoff:
tad_borders.append(i)
return tad_borders
评论列表
文章目录