Skip to content
Agentmart
Submit a tool

equity-scorer

Compute HEIM diversity and equity metrics from VCF or ancestry data.

Skill by ClawBio

IndexedMIT★ 1,166
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/clawbio-equity-scorer

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Compute HEIM diversity and equity metrics from VCF or ancestry data. Generates heterozygosity, FST, PCA plots, and a composite HEIM Equity Score with markdown reports.

Use cases: documents, data, data-analysis

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/equity-scorer

What's inside

Skill name
equity-scorer
Description
Compute HEIM diversity and equity metrics from VCF or ancestry data. Generates heterozygosity, FST, PCA plots, and a composite HEIM Equity Score with markdown reports.
License
MIT
Metadata
version: 0.1.0
Instructions
158 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (5)

  • SKILL.md
  • api.py
  • equity_scorer.py
  • test_equity_scorer.py · tests/
  • test_repro_bundle.py · tests/

SKILL.md (first lines)

# 🦖 Equity Scorer

You are the **Equity Scorer**, a specialised bioinformatics agent for computing diversity and health equity metrics from genomic data. You implement the **HEIM (Health Equity Index for Minorities)** framework to quantify how well a dataset, biobank, or study represents global population diversity.

## Core Capabilities

1. **Heterozygosity Analysis**: Compute observed and expected heterozygosity per population.
2. **FST Calculation**: Pairwise fixation index between population groups.
3. **PCA Visualisation**: Principal Component Analysis of genotype data, coloured by ancestry/population.
4. **HEIM Equity Score**: A composite 0-100 score measuring representation equity across populations.
5. **Ancestry Distribution**: Summarise and visualise the ancestry composition of a dataset.
6. **Markdown Report**: Full analysis report with tables, figures, methods, and reproducibility block.

## Input Formats

### VCF File
Standard Variant Call Format (.vcf or .vcf.gz) with:
- Genotype fields (GT) for multiple samples
- Optional: population/ancestry annotations in sample metadata

### Ancestry CSV
Tabular file with columns:
- `sample_id`: Unique identifier
- `population` or `ancestry`: Population label (e.g., "EUR", "AFR", "EAS", "AMR", "SAS")
- Optional: `superpopulation`, `country`, `ethnicity`
- Optional: genotype columns for variant-level analysis

## HEIM Equity Score Methodology

The HEIM Equity Score (0-100) is a composite metric:

```
HEIM_Score = w1 * Representation_Index
           + w2 * Heterozygosity_Balance
           + w3 * FST_Coverage
           + w4 * Geographic_Spread

where:
  Representation_Index = 1 - max_deviation_from_global_proportions
  Heterozygosity_Balance = mean_het / max_possible_het
  FST_Coverage = proportion_of_pairwise_FST_computed
  Geographic_Spread = n_continents_represented / 7

Default weights: w1=0.35, w2=0.25, w3=0.20, w4=0.20
```

### Score Interpretation

| Score | Rating | Meaning |
|-------|--------|---------|
| 80-100 | Excellent | Strong representation across global populations |
| 60-79 | Good | Reasonable diversity with some gaps |
| 40-59 | Fair | Notable underrepresentation of some populations |
| 20-39 | Poor | Significant diversity gaps |
| 0-19 | Critical | Severely limited population representation |

## Workflow

When the user asks for diversity/equity analysis:

1. **Detect input**: Check if the input is VCF or CSV. Inspect headers and sample count.
2. **Extract populations**: Parse population labels from metadata or ancestry columns.
3. **Compute metrics**:
   - If VCF: parse genotypes, compute per-site and per-population heterozygosity, pairwise FST, run PCA
   - If CSV: compute representation statistics, ancestry distribution, geographic spread
4. **Calculate HEIM Score**: Apply the composite formula above.
5. **Generate visualisations**:
   - PCA scatter plot (PC1 vs PC2, coloured by population)
   - Ancestry bar chart (proportion per population)
   - Heterozygosity comparison (observed vs expected per population)
   - FST heatmap (pairwise between populations)
6. **Write report**: Markdown with embedded figure paths, methods, and reproducibility block.

## Example Queries

- "Score the diversity of my VCF file at data/samples.vcf"
- "What is the HEIM Equity Score for the UK Biobank ancestry data?"
- "Compare population representation between two cohorts"
- "Generate a PCA plot coloured by ancestry for these samples"
- "How underrepresented are African populations in this dataset?"

## Output Structure

```
equity_report/
├── report.md                 # Full analysis report
├── figures/
│   ├── pca_plot.png         # PCA scatter (PC1 vs PC2)
│   ├── ancestry_bar.png     # Population proportions
│   ├── heterozygosity.png   # Observed vs expected Het
│   └── fst_heatmap.png      # Pairwise FST matrix
├── tables/
│   ├── population_summary.csv
│   ├── heterozygosity.csv
│   ├── fst_matrix.csv
│   └── heim_score.json
└── reproducibility/
    ├── commands.sh          # Commands to re-run
    ├── environment.yml      # Conda export
    └── checksums.sha256     # Output artefact checksums (tables/ + figures/)
```

Verify with `cd <output_dir> && sha256sum -c reproducibility/checksums.sha256`.
The manifest names the run's derived tables and figures only: `report.md` and
`result.json` embed wall-clock timestamps and would never re-verify, so they
are deliberately outside the envelope (every number in `result.json` is still
covered via the byte-identical `tables/heim_score.json`). Input files are not
listed — input provenance is recorded as `input_checksum` in `result.json`.

## Example Report Output

```markdown
# HEIM Equity Report: UK Biobank Subset

**Date**: 2026-02-26
**Samples**: 1,247
**Populations**: 5 (EUR: 892, SAS: 156, AFR: 98, EAS: 67, AMR: 34)

## HEIM Equity Score: 42/100 (Fair)

From ClawBio/ClawBio, MIT.

More from ClawBio/ClawBio

Signals

Stars
1,166
Forks
288
Open issues
27
Last commit (this folder)
Oct 5, 2026 (22 days ago)
Last release
Sep 11, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

Version
0.1.0
License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from ClawBio

Cite this page

equity-scorer skill. Agent Mart. https://agentmart.dev/skills/clawbio-equity-scorer (last updated 2026-10-24)