Pure NumPy/SciPy Hi-C Chromatin 3D Genome Analysis Engine
No cooler, no cooltools, no Juicer, no HiCExplorer, no R HiTC.
| Module | Description |
|---|---|
| ICE Normalization | Iterative Correction and Eigenvector decomposition |
| TAD Detection | Insulation score + Directionality Index |
| A/B Compartments | PCA on O/E matrix, GC-content guided orientation |
| Loop Detection | HICCUPS-inspired: enrichment + Poisson p-value |
| Differential TAD | Gained/lost boundaries, permutation significance |
| Visualization | 6-panel Plotly interactive HTML |
pip install numpy scipy pandas plotly scikit-learn
python -m hic_analysis
# outputs: hic_output/hic_analysis.htmlfrom hic_analysis import run_hic_analysis
# Demo with synthetic data
summary = run_hic_analysis()
# Real .cool file
summary = run_hic_analysis(
cool_path="data.mcool",
chrom="chr17",
resolution=25000,
)| File | Description |
|---|---|
hic_analysis.html |
6-panel interactive visualization |
insulation_scores.csv |
Per-bin insulation score + DI |
tad_boundaries.csv |
TAD boundaries with strength |
ab_compartments.csv |
PC1 eigenvector + A/B labels |
loops.csv |
Detected loops with enrichment |
summary.json |
Machine-readable summary |
- Lieberman-Aiden et al. (2009) Science — A/B compartments
- Dixon et al. (2012) Nature — TADs + Directionality Index
- Rao et al. (2014) Cell — HICCUPS loops
- Crane et al. (2015) Nature — Insulation score
- Imakaev et al. (2012) Nature Methods — ICE normalization