Input/Output Functions#

These functions handle input and output operations for BandHiC matrices, including saving and loading from various formats.

bandhic.save_npz(file_name, mat)

Save a band_hic_matrix to a .npz file.

bandhic.load_npz(file_name)

Load a band_hic_matrix from a .npz file.

bandhic.straw_chr(hic_file, chrom, ...[, ...])

Read Hi-C data from a .hic file and return a band_hic_matrix.

bandhic.straw_all_chrs(hic_file, resolution, ...)

Read Hi-C data from a .hic file for all chromosomes and return a dictionary of band_hic_matrix objects.

bandhic.cooler_chr(file_path, chrom, diag_num)

Read Hi-C data from a .cool or .mcool file and return a band_hic_matrix.

bandhic.cooler_all_chrs(file_path, diag_num)

Read Hi-C data from a .cool or .mcool file for all chromosomes and return a dictionary of band_hic_matrix objects.

bandhic.cooler_chr_all_cells(file_path, ...)

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

bandhic.cooler_all_cells_all_chrs(file_path, ...)

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