Agent skill · Testing & QA

bio-population-genetics-selection-statistics

Detect signatures of natural selection using Fst, Tajima's D, iHS, XP-EHH, and other selection statistics. Calculate population differentiation, test for departures from neutrality, and identify selective sweeps with scikit-allel and vcftools. Use when computing selection signatures like Fst or Tajima's D.

BioTender-maxgithub.com/BioTender-maxGitHub ↗
claude-codeships scriptsNOASSERTION
Install
npx skills add BioTender-max/awesome-bio-agent-skills --skill selection-statistics --agent claude-code

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

Facts
Files in the skill folder: 3
SKILL.md size: 9 KB
Bundled scripts: yes
Path: skills/bioskills/selection-statistics/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 135
Language: Python

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

From the SKILL.md

## Version Compatibility Reference examples tested with: STAR 2.7.11+, matplotlib 3.8+, numpy 1.26+, scipy 1.12+ 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. # Selection Statistics **"Scan my population data for signs of natural selection"** → Calculate selection statistics (Fst, Tajima's D, iHS, XP-EHH) to detect selective sweeps and departures from neutrality. - Python: `allel.moving_hudson_fst()`, `allel.ihs()`, `allel.xpehh()` (scikit-allel) - CLI: `vcftools --weir-fst-pop` for pairwise Fst Detect natural selection signatures using diversity statistics and extended haplotype homozygosity. ## Fst - Population Differentiation ### scikit-allel ```python import allel import numpy as np callset = allel.read_vcf('data.vcf.gz') gt = allel.GenotypeArray(callset['calldata/GT']) pos = callset['variants/POS'] subpops = {'pop1': [0, 1, 2, 3, 4], 'pop2': [5,

What's inside
Steps it walks through
  1. Version Compatibility
  2. Fst - Population Differentiation
  3. scikit-allel
  4. Windowed Fst
  5. vcftools
  6. Choosing an Fst Estimator
  7. When Population Labels Are Unknown
  8. Tajima's D - Departures from Neutrality
  9. Interpretation
  10. iHS - Integrated Haplotype Score
  11. Plot iHS
  12. XP-EHH - Cross-Population Extended Haplotype Homozygosity
  13. NSL - Number of Segregating Sites by Length
  14. Garud's H Statistics
Ships with 2 files
  • examples/selection_scan.py
  • usage-guide.md
Commands it runs
Calculate Fst between populations
vcftools --vcf data.vcf --weir-fst-pop pop1.txt --weir-fst-pop pop2.txt --out fst_result
With window
vcftools --vcf data.vcf --weir-fst-pop pop1.txt --weir-fst-pop pop2.txt \
vcftools --vcf data.vcf --TajimaD 100000 --out tajima
More from awesome-bio-agent-skills
All skills →
About this skill
What does the bio-population-genetics-selection-statistics skill do?

Detect signatures of natural selection using Fst, Tajima's D, iHS, XP-EHH, and other selection statistics. Calculate population differentiation, test for departures from neutrality, and identify selective sweeps with scikit-allel and vcftools. Use when computing selection signatures like Fst or Tajima's D.

How do I install it?

Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill selection-statistics --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 BioTender-max/awesome-bio-agent-skills, a repository with 135 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