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.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill selection-statistics-gptomics-bioskills --agent claude-code

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

Facts
Files in the skill folder: 2
SKILL.md size: 6 KB
Bundled scripts: none
Path: skills/analysis/selection-statistics-gptomics-bioskills/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

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

From the SKILL.md

# Selection Statistics 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, 6, 7, 8, 9]} ac_subpops = gt.count_alleles_subpops(subpops) num, den = allel.hudson_fst(ac_subpops['pop1'], ac_subpops['pop2']) fst_per_snp = num / den print(f'Mean Fst: {np.nanmean(fst_per_snp):.4f}') ``` ### Windowed Fst ```python fst_windowed, windows, n_snps = allel.windowed_hudson_fst( pos, ac_subpops['pop1'], ac_subpops['pop2'], size=100000, step=50000) import matplotlib.pyplot as plt plt.figure(figsize=(14, 4)) plt.plot(windows[:, 0], fst_windowed) plt.xlabel('Position') plt.ylabel('Fst') plt.savefig('fst_windows.png') ``` ### vcftools ```bash # 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 \ --fst-window-size 100000 --fst-window-step 50

What's inside
Steps it walks through
  1. Fst - Population Differentiation
  2. scikit-allel
  3. Windowed Fst
  4. vcftools
  5. Tajima's D - Departures from Neutrality
  6. Interpretation
  7. iHS - Integrated Haplotype Score
  8. Plot iHS
  9. XP-EHH - Cross-Population Extended Haplotype Homozygosity
  10. NSL - Number of Segregating Sites by Length
  11. Garud's H Statistics
  12. Composite Selection Score
  13. Complete Selection Scan
  14. Related Skills
Ships with 1 file
  • metadata.json
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 claude-skill-registry
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 majiayu000/claude-skill-registry --skill selection-statistics-gptomics-bioskills --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 majiayu000/claude-skill-registry, a repository with 534 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