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.
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.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
## 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,
- Version Compatibility
- Fst - Population Differentiation
- scikit-allel
- Windowed Fst
- vcftools
- Choosing an Fst Estimator
- When Population Labels Are Unknown
- Tajima's D - Departures from Neutrality
- Interpretation
- iHS - Integrated Haplotype Score
- Plot iHS
- XP-EHH - Cross-Population Extended Haplotype Homozygosity
- NSL - Number of Segregating Sites by Length
- Garud's H Statistics
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
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.
