GWAS / Manhattan track
The GWAS track renders results as a Manhattan plot: -log₁₀(p-value) on the Y axis, genomic position on the X axis. Points support LocusZoom-style r² LD coloring to show linkage to an index SNP.
The embedded Pan-UKB GWAS example browses the Pan-UK Biobank catalog of ~7,200 phenotypes, reading each trait's summary statistics from the Pan-UKBB public S3 bucket.
Example file
To try the track without preparing anything, paste this hg19 BMI GWAS summary
statistics file (with neg_log_pvalue as the score column) into the
Add track form:
https://s3.amazonaws.com/jbrowse.org/genomes/hg19/gwas/summary_stats.txt.gzIts peaks include FTO at chr16:53.8 Mb, TMEM18, MC4R and SEC16B. The file has no
LD data; the LD-colored demo below pairs gwas_giant-bmi_meta_women-only.gz
with a PLINK table, both under jbrowse.org/demos/gwas/.
Public data sources
Public GWAS repositories use differing column layouts. A table with one position column loads as it is once bgzipped and tabix-indexed; the config guide has the preprocessing pipeline.
| Source | Notes |
|---|---|
| GWAS Catalog | Harmonized TSV; needs bgzip + tabix |
| Pan-UKB | bgzipped TSV; loads directly with scoreColumn: neglog10_pval_meta_hq |
| FinnGen | tabix-indexed TSV; loads with scoreColumn: mlogp |
| Open GWAS | VCF format; not directly compatible |
FinnGen writes chromosome X as 23, so the assembly's
refNameAliases must name it.
LD data
With an LD file loaded, the track colors points by r² to an index SNP, marking the nearby variants in linkage with the lead signal. JBrowse picks the index as described under Adding a GWAS track.
The embedded LocusZoom-style LD example runs this r² coloring live in a React app, over an LD triangle. The triangle is a separate track drawing r² between every pair of nearby variants as a heatmap, read from a PLINK LD file; the linkage disequilibrium tutorial builds one.
LD data must be a PLINK LD table, 1.9's .ld or 2.0's .vcor, bgzipped or not.
Generate it from:
- Your own cohort:
plink2 --r2-unphased --ld-window-kb 1000 --ld-window-r2 0, or 1.9'splink --r2 --ld-window 99999 --ld-window-kb 1000 --ld-window-r2 0(1.9 otherwise pairs each variant with only its next 9).1 - A reference panel: 1000 Genomes phase 3 at
ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/, subset to EUR, AFR, EAS, AMR or SAS. Pointbcftoolsat the.bcffiles undersupporting/bcf_files/; a remote region of the.vcf.gzbeside them fails with "Illegal seek".
Clumping the peak
A peak is one signal smeared across every variant in LD with the causal one.
plink2 --clump groups the variants by signal into clumps, each an index
variant plus the variants whose signal it accounts for. The clumps load as an
interval track under the Manhattan lane.
The reference panel is a region of 1000 Genomes, fetched over HTTP without downloading the file:
BCF=https://ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/supporting/bcf_files/ALL.chr16.phase3_shapeit2_mvncall_integrated_v5.20130502.genotypes.bcf
curl -fsSLO https://ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/integrated_call_samples_v3.20130502.ALL.panel
awk 'NR>1 && $3=="EUR"{print $1}' integrated_call_samples_v3.20130502.ALL.panel > eur.samples
# -r is a region request, so 900 kb costs 900 kb rather than the 450 MB chromosome
bcftools view -r 16:53400000-54300000 -S eur.samples -m2 -M2 -v snps \
-q 0.01:minor -Oz -o fto.vcf.gz "$BCF"
# --set-missing-var-ids is not optional: plink2 refuses a dataset where the ID
# '.' appears twice, and an unnamed variant is common in a reference panel
plink2 --vcf fto.vcf.gz --double-id --set-missing-var-ids @:# \
--rm-dup force-first --make-bed --out fto--clump then reads the summary statistics themselves. The columns are named
rather than positional, and --clump-log10 input-only tells plink2 the p-value
column is already -log10, as neg_log_pvalue is:
# plink2 reads the header, so the leading '#' on '#chrom' has to go
gzip -dc summary_stats.txt.gz | sed '1s/^#//' > stats.txt
plink2 --bfile fto --clump stats.txt --clump-log10 input-only \
--clump-p-field neg_log_pvalue --clump-id-field rsid \
--clump-log10-p1 7.3 --clump-log10-p2 2 --clump-r2 0.2 --clump-kb 500 --out fto
# clump to BED: SP2 names the members, and the .bim says where each one is, so
# the span is their lowest and highest position
awk 'NR==FNR{pos[$2]=$4; next} FNR>1 {n=split($11,m,","); lo=$2; hi=$2
for(i=1;i<=n;i++){p=pos[m[i]]; if(p){if(p<lo)lo=p; if(p>hi)hi=p}}
printf "%s\t%d\t%d\t%s (%d variants)\n", $1, lo-1, hi, $3, $5}' \
fto.bim fto.clumps | sort -k2,2n > clumps.bedOver the example file that gives three clumps at FTO, and the big one shows what
the peak is tagging: index rs1121980, 51 variants, spanning 51 kb of FTO's
first intron. Load clumps.bed through a
BedAdapter beside the GWAS track.
Adding a GWAS track
Open the track selector, click Add track, and give the GWAS file, plus its
tabix index unless it sits at <file>.tbi.
- A
.txt.gzor.txt.bgzopens as a GWAS track. For a.bed.gzor.tsv.gz, choose GWAS adapter under Adapter type, which offers it below the field. - Score column and Score transform name the column and how it maps onto
-log₁₀(p) (the
scoreColumnandscoreTransformslots). The dog selection tutorial plots an Fst column this way. - PLINK LD table (optional) takes a
.ldor.vcor, bgzipped or not. A bgzipped one gets a field for its tabix index.
With an LD table the track opens colored by r² to an index SNP. JBrowse picks the highest-scoring SNP on screen; right-click any point or use the track menu's LD submenu to change it.
See also
- Tutorial: Linkage disequilibrium
- Tutorial: QTL mapping (BXD mice)
- User guide: Quantitative track
- User guide: Variant track
- Config guide: GWAS track configuration
- Reference: GWASAdapter config schema
Notes
-
A table written with
--ld-snpholds r² to the SNPs it lists, so only those can be the index, and the track names them when another SNP is picked. ↩