Claude-skill-registry hic-tad-calling
This skill should be used when users need to identify topologically associating domains (TADs) from Hi-C data in .mcools (or .cool) files or when users want to visualize the TAD in target genome loci. It provides workflows for TAD calling and visualization.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/18-toolbased-hic-tad-calling" ~/.claude/skills/majiayu000-claude-skill-registry-hic-tad-calling && rm -rf "$T"
skills/data/18-toolbased-hic-tad-calling/SKILL.mdTADs Calling with HiCExplorer and Cooltools
Overview
This skill enables comprehensive identification and analysis of topologically associating domains (TADs) from Hi-C data stored in .mcool (or .cool) files. It integrates HiCExplorer for robust TAD calling and visualization capabilities.
Main steps include:
- Refer to the Inputs & Outputs section to verify required files and output structure.
- Data Preparation: Ensure .mcool files are formatted correctly and resolutions are verified.
- Always prompt user for resolution used to call TADs.
- TAD Calling: Use HiCExplorer to call TADs with customizable parameters.
- Always prompt user for target genomic loci for visualization.
- Visualization: Generate contact maps with TAD boundaries overlayed, for specific regions of the genome.
When to use this skill
Use this skill when:
- You need to identify TADs in Hi-C data stored in .mcool (or .cool) files.
- You want to visualize TADs in a specific region of the genome.
- You need to perform automated TAD calling with HiCExplorer, including statistical corrections.
Inputs & Outputs
Inputs
- File format: .mcool, .cool, or .hic (Hi-C data file).
- Resolution: Provided by user. ~10-50 kb is recommended. Default is 50 kb. 25 kb is the best but memory-consuming.
- Target region: Genome region provided by user to visualize TADs (e.g.,
)."chr22:1000000-2000000"
Outputs
${sample}_TAD_calling/ TADs/ ${sample}_TAD_boundaries.bed # Called TADs in BED format ${sample}_TAD_boundaries.gff ${sample}_TAD_domains.bed ... # other files output by the hicFindTADs plots/ ${sample}_TADs_${genome_loci}.pdf # TADs visualization (contact map) temp/ ${sample}_track.ini # Configuration file for visualization
Allowed Tools
When using this skill, you should restrict yourself to the following MCP tools from server
cooler-tools, cooltools-tools, project-init-tools, genome-locate-tools:
mcp__project-init-tools__project_initmcp__genome-locate-tools__genome_locate_fastamcp__HiCExplorer-tools__hic_to_mcoolmcp__HiCExplorer-tools__check_mcool_filemcp__HiCExplorer-tools__run_hicFindTADsmcp__HiCExplorer-tools__generate_track_inimcp__HiCExplorer-tools__plot_tads_region
Do NOT fall back to:
- raw shell commands (
,hicFindTADs
, etc.)hicPlotTADs - ad-hoc Python snippets (e.g. importing
,cooler
,bioframe
manually in the reply).matplotlib
Decision Tree
Step 0 — Gather Required Information from the User
Before calling any tool, ask the user:
- Sample name (
): used as prefix and for the output directorysample
.${sample}_TAD_calling - Genome assembly (
): e.g.genome
,hg38
,mm10
.danRer11- Never guess or auto-detect.
- Hi-C matrix path/URI (
): e.g.mcool_uri
file path or.mcool
file path..hic
(.mcool file with resolution specified)path/to/sample.mcool::/resolutions/50000- or
file path.cool - or
file path.hic
- Resolution (
): defaultresolution
(50 kb).50000- If user does not specify, use
as default.50000 - Must be the same as the resolution used for
${mcool_uri}
- If user does not specify, use
Step 1: Initialize Project
- Make director for this project:
Call:
mcp__project-init-tools__project_init
with:
: the user-provided sample namesample
: TAD_callingtask
The tool will:
- Create
directory.${sample}_TAD_calling - Get the full path of the
directory, which will be used as${sample}_TAD_calling
.${proj_dir}
- If the user provides a
file, convert it to.hic
file first using.mcool
tool:mcp__HiCExplorer-tools__hic_to_mcool
Call:
mcp__HiCExplorer-tools__hic_to_mcool
with:
: the user-provided path (e.g.input_hic
)input.hic
: the user-provided sample namesample
: directory to save the view file. In this skill, it is the full path of theproj_dir
directory returned by${sample}_TAD_calling
.mcp__project-init-tools__project_init
: the user-provided resolutions (e.g.resolutions
)[50000]
The tool will:
- Convert the
file to.hic
file..mcool - Return the path of the
file..mcool
If the conversion is successful, update
${mcool_uri} to the path of the .mcool file.
- Inspect the
file to list available resolutions and confirm the analysis resolution with the user..mcool
Call:
mcp__cooler-tools__list_mcool_resolutions
with:
: the user-provided path (e.g.mcool_path
) or the path of theinput.mcool
file returned by.mcoolmcp__HiCExplorer-tools__hic_to_mcool
The tool will:
- List all resolutions in the .mcool file.
- Return the resolutions as a list.
If the
${resolution} is not found, ask the user to specify the resolution again.
Else, use ${resolution}.
Step 2: HiCExplorer TAD Calling
Use
mcp__HiCExplorer-tools__run_hicFindTADs for comprehensive TAD identification. Customize parameters to suit the resolution and depth of your Hi-C data:
Before calling the tool, ask the user for the following parameters:
: Minimum window size (e.g. 3x resolution, default 150000, must be at least 3 times larger than the resolution)${min_depth}
: Maximum window size (e.g. 6-10x resolution, default 300000, must be at least 5 times larger than the resolution)${max_depth}
: Step size for sliding window (default 50000, 25000 is the best but memory-consuming)${step}
: Multiple testing correction method (e.g. 'fdr')${multiple_testing}
: FDR threshold for significant TADs (default 0.05)${threshold_comparisons}
: Delta parameter for TAD boundary detection (default 0.01)${delta}
: Chromosomes to call TADs (default${chromosomes}
). It is suggested to call TADs on a certain chromosome because it is memory-consuming to call TADs on all chromosomes and this process would likely be killed by the system.chr22
Call:
with:mcp__HiCExplorer-tools__run_hicFindTADs
:sample${sample}
: directory to save the view file. In this skill, it is the full path of theproj_dir
directory returned by${sample}_TAD_calling
.mcp__project-init-tools__project_init
: cooler URI with resolution specified, e.g.mcool_uriinput.mcool::/resolutions/${resolution}
:resolution
must be the same as the resolution used for${resolution}
and must be an integer${mcool_uri}
:min_depth
, must be at least 3 times larger than the resolution.${min_depth}
:max_depth
, must be at least 5 times larger than the resolution.${max_depth}
:step${step}
:multiple_testing${multiple_testing}
:threshold_comparisons${threshold_comparisons}
:delta${delta}
: chromosomes to call TADs, e.g.chromosomes
, space-separated list.chr22
The tool will:
- Call
to identify TADs.mcp__HiCExplorer-tools__run_hicFindTADs - Return the path of the TADs file under
directory.${proj_dir}/TADs/
Step 3: Visualization
- generate the
file first for visualization<track.ini>
Call:
mcp__HiCExplorer-tools__generate_track_ini
with:
:sample${sample}
: directory to save the view file. In this skill, it is the full path of theproj_dir
directory returned by${sample}_TAD_calling
.mcp__project-init-tools__project_init
: cooler URI with resolution specified, e.g.mcool_uriinput.mcool::/resolutions/${resolution}
:resolution
must be the same as the resolution used for${resolution}
and must be an integer${mcool_uri}
: depth for the Hi-C matrix view, e.g. 1500000depth
: minimum value for the Hi-C matrix view, e.g. 0.0min_value
: maximum value for the Hi-C matrix view, e.g. 80.0max_value
The tool will:
- Generate the
file under<track.ini>
directory.${proj_dir}/temp/ - Return the path of the
file.<track.ini>
- Contact Maps with TAD Overlays
Before calling the tool, ask the user for the target region, like
."chr22:1000000-2000000"
Call:
mcp__HiCExplorer-tools__plot_tads_region
with:
:sample${sample}
: directory to save the view file. In this skill, it is the full path of theproj_dir
directory returned by${sample}_TAD_calling
.mcp__project-init-tools__project_init
: user-provided target region, likeregion"chr22:1000000-2000000"
: dpi for the contact map, default is 300dpi
The tool will:
- Generate the contact map with TAD boundaries overlayed.
- Return the path of the contact map file under
directory.${proj_dir}/plots/
Best Practices
- It is suggested to call TADs on a certain chromosome because it is memory-consuming to call TADs on all chromosomes and this process would likely be killed by the system.