equity-scorer_skill

This skill computes HEIM diversity metrics from VCF or ancestry data, producing a composite equity score and publication-ready reports.
  • Python

2.5k

GitHub Stars

3

Bundled Files

2 months ago

Catalog Refreshed

3 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openclaw/skills --skill equity-scorer

  • _meta.json284 B
  • equity_scorer.py34.9 KB
  • SKILL.md6.5 KB

Overview

This skill computes HEIM diversity and equity metrics from VCF or ancestry CSV inputs and produces a reproducible markdown report with figures and tables. It calculates heterozygosity, pairwise FST, PCA visualisations, ancestry summaries, and a composite HEIM Equity Score (0–100) to quantify representation across populations. Outputs include plots, CSV tables, a JSON score, and rerunnable commands for reproducibility.

How this skill works

The tool detects whether the input is a VCF or an ancestry CSV, extracts sample and population labels, then runs appropriate analyses. For VCFs it parses genotypes to compute per-site and per-population heterozygosity, pairwise FST, and PCA. For CSVs it computes representation statistics, ancestry distributions, and geographic spread. Finally it combines Representation Index, Heterozygosity Balance, FST Coverage, and Geographic Spread with configurable weights into the HEIM Equity Score and writes a markdown report with embedded figures and a reproducibility block.

When to use it

  • Assess population representation and equity in a biobank, cohort, or study
  • Compare diversity between two or more cohorts
  • Generate PCA plots colored by ancestry for population structure checks
  • Produce a reproducible analysis package (report, figures, tables) for publication
  • Screen VCF inputs for underrepresented populations before association analyses

Best practices

  • Provide clear population or ancestry labels in sample metadata to improve accuracy
  • Use cyvcf2 for large VCFs (>1 GB) or subset variants before full analyses
  • Run ancestry-aware association methods if HEIM score indicates imbalance
  • Include the reproducibility folder (commands, environment, checksums) with reports
  • Report HEIM score alongside study demographics and recruitment strategies

Example use cases

  • Score diversity of a research cohort VCF and identify underrepresented continental groups
  • Compare HEIM scores for two cohorts to guide targeted recruitment efforts
  • Produce PCA and heterozygosity plots for a manuscript methods section
  • Summarise ancestry composition from a clinical sequencing rollout before downstream analyses
  • Generate a reproducible archive (report + commands) to accompany data release

FAQ

Standard VCF (.vcf, .vcf.gz) with GT fields and an ancestry CSV with sample_id and population/ancestry columns are supported.

How is the HEIM Equity Score calculated?

HEIM is a weighted composite of Representation Index, Heterozygosity Balance, FST Coverage, and Geographic Spread with default weights w1=0.35, w2=0.25, w3=0.20, w4=0.20; outputs 0–100.

Is analysis performed offsite?

No. All computation is local; no genomic data is uploaded to external services.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational