Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

Hi-C File Handling

Loads and converts Hi-C matrices between cooler and .hic formats without losing or misapplying normalisation.

Claude's review

8/10 Detailed cooler and .hic I/O guide with the divisive vs multiplicative weight naming rule, conversion losses and coarsening rules.

We asked Claude the question you would ask: would I be glad I installed this? Two separate reviews, the second blind to the first, must both rate a skill 7 or higher before we sell it.

In detail

Loads, converts, and manipulates Hi-C contact matrices in cooler format (.cool/.mcool/.scool) and Juicer .hic, using cooler (Python + CLI), hic2cool, and hictk. Covers the single-resolution mcool URI (file.mcool::/resolutions/<bp>), the load-bearing divisive-vs-multiplicative weight-naming rule (KR/VC/VC_SQRT auto-divisive vs cooler's multiplicative weight), what survives .hic<->.cool conversion (FRAG matrices and norm vectors do not), raw-vs-balanced coarsening, the .pairs upper-triangle/chromsize-order contract, and chrom-naming/bin-table provenance. Use when loading a cooler, converting .hic to .mcool, selecting a resolution, building a cooler from pairs or a matrix, coarsening/zoomifying, importing Juicer norm vectors, or debugging all-NaN balanced matrices and chr1-vs-1 empty fetches.

How you use it

  1. Add it to your pack, then download your pack (1 credit).
  2. In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
  3. Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide

Safety check

Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: bio-hi-c-analysis-hic-data-io
description: Loads, converts, and manipulates Hi-C contact matrices in cooler format (.cool/.mcool/.scool) and Juicer .hic, using cooler (Python + CLI), hic2cool, and hictk. Covers the single-resolution mcool URI (file.mcool::/resolutions/<bp>), the load-bearing divisive-vs-multiplicative weight-naming rule (KR/VC/VC_SQRT auto-divisive vs cooler's multiplicative weight), what survives .hic<->.cool conversion (FRAG matrices and norm vectors do not), raw-vs-balanced coarsening, the .pairs upper-triangle/chromsize-order contract, and chrom-naming/bin-table provenance. Use when loading a cooler, converting .hic to .mcool, selecting a resolution, building a cooler from pairs or a matrix, coarsening/zoomifying, importing Juicer norm vectors, or debugging all-NaN balanced matrices and chr1-vs-1 empty fetches.
tool_type: mixed
primary_tool: cooler
---

## Version Compatibility

Reference examples tested with: cooler 0.10+, hic2cool 1.0+, hictk 1.0+, bioframe 0.7+

Before using code patterns, verify installed versions match. If versions differ:
- Python: `pip show <package>` then `help(module.function)` to check signatures
- CLI: `<tool> --version` then `<tool> --help` to confirm flags

If code throws ImportError, AttributeError, or TypeError, introspect the installed
package and adapt the example to match the actual API rather than retrying.

Two version boundaries change BEHAVIOUR, not just signatures: hic2cool >= 0.5.0 stores Juicer norms un-inverted (divisive); < 0.5.0 inverted them to multiplicative, so two coolers made from one .hic by different hic2cool versions disagree numerically. cooler standardized creation/balance signatures around 0.8-0.10 (`balance_cooler` keyword-only after `clr`; `store=False` default). Record the converter version in provenance.

# Hi-C Data I/O

**"Load my Hi-C contact matrix, convert it, and pull out a region."** -> Open the cooler at one resolution, fetch raw or balanced pixels, and convert across .hic/.cool/.mcool while knowing what does not survive the round trip.
- Python: `cooler.Cooler('file.mcool::/resolutions/10000').matrix(balance=True).fetch('chr1')`
- CLI: `hic2cool convert in.hic out.mcool -r 0` / `hictk convert in.hic out.mcool` / `cooler cload pairs ...`

## The Single Most Important Modern Insight -- cooler Stores Observed Counts; .hic Bakes In Norms, So Conversion Is Never Lossless Both Ways

A `.cool` is a thin, open, HDF5-native *store*: three tables (`chroms`, `bins`, `pixels`) holding raw observed integer counts in an upper-triangle COO layout, plus optional cached `weight` bias columns. Balancing, expected, O/E, eigenvectors -- everything else is computed downstream on demand. Juicer's `.hic` is the opposite philosophy: a sealed binary *deliverable* with all resolutions, precomputed normalization vectors, and expected vectors welded in. Every footgun in this skill descends from that split:

- **Conversion translates between two philosophies, not two encodings.** `.hic -> .cool` loses FRAG (restriction-fragment) matrices (cooler has no FRAG concept) and Juicer's precomputed expected; a norm whose vector is missing arrives as all-NaN. `.cool -> .hic` loses asymmetric matrices, arbitrary extra pixel value columns, and non-Hi-C labeled arrays.
- **The `weight` column NAME is load-bearing.** cooler's own ICE `weight` is applied MULTIPLICATIVELY by `matrix(balance=True)`. Juicer KR/VC norms are DIVISIVE. `Cooler.matrix(divisive_weights=None)` (the default) decides by column name: weights named **KR, VC, or VC_SQRT are auto-treated as divisive**; everything else (including `weight`) is multiplicative. Import a KR vector under the name `weight` and it is applied the wrong way -- garbage, no error.
- **`.mcool` is a container of resolutions, not a matrix.** Every downstream tool wants a single-resolution URI `file.mcool::/resolutions/<bp>`, never the bare `.mcool`. Each resolution is balanced from scratch; the 100kb `weight` is NOT derivable from the 10kb `weight`.

## Format and Tool Taxonomy

| Format / Tool | Role | Mechanism | When |
|---------------|------|-----------|------|
| `.cool` | single-resolution store | HDF5 chroms/bins/pixels, raw counts + optional weight | one resolution; the analysis unit |
| `.mcool` | multi-resolution container | `/resolutions/<bp>/` each a full cooler | HiGlass tilesets; pick a resolution via URI |
...

From GPTomics's repository, MIT licence.

Related skills

  • Checked

    Citation claim checker

    Checks each claim in a manuscript against its cited source and flags unsupported ones before submission.

    by Boom5426 709
    8/101 credit
  • Checked

    Paper figure planning

    Plans manuscript figures around one main claim each, with panel roles and legends that match your text.

    by Boom5426 709
    7/101 credit
  • Checked

    Citation Checker

    Checks every reference in your paper is real and accurately described, then fixes the bibliography errors.

    by Mathews-Tom 347
    8/101 credit
  • Checked

    Research paper critique

    Critiques research papers on method, evidence and contribution, so you know how far to trust a study's claims.

    by Mathews-Tom 347
    7/101 credit
  • Checked

    Genes Behind A GWAS Hit

    Finds genes behind your GWAS signal from predicted tissue expression, then narrows the real one.

    by GPTomics 1.3k
    8/101 credit
  • Checked

    Citation style formatting

    Formats citations in APA, Chicago, Vancouver or IEEE with CSL, so reference lists match the style guide.

    by pjt222 46
    7/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added