← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / OpenAI4S / skills / bioskills / bio-population-genetics-selection-statistics / references / usage-guide.md

Selection Statistics - Usage Guide

Overview

Selection statistics scan genomes for natural selection, but no single statistic separates selection from demography at one locus: a bottleneck mimics a sweep in the site-frequency spectrum, recent expansion gives genome-wide negative Tajima's D, and population structure gives positive D that mimics balancing selection. The honest deliverable is therefore empirical genome-wide outliers, multiple orthogonal signals (haplotype plus SFS plus diversity plus differentiation), and explicit demographic-model calibration, never an absolute cutoff. iHS and nSL detect ongoing/incomplete sweeps and collapse to zero at fixation, while XP-EHH and Rsb catch fixed sweeps by borrowing a second population, so they are complementary rather than redundant.

Prerequisites

Quick Start

Tell your AI agent what you want to do: - "Scan for selection using genome-wide outliers, not absolute cutoffs" - "Compute iHS for ongoing sweeps and standardize within frequency bins" - "Run XP-EHH to find completed sweeps in one of two populations" - "Compute Hudson FST and PBS for population-differentiation outliers" - "Find soft sweeps with Garud's H12" - "Run a SweepFinder2 CLR scan with a background-selection map" - "Intersect outliers across iHS, FST, and reduced diversity"

Example Prompts

SFS Neutrality Tests

"Compute windowed Tajima's D and nucleotide diversity, but interpret them relative to the genome-wide distribution rather than an absolute cutoff."

"Run a Fay & Wu H scan and tell me how to polarize ancestral alleles correctly so CpG sites don't fake a sweep."

Haplotype Tests

"Compute iHS scores for ongoing selection and standardize them within derived-allele-frequency bins."

"Run XP-EHH between my two populations to find completed sweeps, and apply the correct genome-wide standardization."

"My data is poorly phased - can I still run a haplotype sweep scan?"

Differentiation

"Calculate Hudson FST between two populations with unequal sample sizes and report the ratio-of-averages."

"Compute PBS across three populations to find which branch the differentiation is on."

"An FST peak sits in a low-recombination region - is it selection or background selection?"

Multi-Statistic and Polygenic

"Intersect outliers from iHS, FST, and depressed diversity to get credible sweep candidates."

"I want to test for polygenic adaptation on a trait - what effect sizes should I use?"

What the Agent Will Do

  1. Clarify the question (localized recent sweep vs ancient/recurrent coding selection vs polygenic trait shift) and route coding selection to comparative-genomics and polygenic shifts to Qx.
  2. Assess data: phase status, genetic map availability, and whether ancestral alleles are polarized with an adequate outgroup model.
  3. Pick complementary statistics by sweep completeness (iHS/nSL for incomplete, XP-EHH/Rsb for fixed, H12 for soft, CLR to localize, FST/PBS for differentiation).
  4. Standardize correctly: derived-allele-frequency bins for iHS/nSL, genome-wide z-score for XP-EHH/iHH12.
  5. Flag empirical genome-wide outliers (top 1%) rather than absolute cutoffs, and intersect orthogonal signals.
  6. Deconfound background selection (B-value map for CLR, recombination control for FST) and calibrate against a demographic-model simulation where possible.
  7. Report candidate regions with coordinates and the evidence each statistic contributes.

Tips