Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills Aโ€“Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Equity Scorer

ASecurity

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.

2,984 stars
0 votes
0 copies
2 views
Added 5/30/2026
datapythongogitapi

Works with

api

Security Analysis

A100/100

Scanned 5/30/2026

Install to Claude Code

$npx -y skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill equity-scorer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Equity Scorer?

Add the live security badge to your README โ€” it updates automatically with every re-scan.

Security grade badge for Equity Scorer
[![Security: A โ€” Skills Directory](https://www.skillsdirectory.com/api/skills/freedomintelligence-equity-scorer/badge)](https://www.skillsdirectory.com/skills/freedomintelligence-equity-scorer)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
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.
version: 0.1.0
metadata:
  openclaw:
    requires:
      bins:
        - python3
      env: []
      config: []
    always: false
    emoji: "๐Ÿฆ–"
    homepage: https://github.com/ClawBio/ClawBio
    os: [macos, linux]
    install:
      - kind: uv
        package: biopython
        bins: []
      - kind: uv
        package: pandas
        bins: []
      - kind: uv
        package: scikit-learn
        bins: []
      - kind: uv
        package: matplotlib
        bins: []
      - kind: uv
        package: numpy
        bins: []
---

# ๐Ÿฆ– 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     # Input file checksums
```

## 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)

### Breakdown
- Representation Index: 0.31 (EUR overrepresented at 71.5%)
- Heterozygosity Balance: 0.68 (AFR populations show highest diversity)
- FST Coverage: 1.00 (all pairwise computed)
- Geographic Spread: 0.71 (5/7 continental groups)

### Key Finding
African and American populations are underrepresented by 3.2x and 5.8x
respectively relative to global proportions. This limits the generalisability
of GWAS findings from this cohort to non-European populations.

### Recommendations
1. Prioritise recruitment from AMR and AFR communities
2. Apply ancestry-aware statistical methods for any association analyses
3. Report HEIM score alongside study demographics in publications
```

## Dependencies

**Required (Python packages)**:
- `biopython` >= 1.82 (VCF parsing via `Bio.SeqIO`, population genetics)
- `pandas` >= 2.0 (data wrangling)
- `numpy` >= 1.24 (numerical computation)
- `scikit-learn` >= 1.3 (PCA)
- `matplotlib` >= 3.7 (visualisation)

**Optional**:
- `cyvcf2` (faster VCF parsing for large files)
- `seaborn` (enhanced visualisations)
- `pysam` (BAM/VCF indexing)

## Safety

- **No data upload**: All computation local. No external API calls for genomic data.
- **Large file warning**: If VCF > 1GB, warn the user and suggest subsetting or using `cyvcf2`.
- **Ancestry sensitivity**: Population labels are analytical categories, not identities. Include this disclaimer in reports.

Attribution

FreedomIntelligenceFreedomIntelligence
View sourceMore from FreedomIntelligence โ†’
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots ยท $299/mo ยท GSC-verified traffic ยท sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots ยท $299/mo ยท GSC-verified traffic ยท sponsors can never buy grades.

See placements

Related Skills

Rank Tracker

This skill helps you track, analyze, and report on keyword ranking positions over time. It monitors both traditional SERP rankings and AI/GEO visibility to provide comprehensive search performance insights.

1821 votes

Youtube Competitor Analyzer

Find and analyze YouTube competitor channels using YouTube Data API v3. Discover competitors through keyword search, category matching, content similarity, and related channel discovery. Compare metrics, content strategies, and market positioning. Use when users want to (1) Find competitors for their YouTube channel, (2) Analyze competitor performance metrics, (3) Compare their channel against competitors, (4) Identify content gaps and opportunities, (5) Benchmark against similar creators, (6...

31 votes

Twitter Algorithm Optimizer

Analyze and optimize tweets for maximum reach using Twitter's open-source algorithm insights. Rewrite and edit user tweets to improve engagement and visibility based on how the recommendation system ranks content.

742580 votes

Weather Fetcher

Instructions for fetching current weather temperature data for Karachi, Pakistan from wttr.in API

661090 votes

Weather

Get current weather and forecasts (no API key required).

476190 votes
View all in data โ†’