Agent skill · Data & Analytics

bio-hi-c-analysis-compartment-analysis

Detect A/B compartments from Hi-C data using cooltools and eigenvector decomposition. Identify active (A) and inactive (B) chromatin compartments from contact matrices. Use when identifying A/B compartments from Hi-C data.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill compartment-analysis-gptomics-bioskills --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 6 KB
Bundled scripts: none
Path: skills/ai-ml/compartment-analysis-gptomics-bioskills/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Compartment Analysis Detect A/B compartments from Hi-C contact matrices. ## Required Imports ```python import cooler import cooltools import cooltools.lib.plotting import numpy as np import pandas as pd import matplotlib.pyplot as plt import bioframe ``` ## Compute Compartment Eigenvectors ```python clr = cooler.Cooler('matrix.mcool::resolutions/100000') # Get reference genome info view_df = bioframe.make_viewframe(clr.chromsizes) # Compute expected values first expected = cooltools.expected_cis(clr, view_df=view_df, ignore_diags=2) # Compute eigenvector decomposition (compartments) eigenvector_track = cooltools.eigs_cis( clr, view_df=view_df, phasing_track=None, # Or provide GC content track n_eigs=3, ) # Results are returned as a tuple (eigenvalues, eigenvectors) eigenvalues, eigenvectors = eigenvector_track print(f'Eigenvalues shape: {eigenvalues.shape}') print(eigenvectors.head()) ``` ## Use GC Content for Phasing ```python # GC content helps orient A/B compartments correctly # (A compartments typically have higher GC) # Fetch GC content gc_track = bioframe.frac_gc( bioframe.make_viewframe(clr.chromsizes), bioframe.load_fasta('genome.fa'), ) # Compute eigenvectors with GC pha

What's inside
Steps it walks through
  1. Required Imports
  2. Compute Compartment Eigenvectors
  3. Use GC Content for Phasing
  4. Extract Compartment Calls
  5. Compartment Strength (Saddle Plot)
  6. Plot Saddle
  7. Compartment Strength Score
  8. Plot Eigenvector Track
  9. Export Compartment Calls
  10. Compare Compartments Between Samples
  11. Correlate with Gene Expression
  12. Related Skills
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the bio-hi-c-analysis-compartment-analysis skill do?

Detect A/B compartments from Hi-C data using cooltools and eigenvector decomposition. Identify active (A) and inactive (B) chromatin compartments from contact matrices. Use when identifying A/B compartments from Hi-C data.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill compartment-analysis-gptomics-bioskills --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going