31_toolBased.nested-tad-detection/SKILL.md
This skill detects hierarchical (nested) TAD structures from Hi-C contact maps (in .cool or mcool format) using OnTAD, starting from multi-resolution .mcool files. It extracts a user-specified chromosome and resolution, converts the data to a dense matrix, runs OnTAD, and organizes TAD calls and logs for downstream 3D genome analysis.
npx skillsauth add bisnake2001/chromskills nested-TAD-detectionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill performs nested TAD (hierarchical TAD/subTAD) detection from Hi-C data using OnTAD, starting from a .mcool, .cool or .hic file.
Main steps include:
.mcool file to list available resolutions and alway remember to confirm the chromosome name and analysis resolution with the user..mcool file.Use this skill when you want to identify TADs and nested sub-TADs from high- or mid-resolution Hi-C data, especially when your contact maps are stored as Cooler multi-resolution files (.mcool) and you need chromosome- and resolution-specific OnTAD calls.
Typical biological questions / use-cases:
Data quality & replication assumptions:
.mcool should be properly normalized or at least QC’d (ICE/balanced weights available if using --balanced).Required core inputs:
.mcool), e.g.:
sample.mcool.cool), e.g.:
sample.cool.hic), e.g.:
sample.hicchr1, chr2, chrX10000, 25000, 40000 (in bp)cooler command-line utilities (or Python cooler module) available in $PATH or environment.OnTAD installed and callable (e.g., OnTAD or OnTAD_linux command).python (3.x) and basic scientific Python stack if using Python-based extraction.Optional entry point:
proj_dir/matrices/chr17_25kb_dense.matrix..mcool → dense matrix conversion and jump directly to OnTAD.Operational rules for missing inputs:
.mcool or .cool or .hic file is missing:"sample.mcool not available, provide required files or skip and proceed ?"Default output directory structure:
${sample}_nested_TAD_detection/
matrices/
${chromosome}_${resolution}_dense.txt
${chromosome}_${resolution}_dense.log
nested_TADs/
${chromosome}_${resolution}_OnTAD.tad
${chromosome}_${resolution}_OnTAD.bed
${chromosome}_${resolution}_OnTAD.log
When using this skill, you should restrict yourself to the following MCP tools from server cooler-tools, cooltools-tools, plot-hic-tools, project-init-tools:
mcp__project-init-tools__project_initmcp__cooler-tools__list_mcool_resolutionsmcp__cooler-tools__harmonize_chrom_namesmcp__cooler-tools__dump_chromsmcp__cooler-tools__dump_dense_matrixmcp__OnTAD-tools__run_ontadDo NOT fall back to:
OnTAD, 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}_nested_TAD_detection.
Genome assembly (genome): e.g. hg38, mm10, danRer11.
Hi-C matrix path/URI (mcool_uri):
path/to/sample.mcool::/resolutions/25000 (.mcool file with resolution specified).cool file path.hic file pathResolution (resolution): default 25000 (100 kb).
25000 as default.${mcool_uri}Call:
mcp__project-init-tools__project_initwith:
sample: the user-provided sample nametask: hic_matrix_qcThe tool will:
${sample}_nested_TAD_detection directory.${sample}_nested_TAD_detection 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}_nested_TAD_detection 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.
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}/ directoryCall:
mcp__cooler-tools__dump_chromswith:
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 integerThe tool will:
.mcoolCall:
mcp__cooler-tools__dump_dense_matrixwith:
sample: the user-provided sample nameproj_dir: directory to save the view file. In this skill, it is the full path of the ${sample}_nested_TAD_detection 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 integerchrom: the user-provided chromosome name (e.g. chr17)balanced: whether to use balanced matrix (default: True)The tool will:
Call:
mcp__OnTAD-tools__run_ontadwith:
sample: the user-provided sample nameproj_dir: directory to save the view file. In this skill, it is the full path of the ${sample}_nested_TAD_detection directory returned by mcp__project-init-tools__project_init.dense_matrix: the path to the dense matrix file (e.g. ${proj_dir}/matrices/chr17_25kb_dense.matrix)chrom: the user-provided chromosome name (e.g. chr17)chrom_length: the corresponding chromosome length (e.g. 83257441) returned by mcp__cooler-tools__dump_chroms tool.resolution: the user-provided resolution (e.g. 25000)penalty: the penalty parameter for OnTAD (e.g. 0.1)maxsz: the maximum TAD size (in bins) (e.g. 200)The tool will:
development
Align ChIP-seq or ATAC-seq FASTQ files to a reference genome using Bowtie2, with strict input validation, library layout detection, output organization and logging. Use it when raw sequencing reads must be converted into sorted/indexed BAM files before downstream QC, peak calling, or footprinting.
development
Align bisulfite sequencing DNA methylation reads using Bismark only, with explicit validation of reference preparation, library layout detection, output organization, logging, and alignment QC. Use it for WGBS, RRBS, or other bisulfite-converted DNA methylation sequencing data when raw FASTQ files must be aligned before methylation extraction and downstream analysis.
data-ai
Perform peak calling for ChIP-seq or ATAC-seq data using MACS3, with intelligent parameter detection from user feedback. Use it when you want to call peaks for ChIP-seq data or ATAC-seq data.
devops
The TF-differential-binding pipeline performs differential transcription factor (TF) binding analysis from ChIP-seq datasets (TF peaks) using the DiffBind package in R. It identifies genomic regions where TF binding intensity significantly differs between experimental conditions (e.g., treatment vs. control, mutant vs. wild-type). Use the TF-differential-binding pipeline when you need to analyze the different function of the same TF across two or more biological conditions, cell types, or treatments using ChIP-seq data or TF binding peaks. This pipeline is ideal for studying regulatory mechanisms that underlie transcriptional differences or epigenetic responses to perturbations.