bandhic.cooler_all_cells_all_chrs#

bandhic.cooler_all_cells_all_chrs(file_path, diag_num, resolution=None)[source]#

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

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

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

  • resolution (int, optional) – Resolution of the Hi-C data.

Returns:

A dictionary mapping cell IDs to dictionaries mapping chromosome names to band_hic_matrix objects.

Return type:

Dict[str, 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_all_cells('/Users/wwb/Documents/workspace/BandHiC-Master/data/yeast.10kb.scool', diag_num=10, resolution=10000)
>>> isinstance(mats['cell1']['chrI'], band_hic_matrix)
True