bandhic.call_tad#

bandhic.call_tad(hic_matrix, resolution, chrom_short, window_size_bp=200000, min_TAD_size=None, stat_filter=True, verbose=False)[source]#

Detect TADs from a Hi-C matrix using the TopDom algorithm. Different from the TopDom function, this function accepts a Hi-C matrix in either band_hic_matrix format or as a dense numpy array. This function is designed to be used with the BandHiC package and provides a convenient interface for TAD detection.

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.

  • resolution (int) – The resolution of the Hi-C matrix.

  • chrom_short (str) – The chromosome name without ‘chr’ prefix.

  • window_size_bp (int, optional) – The size of the window to consider for detecting TADs, in base pairs. Default is 200000.

  • min_TAD_size (int, optional) – The minimum size of a TAD to be considered valid, in base pairs. Default is None.

  • 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) – DataFrame containing bin information columns ‘id’, ‘chr’, ‘from.coord’, ‘to.coord’, ‘local.ext’, ‘mean.cf’, ‘pvalue’.