bandhic.cooler_chr_all_cells#

bandhic.cooler_chr_all_cells(file_path, chrom, diag_num, balance=True)[source]#

Read Hi-C data from a .scool file for a specific chromosome and return a dictionary of band_hic_matrix objects for all cells.

Parameters:
  • file_path (str) – Path to the .scool file.

  • chrom (str) – Chromosome name.

  • diag_num (int) – Number of diagonals to consider.

  • balance (bool, optional) – If True, use balanced data. Default is False. This parameter is specific to cooler files.

Returns:

A dictionary mapping cell IDs to band_hic_matrix objects for the specified chromosome.

Return type:

Dict[str, band_hic_matrix]

Raises:

ValueError – If the scool file is invalid or parameters are incorrect.

Examples

>>> import bandhic as bh
>>> mats = bh.cooler_chr_all_cells('/Users/wwb/Documents/workspace/BandHiC-Master/data/yeast.10kb.scool', 'chrI', diag_num=10, resolution=10000)
>>> isinstance(mats['cell1'], band_hic_matrix)
True