← All methods
GWAS

Genome-Wide Association Studies (GWAS)

Identify SNPs significantly associated with a phenotype across the genome, with proper multiple-testing correction.

How it works

Our GWAS module fits a mixed linear model (MLM) at each marker, optionally correcting for population structure via principal components. We report both Bonferroni and Benjamini–Hochberg FDR-controlled thresholds, and provide a permutation max-T option that gives empirical family-wise error rates (FWER) without distributional assumptions. LD-pruned independent hits separate true causal regions from linked passengers.

Formula

y = Xβ + Zα + Wm·b + e, where m is the marker tested, b its effect, and Z encodes random polygenic background variance.

What you get

  • Manhattan plot of −log₁₀(p) by marker position
  • QQ plot of observed vs expected p-values (genomic inflation λ)
  • Bonferroni- and BH-FDR-corrected significance thresholds
  • LD-pruned independent significant hits with effect sizes

When to use it

  • You have genotype data (SNPs) and a measured phenotype across the same individuals
  • You want to discover the genomic regions driving a trait
  • You plan to follow up with QTL mapping or functional annotation

Inputs

Genotype matrix
VCF, HapMap, or numeric CSV (rows = individuals, columns = markers)
Coded 0/1/2 or −1/0/1; missing as NA.
Phenotype table
CSV with `id` column plus one or more numeric trait columns
Covariates (optional)
CSV keyed by `id` (e.g. year, location, sex)

Parameters

NameDefaultDescription
PCs as covariates3Number of top principal components added as fixed effects to control for population stratification.
MAF filter0.05Drops markers with minor allele frequency below this threshold before scanning.
CorrectionBH-FDR 5%Choose Bonferroni, BH-FDR, or empirical max-T permutations (1000+).
LD prune r²0.2Threshold for collapsing linked hits into a single independent locus.

Workflow

  1. 1. QC & filter
    MAF, call-rate and HWE thresholds applied to markers; missingness threshold to samples.
  2. 2. Structure
    PCA on the pruned marker matrix; top-K PCs stored as covariates.
  3. 3. Null model
    Variance components (σ²g, σ²e) estimated once via REML using the kinship matrix.
  4. 4. Per-marker scan
    Score test at each SNP against the null; p-values and effect sizes recorded.
  5. 5. Multiple testing
    Bonferroni and BH-FDR thresholds drawn; optional permutation FWER.
  6. 6. LD prune
    Independent significant loci extracted; peak SNP and window reported.

Interpreting results

  • Read the QQ plot first: deviation only in the tail = clean scan; whole line lifted = residual structure.
  • Trust broad peaks with LD tapering; distrust lone spikes at low-MAF markers.
  • Effect sizes (b̂) are on the trait's original units — use them to prioritise hits, not just p-values.

Common pitfalls

  • Skipping PCA covariates on a structured panel inflates false positives dramatically.
  • Reporting only Bonferroni hides real signal on dense panels — publish BH-FDR alongside.
  • A single-marker spike almost always fails replication; require ≥3 supporting markers in the LD block.

Worked example

Wheat-599 grain-yield scan
599 lines × 1,447 DArT markers, 3 PCs, MAF 0.05. Detects a 2 Mb window on chromosome 2B (top p ≈ 8e−9, BH-FDR q = 0.003) overlapping a known TaGW2 yield-QTL region.

Try it — interactive example

Estimate significance thresholds and the expected number of false positives for a GWAS scan of this size.

Expected outputs
Bonferroni threshold (raw M)
p < 1.00e-6
Bonferroni threshold (effective M)
p < 5.00e-6
Less conservative — accounts for LD between markers.
−log₁₀ genome-wide line
6
Horizontal line drawn on your Manhattan plot.
Expected false positives at raw α
2500
Why correction matters.

Numbers are quick analytical estimates for planning — actual runs incorporate the full data, covariates, and QC pipeline.

FAQ

How many samples do I need?
Rule of thumb: 200+ for medium-effect loci; 500+ for reliable small-effect detection.
Can I use binary traits?
Yes — the module switches to a logistic mixed model automatically when the trait has two levels.

References

Run GWAS on your data

Open the module and upload a CSV.

Open module