Generic API#
- class hictkpy.MultiResFile#
Class representing a file handle to a .hic or .mcool file
- __init__#
Open a multi-resolution Cooler file (.mcool).
- chromosomes#
Get chromosomes sizes as a dictionary mapping names to sizes.
- path#
Get the file path.
- resolutions#
Get the list of available resolutions.
- class hictkpy.File#
Class representing a file handle to a .cool or .hic file.
- __init__#
Construct a file object to a .hic, .cool or .mcool file given the file path and resolution. Resolution is ignored when opening single-resolution Cooler files.
- attributes#
Get file attributes as a dictionary.
- avail_normalizations#
Get the list of available normalizations.
- bins#
Get bins as a pandas DataFrame.
- chromosomes#
Get chromosomes sizes as a dictionary mapping names to sizes.
- fetch#
Fetch interactions overlapping a region of interest.
- has_normalization#
Check whether a given normalization is available.
- is_cooler#
Test whether file is in .cool format.
- is_hic#
Test whether file is in .hic format.
- nbins#
Get the total number of bins.
- nchroms#
Get the total number of chromosomes.
- path#
Return the file path.
- resolution#
Get the bin size in bp.
- uri#
Return the file URI.
- weights#
Fetch the balancing weights for the given normalization method.
- class hictkpy.PixelSelector#
Class representing pixels overlapping with the given genomic intervals.
- coord1#
Get query coordinates for the first dimension.
- coord2#
Get query coordinates for the second dimension.
- nnz#
Get the number of non-zero entries for the current pixel selection.
- sum#
Get the total number of interactions for the current pixel selection.
- to_coo#
Retrieve interactions as a scipy.sparse.coo_matrix.
- to_df#
Retrieve interactions as a pandas DataFrame.
- to_numpy#
Retrieve interactions as a numpy 2D matrix.