This skill covers detecting A/B compartments from Hi-C data using eigenvector decomposition with cooltools.
pip install cooler cooltools bioframe matplotlibTell your AI agent what you want to do:
- "Call compartments from my Hi-C data"
- "Compute A/B compartments"
"Detect compartments from this cooler file"
"Compute the first eigenvector for compartment analysis"
"Plot a saddle plot for compartment strength"
"Show the compartment track for chr1"
"Compare compartments between treatment and control"
- Load cooler at appropriate resolution (50-100kb)
- Compute expected values
- Compute eigenvector decomposition
- Assign A/B compartments based on E1 sign
- Optionally compute saddle plot
- Resolution - Use 50-100kb for compartment analysis
- GC phasing - Use GC content to correctly orient A/B
- E1 sign - Positive typically = A (active), negative = B
- Saddle plot - Shows compartmentalization strength