bio-hi-c-analysis-tad-detection
Call topologically associating domains (TADs) from Hi-C data using insulation score, HiCExplorer, and other methods. Identify domain boundaries and hierarchical domain structure
Install / Use
npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-hi-c-analysis-tad-detectionInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
MarketingSupported Platforms
Our assessment of bio-hi-c-analysis-tad-detection
bio-hi-c-analysis-tad-detection scores 93/100 on our quality scale, 123rd of 592 Marketing skills we index (top 21%).
Its SKILL.md is 7.0 KB long, well organised into 34 sections with 11 code examples: a thorough specification that gives an agent plenty to work with.
With 3,034 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 3 months ago, so bio-hi-c-analysis-tad-detection is actively maintained.
- Our last check on 2026-10-04 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-28. Automated pattern scan on 2026-09-28. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
bio-hi-c-analysis-tad-detection compared with similar skills
All 4 of these similar skills score higher than bio-hi-c-analysis-tad-detection; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| bio-hi-c-analysis-tad-detection (this skill)by FreedomIntelligence | 93 | 3.0k | 3mo ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 97.1k | 5d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 75.3k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 87.3k | today | MCP Server |
| crawl4aiby unclecode | 100 | 85.5k | today | MCP Server |
Frequently asked questions
- How do I install bio-hi-c-analysis-tad-detection?
- Run
npx skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-hi-c-analysis-tad-detection. The install tabs above show the steps for each supported agent. - Which AI agents does bio-hi-c-analysis-tad-detection work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is bio-hi-c-analysis-tad-detection safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is bio-hi-c-analysis-tad-detection still maintained?
- The repository was last updated about 3 months ago, so bio-hi-c-analysis-tad-detection is actively maintained.
Skill content
View source on GitHubname: bio-hi-c-analysis-tad-detection description: Call topologically associating domains (TADs) from Hi-C data using insulation score, HiCExplorer, and other methods. Identify domain boundaries and hierarchical domain structure. Use when calling TADs from Hi-C insulation scores. tool_type: mixed primary_tool: cooltools
Version Compatibility
Reference examples tested with: cooler 0.9+, cooltools 0.6+, matplotlib 3.8+, numpy 1.26+, pandas 2.2+
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package>thenhelp(module.function)to check signatures - CLI:
<tool> --versionthen<tool> --helpto confirm flags
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
TAD Detection
"Call TADs from my Hi-C data" → Identify topologically associating domain boundaries using insulation score minima or other boundary-detection algorithms.
- Python:
cooltools.insulation(clr, window_bp)then threshold boundary strength - CLI:
hicFindTADs(HiCExplorer)
Call topologically associating domains from Hi-C contact matrices.
Required Imports
import cooler
import cooltools
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import bioframe
Compute Insulation Score
clr = cooler.Cooler('matrix.mcool::resolutions/10000')
view_df = bioframe.make_viewframe(clr.chromsizes)
# Compute insulation score
insulation = cooltools.insulation(
clr,
window_bp=[100000, 200000, 500000], # Multiple window sizes
ignore_diags=2,
)
print(insulation.head())
# Columns include: chrom, start, end, log2_insulation_score_100000, etc.
Call TAD Boundaries
# Find boundaries (local minima in insulation score)
boundaries = cooltools.find_insulation(
clr,
window_bp=200000, # Single window
ignore_diags=2,
min_dist_bad_bin=0,
)
# Filter significant boundaries
boundaries['is_boundary'] = boundaries['boundary_strength'] > 0.1
strong_boundaries = boundaries[boundaries['is_boundary']]
print(f'Found {len(strong_boundaries)} TAD boundaries')
Extract TAD Regions
Goal: Convert a set of TAD boundary positions into TAD interval coordinates (start-end pairs) for downstream overlap analysis.
Approach: Sort boundaries by position per chromosome, then define each TAD as the interval between consecutive boundary positions.
def boundaries_to_tads(boundaries_df, chrom):
'''Convert boundary positions to TAD intervals'''
chr_bounds = boundaries_df[
(boundaries_df['chrom'] == chrom) &
(boundaries_df['is_boundary'])
].sort_values('start')
tads = []
starts = [0] + list(chr_bounds['start'])
ends = list(chr_bounds['start']) + [boundaries_df[boundaries_df['chrom'] == chrom]['end'].max()]
for start, end in zip(starts, ends):
if end > start:
tads.append({'chrom': chrom, 'start': start, 'end': end})
return pd.DataFrame(tads)
tads_chr1 = boundaries_to_tads(boundaries, 'chr1')
print(f'chr1 TADs: {len(tads_chr1)}')
print(tads_chr1.head())
Using HiCExplorer (CLI)
# Compute TADs with HiCExplorer
hicFindTADs \
-m matrix.cool \
--outPrefix tads \
--correctForMultipleTesting fdr \
--minDepth 60000 \
--maxDepth 200000 \
--step 10000 \
--thresholdComparisons 0.05
# Output files:
# tads_domains.bed - TAD intervals
# tads_boundaries.bed - Boundary positions
# tads_score.bedgraph - Insulation score track
Using HiCExplorer in Python
# After running hicFindTADs
tads = pd.read_csv('tads_domains.bed', sep='\t', header=None,
names=['chrom', 'start', 'end'])
boundaries = pd.read_csv('tads_boundaries.bed', sep='\t', header=None,
names=['chrom', 'start', 'end', 'score'])
print(f'TADs: {len(tads)}')
print(f'Boundaries: {len(boundaries)}')
TAD Statistics
# Calculate TAD sizes
tads['size'] = tads['end'] - tads['start']
print('TAD size statistics:')
print(f' Mean: {tads["size"].mean() / 1000:.0f} kb')
print(f' Median: {tads["size"].median() / 1000:.0f} kb')
print(f' Min: {tads["size"].min() / 1000:.0f} kb')
print(f' Max: {tads["size"].max() / 1000:.0f} kb')
# Size distribution
plt.hist(tads['size'] / 1000, bins=50)
plt.xlabel('TAD size (kb)')
plt.ylabel('Count')
plt.title('TAD size distribution')
plt.savefig('tad_sizes.png', dpi=150)
Plot Insulation Score
fig, ax = plt.subplots(figsize=(15, 3))
chr_data = insulation[insulation['chrom'] == 'chr1']
ax.plot(chr_data['start'] / 1e6, chr_data['log2_insulation_score_200000'])
# Mark boundaries
bounds = chr_data[chr_data['is_boundary']]
ax.scatter(bounds['start'] / 1e6, bounds['log2_insulation_score_200000'],
color='red', s=20, zorder=5)
ax.set_xlabel('Position (Mb)')
ax.set_ylabel('Insulation score (log2)')
ax.set_title('chr1 insulation score (red = boundaries)')
plt.tight_layout()
plt.savefig('insulation_track.png', dpi=150)
Compare TAD Boundaries Between Conditions
# Load boundaries from two conditions
bounds1 = pd.read_csv('condition1_boundaries.bed', sep='\t',
names=['chrom', 'start', 'end'])
bounds2 = pd.read_csv('condition2_boundaries.bed', sep='\t',
names=['chrom', 'start', 'end'])
# Find overlapping boundaries (within tolerance)
tolerance = 50000 # 50kb
def find_overlaps(df1, df2, tol):
overlaps = []
for _, b1 in df1.iterrows():
matches = df2[
(df2['chrom'] == b1['chrom']) &
(abs(df2['start'] - b1['start']) <= tol)
]
if len(matches) > 0:
overlaps.append(b1)
return pd.DataFrame(overlaps)
shared = find_overlaps(bounds1, bounds2, tolerance)
print(f'Shared boundaries: {len(shared)}')
print(f'Condition 1 specific: {len(bounds1) - len(shared)}')
print(f'Condition 2 specific: {len(bounds2) - len(shared)}')
Hierarchical TADs
# Compute insulation at multiple scales
windows = [100000, 200000, 500000, 1000000]
insulation_multi = cooltools.insulation(clr, window_bp=windows, ignore_diags=2)
# Boundaries at each scale represent different hierarchy levels
for w in windows:
col = f'is_boundary_{w}'
n_bounds = insulation_multi[col].sum()
print(f'Window {w/1000:.0f}kb: {n_bounds} boundaries')
Export TADs
# Save as BED
tads[['chrom', 'start', 'end']].to_csv(
'tads.bed', sep='\t', index=False, header=False
)
# Save boundaries as BED
boundaries[boundaries['is_boundary']][['chrom', 'start', 'end', 'boundary_strength']].to_csv(
'boundaries.bed', sep='\t', index=False, header=False
)
# Save insulation as bedGraph
insulation[['chrom', 'start', 'end', 'log2_insulation_score_200000']].to_csv(
'insulation.bedgraph', sep='\t', index=False, header=False
)
Related Skills
- hic-data-io - Load Hi-C matrices
- hic-visualization - Visualize TADs on contact matrices
- compartment-analysis - Compartments operate at larger scale than TADs
Related Skills
Agent-Reach
97.1kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
75.3kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Scrapling
87.3k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
crawl4ai
85.5kOpen-source web crawler and scraper for LLMs and AI agents: any website into clean, LLM-ready Markdown. Run it yourself, or use Crawl4AI Cloud with one key.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
