bandhic.topdom#

bandhic.topdom(hic_matrix, bins, window_size, stat_filter=True, verbose=False)[source]#

Detect TADs using TopDom algorithm.

Parameters:
  • hic_matrix (band_hic_matrix or np.ndarray) – The Hi-C matrix, either as a band_hic_matrix object or a dense numpy array.

  • bins (pd.DataFrame) – DataFrame containing bin information with columns ‘chr’, ‘from.coord’, ‘to.coord’.

  • window_size (int) – Size of the window to consider for detecting TADs.

  • stat_filter (bool, optional) – Whether to apply statistical filtering to remove false positives. Default is True.

  • verbose (bool, optional) – Whether to print detailed information during processing. Default is False.

Returns:

  • domains (pd.DataFrame) – DataFrame containing detected TADs with columns ‘chr’, ‘from.id’, ‘from.coord’, ‘to.id’, ‘to.coord’, ‘tag’.

  • bins (pd.DataFrame) – Updated DataFrame containing bin information with additional columns ‘local.ext’, ‘mean.cf’, ‘pvalue’.