This skill covers loading, converting, and manipulating Hi-C contact matrices using the cooler format, the standard format for Hi-C data.
pip install cooler bioframe numpy pandas
# For .hic conversion:
pip install hic2coolTell your AI agent what you want to do:
- "Load my Hi-C cooler file"
- "Convert .hic to cooler format"
"Load this cooler file"
"Open the 10kb resolution from my mcool"
"Get the contact matrix for chr1"
"Extract contacts between these two regions"
"Convert my .hic file to cooler"
"Create a multi-resolution mcool"
- Open the cooler file
- Provide basic statistics (bins, resolution, chromosomes)
- Extract requested matrix or region
- Return data as numpy array or DataFrame
- mcool vs cool - mcool files contain multiple resolutions
- Balance - Use
balance=Truefor normalized data - Sparse - Use sparse matrices for large chromosomes
- Resolution - Choose resolution based on analysis needs