30_toolBased.hic-matrix-qc/SKILL.md
This skill performs standardized quality control (QC) on Hi-C contact matrices stored in .mcool or .cool format. It computes coverage and cis/trans ratios, distance-dependent contact decay (P(s) curves), coverage uniformity, and replicate correlation at a chosen resolution using cooler and cooltools. Use it to assess whether Hi-C data are of sufficient quality for downstream analyses such as TAD calling, loop detection, and compartment analysis.
npx skillsauth add bisnake2001/chromskills hic-matrix-qcInstall 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 QC on Hi-C matrices stored in .cool or .mcool format files at a user-selected resolution.
Main steps include:
"${files} not available, provide required files or skip and proceed ?".mcool file to list available resolutions and confirm the analysis resolution with the user.Use the hic-matrix-qc skill when you need to evaluate the quality of Hi-C contact matrices that are already stored in .cool, .mcool or .hic format.
Optional: Multiple Hi-C matrices for replicate QC
rep1.mcool rep2.mcool rep3.mcool
${sample}_hic_matrix_qc/
logs/
hic_qc.log # Commands, parameters, and software versions
metrics/
coverage.${resolution}.tsv # Per-bin cis/total coverage from cooltools coverage
cis_trans_summary.${resolution}.txt # Summarized cis, total, trans counts, and ratios
ps_scaling_summary.${resolution}.txt # Optional table with P(s) slope(s) in defined distance ranges
replicate_correlation.${resolution}.tsv # Pairwise correlation coefficients between replicates
plots/
coverage_histogram.${resolution}.pdf # Coverage uniformity plot
ps_curve.${resolution}.pdf # P(s) curve (contact probability vs distance)
decay_curve.${resolution}.pdf # Contact decay curve (raw/normalized)
replicate_correlation_heatmap.${resolution}.pdf # Correlation matrix heatmap (if multiple replicates)
comparison/
replicate_vectors_${resolution}.npz # (Optional) Stored vectors used for replicate correlations
temp/
expected_cis.${resolution}.tsv # Expected cis contacts vs distance from expected-cis
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__compute_coverage_and_cis_transmcp__plot-hic-tools__plot_coverage_histogrammcp__cooltools-tools__run_expected_cismcp__plot-hic-tools__plot_ps_and_decaymcp__plot-hic-tools__replicate_correlationDo NOT fall back to:
cooltools coverage, 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}_hic_matrix_qc.
Genome assembly (genome): e.g. hg38, mm10, danRer11.
Hi-C matrix path/URI (mcool_uri):
path/to/sample.mcool::/resolutions/100000 (.mcool file with resolution specified).cool file path.hic file pathResolution (resolution): default 100000 (100 kb).
100000 as default.${mcool_uri}Call:
mcp__project-init-tools__project_initwith:
sample: the user-provided sample nametask: hic_matrix_qcThe tool will:
${sample}_hic_matrix_qc directory.${sample}_hic_matrix_qc 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}_hic_matrix_qc 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}/ directoryCall:
mcp__cooler-tools__compute_coverage_and_cis_trans
with:
proj_dir: directory to save the view file. In this skill, it is the full path of the ${sample}_hic_matrix_qc 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 integerclr_weight_name: name of the weight column (default: weight)cis_column: name of the cis column (default: cov_cis_weight)total_column: name of the total column (default: cov_tot_weight)The tool will:
coverage.${resolution}.tsv cis_trans_summary.${resolution}.txtAssess coverage uniformity by plotting a histogram of per-bin coverage.
Call:
mcp__plot-hic-tools__plot_coverage_histogram
with:
sample: the user-provided sample nameproj_dir: directory to save the view file. In this skill, it is the full path of the ${sample}_hic_matrix_qc directory returned by mcp__project-init-tools__project_init.resolution: ${resolution}column: which column to histogram, e.g. cis, total, or n_valid (default: cis)bins: number of histogram bins (default: 50)The tool will:
After the tool runs, inform user with this:
bioframe to define chromosome arms based on centromeres:Call:
mcp__cooler-tools__make_view_chromarmswith:
sample: the user-provided sample nameproj_dir: directory to save the view file. In this skill, it is the full path of the ${sample}_hic_matrix_qc 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 integergenome: the user-provided genome assemblyThe 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}_hic_matrix_qc 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)expected_cis_tsv: the path to the expected cis file (e.g. ${proj_dir}/temp/expected_cis.${resolution}.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:
Call:
mcp__plot-hic-tools__plot_ps_and_decaywith:
sample: the user-provided sample nameproj_dir: directory to save the view file. In this skill, it is the full path of the ${sample}_hic_matrix_qc 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 integerThe tool will:
Call:
mcp__plot-hic-tools__replicate_correlationwith:
mcool_uris: list of cooler URIs with resolution specified, one per replicate, e.g. ['rep1.mcool::/resolutions/${resolution}', 'rep2.mcool::/resolutions/${resolution}']output_prefix: prefix for the output files, e.g. hic_qc_replicates_${resolution}chroms: list of chromosomes to use for correlation, e.g. ['chr1', 'chr2']use_balanced: whether to use balanced matrices (default: True)The tool will:
After the tool runs, inform user with this:
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.