This skill performs chromatin loop detection from Hi-C .mcool files using cooltools.
This skill provides a minimal and efficient workflow for detecting chromatin loops from Hi-C data stored in .mcool format and preparing results for visualization in IGV. The key steps involved include:
Use this skill when:
${sample}_loop_calling/
loops/
${sample}_loops_${resolution}.bedpe # Detected chromatin loops in BEDPE format.
temp/
view_${genome}.tsv
expected_cis.${resolution}.tsv
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__cooler-tools__list_mcool_resolutionsmcp__cooler-tools__harmonize_chrom_namesmcp__cooler-tools__make_view_chromarmsmcp__cooltools-tools__run_expected_cismcp__cooltools-tools__run_dotsDo NOT fall back to:
cooltools expected-cis, cooltools dots, etc.)cooler, bioframe, matplotlib manually in the reply).Before calling any tool, ask the user:
Sample name (sample): used as prefix and for the output directory ${sample}_loop_calling.
Genome assembly (genome): e.g. hg38, mm10, danRer11.
Hi-C matrix path/URI (mcool_uri):
path/to/sample.mcool::/resolutions/5000 (.mcool file with resolution specified).cool file path.hic file pathResolution (resolution): default 5000 (5 kb).
5000 as default.${mcool_uri}Call:
mcp__project-init-tools__project_initwith:
sample: the user-provided sample nametask: loop_callingThe tool will:
${sample}_loop_calling directory.${sample}_loop_calling directory, which will be used as ${proj_dir}..hic file, convert it to .mcool file using mcp__HiCExplorer-tools__hic_to_mcool tool:Call:
mcp__HiCExplorer-tools__hic_to_mcoolwith:
input_hic: the user-provided path (e.g. input.hic)sample: the user-provided sample nameproj_dir: directory to save the view file. In this skill, it is the full path of the ${sample}_loop_calling directory returned by mcp__project-init-tools__project_init.The tool will:
.hic file to .mcool file..mcool file.If the conversion is successful, update ${mcool_uri} to the path of the .mcool file.
Call:
mcp__genome-locate-tools__genome_locate_fastawith:
genome: the user-provided genome assemblyThe tool will:
mcool_uri:Call:
mcp__cooler-tools__list_mcool_resolutionswith:
mcool_path: the user-provided path (e.g. input.mcool) without resolution specified.The tool will:
If the user defined or default ${resolution} is not found in the list, ask the user to specify the resolution again.
Else, use ${resolution} for the following steps.
Call:
mcp__cooler-tools__harmonize_chrom_nameswith:
sample: the user-provided sample nameproj_dir: directory to save the expected-cis and eigs-cis files. In this skill, it is the full path of the ${sample}_Compartments_calling directory returned by mcp__project-init-tools__project_initmcool_uri: cooler URI with resolution specified, e.g. input.mcool::/resolutions/${resolution}resolution: ${resolution} must be the same as the resolution used for ${mcool_uri} and must be an integerThe tool will:
${proj_dir}/ directoryUse bioframe to define chromosome arms based on centromeres:
Call:
mcp__cooler-tools__make_view_chromarmswith:
genome: genome assemblymcool_uri: cooler URI with resolution specified, e.g. input.mcool::/resolutions/${resolution}resolution: ${resolution} must be the same as the resolution used for ${mcool_uri} and must be an integerproj_dir: directory to save the view file. In this skill, it is the full path of the ${sample}_loop_calling directory returned by mcp__project-init-tools__project_init.The tool will:
bioframe.${proj_dir}/temp/ directory.Call:
mcp__cooltools-tools__run_expected_ciswith:
sample: the user-provided sample nameproj_dir: directory to save the view file. In this skill, it is the full path of the ${sample}_loop_calling directory returned by mcp__project-init-tools__project_init.mcool_uri: cooler URI with resolution specified, e.g. input.mcool::/resolutions/${resolution}resolution: ${resolution} must be the same as the resolution used for ${mcool_uri} and must be an integerview_path: the path to the view file (e.g. ${proj_dir}/temp/view_${genome}.tsv)clr_weight_name: the name of the weight column (default: weight)ignore_diags: the number of diagonals to ignore based on resolutionThe tool will:
${proj_dir}/temp/ directory.Call:
mcp__cooltools-tools__run_dotswith:
sample: the user-provided sample nameproj_dir: directory to save the view file. In this skill, it is the full path of the ${sample}_loop_calling directory returned by mcp__project-init-tools__project_init.mcool_uri: cooler URI with resolution specified, e.g. input.mcool::/resolutions/${resolution}resolution: ${resolution} must be the same as the resolution used for ${mcool_uri} and must be an integerview_path: the path to the view file (e.g. ${proj_dir}/temp/view_${genome}.tsv)nproc: the number of processes for cooltools (default 6)The tool will:
${proj_dir}/loops/ directory.