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
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
| Name | Default | Description |
|---|---|---|
| PCs as covariates | 3 | Number of top principal components added as fixed effects to control for population stratification. |
| MAF filter | 0.05 | Drops markers with minor allele frequency below this threshold before scanning. |
| Correction | BH-FDR 5% | Choose Bonferroni, BH-FDR, or empirical max-T permutations (1000+). |
| LD prune r² | 0.2 | Threshold for collapsing linked hits into a single independent locus. |
Workflow
- 1. QC & filterMAF, call-rate and HWE thresholds applied to markers; missingness threshold to samples.
- 2. StructurePCA on the pruned marker matrix; top-K PCs stored as covariates.
- 3. Null modelVariance components (σ²g, σ²e) estimated once via REML using the kinship matrix.
- 4. Per-marker scanScore test at each SNP against the null; p-values and effect sizes recorded.
- 5. Multiple testingBonferroni and BH-FDR thresholds drawn; optional permutation FWER.
- 6. LD pruneIndependent 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
Try it — interactive example
Estimate significance thresholds and the expected number of false positives for a GWAS scan of this size.
Numbers are quick analytical estimates for planning — actual runs incorporate the full data, covariates, and QC pipeline.
FAQ
References
Open the module and upload a CSV.