This skill detects focal chromatin loops (point interactions / corner-dots) in balanced Hi-C and Micro-C contact maps and validates a loop set. It covers de-novo calling with cooltools dots (a pure-CPU HiCCUPS reimplementation using four local-background kernels and lambda-chunked FDR), chromosight (template-correlation), and Mustache (scale-space blob detection), plus aggregate peak analysis (APA) via cooltools pileup. The decision that gates everything is depth: de-novo loop calling realistically needs 5-10kb resolution (hundreds of millions to billions of valid pairs); below that, the right move is APA on a known anchor set rather than de-novo calling. The skill stresses that de-novo calling DISCOVERS while APA CONFIRMS, that callers disagree (so consensus plus convergent-CTCF support is how loops are trusted), and that HiChIP/PLAC-seq data needs FitHiChIP/MAPS, not dots.
pip install cooler cooltools bioframe chromosight matplotlib
# Mustache (scale-space loop caller):
pip install mustache-hic
# Optional GPU HiCCUPS path on .hic:
# Juicer Tools (requires CUDA)
The cooler must be balanced before loop calling (cooler balance matrix.mcool::/resolutions/10000). For an .mcool, always pass a single-resolution URI (file.mcool::/resolutions/10000), not the bare file.
Tell your AI agent what you want to do: - "Call chromatin loops from my balanced cooler at 10kb" - "Is my map deep enough to call loops de-novo, or should I run APA on known anchors?" - "Run aggregate peak analysis on my loop set and report the APA score" - "Validate my loops against convergent CTCF motifs" - "Compare loop strength between my two conditions"
"I have a balanced .mcool from a deep in-situ Hi-C library. Call loops at 10kb with cooltools dots: build chromosome-arm regions, compute expected_cis on those arms, then run dots with the same view, max_loci_separation 10Mb, and the default lambda-chunked FDR. Report how many loops and their size distribution."
"Run chromosight detect for loops on my 5kb cooler between 20kb and 2Mb separation with a Pearson cutoff of 0.4, then also detect borders and stripes so I can keep them separate from the loop set."
"My library only has ~40 million valid pairs. Don't de-novo call. Instead build anchor pairs from my CTCF and RAD21 ChIP-seq peaks and run cooltools pileup as APA, then give me the APA score as center pixel over the lower-left corner block."
"Pile up my called loop set with cooltools pileup using expected so the snippets are O/E, average across the stack, and tell me whether the aggregate center dot is clean enough that the set is mostly real."
"Intersect the loops called by cooltools dots and Mustache, then check how many consensus loops have convergent CTCF motifs at both anchors."
"Build a union anchor set across my WT and cohesin-degron conditions, quantify each loop's strength per condition with chromosight quantify, and report which loops weaken after cohesin loss."
view_df and compute expected_cis on it.cooltools.dots (or chromosight / Mustache) with the same view, keeping FDR control via lambda-chunking.dots and pileup read the weight column and raw counts are unsupported.view_df for expected_cis and dots/pileup, or the shapes will not align.