53
Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of Public Health Department of Epidemiology Broad MIA Seminar, 3/9/16

Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Haplotype phasing in large cohorts: Modeling, search, or both?

Po-Ru Loh Harvard T.H. Chan School of Public Health

Department of Epidemiology

Broad MIA Seminar, 3/9/16

Page 2: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Overview

• Background: Haplotype phasing

• New long-range phasing method: Eagle – Results on N=150K UK Biobank samples – Algorithm overview

• Future directions GCCGCGTTAATTGGTGGTATCTCGGGTCGCCTCCCACTGGTAATTAATGGTGCGAACCCTACCTCTCCGTTATGTCTGGT TCTACGGTGAACGGTGGCCTCTAGTCTCGACAACCAGTAGAAATGAAAGGGGCCCACGCAATCCCACGTTTATGTCAGGT TTTGCTTGGAACGTTCGCCTCCAATGTAGACACCCTGGGGTAATTAATGTTGCGAACCCACTTTTACCTTACTGAAACGC TTCGCGGTGAACGGTCGCCGCCAAGCACGCCAACCACGAGTAATGAAAGGTGTGAAAGCTACTCTACGTTTCTATATCTT GCCACTTTAAATGGTCGTCTCCAAGGACGCCTCGCAGTGTAAATGAATGGTGTCAAAGCTCCCCCACGGAACTGTCACTC TCCGCTGTGAACGGTGGCAGCTCGGCACGCCACGCTCTATTGATTAATGTGGTCCAACCTACTTTACGGTACTGAATCGC TCCACGGGGATTGTTGGCAGCCAGTGACGCCACCCACGATAAATTAATGTTGCCCAACCTACCCCACCTATCTGTCAGTC GTCGCGTGGAACGTTCGTATCTCGGCACGCCAACCACGGTAGATGAATGGTGCGCAAGCACTCTCTCCGTAATGACTGTC TCCACTTGGAATGTTGGTCTCCAGTCAAGCCTCCCAGGAGTAATTAAAGTGGCGCAACCTATCTTACCTAACTATCACGC TTTGCTGGGAACGTTCGTAGCCCGGCTCGACAACCTGGGGTAATTAATGTTGCGAACCCACTTTTACCTTACTGTAAGTT

Page 3: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Humans have diploid genomes

• Pairs of chromosomes = Paternally-derived + Maternally-derived

Page 4: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Genotyping arrays combine paternal and maternal contributions

• Paternal haplotype: A C A T G G C

• Maternal haplotype: A T A T G G A

• Genotype calls (measured): AA CT AA TT GG GG AC

Page 5: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Problem: Phase information is lost!

• Paternal haplotype: A C A T G G C

• Maternal haplotype: A T A T G G A

• Genotype calls (measured): AA CT AA TT GG GG AC

• Haplotypes could have been: A C A T G G A + A T A T G G C

Page 6: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Problem: Phase information is lost!

• Paternal haplotype: A C A T G G C

• Maternal haplotype: A T A T G G A

• Genotype calls (measured): AA CT AA TT GG GG AC

• Haplotypes could have been: A C A T G G A + A T A T G G C Switch error!

Page 7: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Problem: Phase information is lost… and phase information is useful

• Uses of phased haplotypes: – Genotype imputation (e.g., for GWAS) – Population genetic analyses

• Identity-by-descent (IBD) detection • Demographic history inference

Marchini et al. 2007 Howie et al. 2012

Page 8: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Problem: Phase information is lost… and phase information is useful

So how can we recover it? (and how accurately can we do it?)

Page 9: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Problem: Phase information is lost… and phase information is useful

So how can we recover it? (and how accurately can we do it?)

Wet lab techniques exist, but they’re expensive

(e.g., long read sequencing, Hi-C)

Page 10: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Problem: Phase information is lost… and phase information is useful

So how can we recover it computationally?

(and how accurately can we do it?)

Teaser: It depends on your sample size,

but for N=150K UK samples…

We can phase chr20 perfectly(!) in ~20% of samples … and with ≤2 switches in >50% of samples

Page 11: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Problem: Phase information is lost… and phase information is useful

So how can we recover it computationally?

(and how accurately can we do it?)

Teaser: It depends on your sample size, but for N=150K UK samples…

We can phase chr20 perfectly(!) in ~20% of samples … and with ≤2 switches in >50% of samples

Page 12: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Phasing (for computer scientists)

? ? ? ? + ? ? ? ? 1 0 1 2

? ? ? ? ? ? ? ?

? ? ? ? ? ? ? ?

Question: Given a diploid genotype sequence, can we recover its parental haplotypes?

1 0 0 1 + 0 0 1 1 1 0 1 2

0 0 1 1 + 1 0 0 1 1 0 1 2

1 0 1 1 + 0 0 0 1 1 0 1 2 Binary encoding: Haploid 0=A, 1=G

(at A/G SNP) Diploid 0=AA, 1=AG, 2=GG

Page 13: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Trio phasing

? ? ? ? + ? ? ? ? 1 0 1 2

? ? ? ? + ? ? ? ? 2 0 1 1

? ? ? ? + ? ? ? ? 0 1 1 2

Question: Given a diploid genotype sequence and diploid parental genotypes, can we recover its parental haplotypes?

Page 14: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Trio phasing

? 0 ? 1 + ? 0 ? 1 1 0 1 2

1 0 ? ? + 1 0 ? ? 2 0 1 1

0 ? ? 1 + 0 ? ? 1 0 1 1 2

Answer: Yes (for the most part): 1. Fill in homozygous

sites

Page 15: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Trio phasing

0 0 ? 1 + 1 0 ? 1 1 0 1 2

1 0 ? ? + 1 0 ? 1 2 0 1 1

0 ? ? 1 + 0 0 ? 1 0 1 1 2

Answer: Yes (for the most part): 1. Fill in homozygous

sites 2. Propagate info…

Page 16: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Trio phasing

0 0 ? 1 + 1 0 ? 1 1 0 1 2

1 0 ? 0 + 1 0 ? 1 2 0 1 1

0 1 ? 1 + 0 0 ? 1 0 1 1 2

Answer: Yes (for the most part): 1. Fill in homozygous

sites 2. Propagate info…

until stuck

Page 17: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Trio phasing

0 0 ? 1 + 1 0 ? 1 1 0 1 2

1 0 ? 0 + 1 0 ? 1 2 0 1 1

0 1 ? 1 + 0 0 ? 1 0 1 1 2

Result: • Perfect phase* in child at sites

homozygous in ≥1 individual • Almost-perfect phase* in parents

(up to recombination) • No phase at all-het sites; need to use LD

from a panel of reference haplotypes

* up to genotype error + de novo mutation

Page 18: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Pedigree phasing

• Extension of trio phasing to extended families – Additional relatives =>

more Mendelian constraints (i.e., fewer all-het sites)

• MERLIN software (Abecasis et al. 2002 Nat Genet)

1 0 ? 0 + 0 0 ? 1 1 0 1 1

1 0 ? 1 + 0 0 ? 1 1 0 1 2

1 1 ? 0 + 1 0 ? 0 2 1 1 0

Page 19: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Statistical phasing

Question: Given a large number of diploid genotype sequences, can we recover their parental haplotypes? 01201021020102100210010101010020100101010010010201201020101001020120100010010120

02012010001001012012010210201021002100101010100201001010100100102012010201010010 01021002100101010100201001010100100102012010201010012010210021001010101002010010 01021020100210021001010101002010010101001001020120110010120120102102010210021011 02100210010101010020100101010010010201201021002100101010100201001010100100102011 10101001001020120102100210010101010020100101010010010201001020120102100210010210 01001010100100102012010201010012010210021001010101002100210010101010020100101110 00100102012011001012012010210201021002102100210010101010020100101010010010201201 02100101010100201001010100100102012010210021001010101002010012011001012012010211

Page 20: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Statistical phasing

Question: Given a large number of diploid genotype sequences, can we recover their parental haplotypes?

Answer: Yes, using linkage disequilibrium (LD) = statistical correlation between nearby sites

Page 21: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

General statistical phasing approach: Hidden Markov models (HMMs)

Answer: Various methods based on probabilistic modeling of population LD work well: • PHASE (Stephens et al.

2001 AJHG) • … • Beagle (Browning &

Browning 2007 AJHG) • HAPI-UR (Williams et al.

2012 AJHG) • SHAPEIT2 (Delaneau et

al. 2013 Nat Meth)

Page 22: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Limitation of existing methods: Accuracy

Answer: Various HMM-based methods work well… albeit not as well as pedigree-based methods: • 2-5% switch error rates on

N≈10K samples • Phase switches occur every

20-50 hets (~1-2 cM) • Accuracy improves with N

Williams et al. 2012 AJHG; Delaneau et al. 2013 Nat Meth

Page 23: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Limitation of existing methods: Speed

Answer: Various HMM-based methods work well… albeit not as well as pedigree-based methods… and much more slowly: • Several days to phase a

single chromosome for N=16K samples

Williams et al. 2012 AJHG HMMs are efficient,

but genomic data is big!

Page 24: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Long-range phasing (LRP)

• LRP method: Kong et al. 2008 Nat Genet – 35K of 316K Icelanders typed (11%)! – Identify local “surrogate parents” for each individual;

proceed as in trio phasing (fast!) – Yield: near-perfect phase calls at 90-95% of het sites

• LRP applications: ~25 subsequent papers in Nature or Nat Genet

Note: Diagram is an oversimplification; in practice, surrogate parents only match proband in sub-chromosomal segments identical-by-descent (IBD)

Page 25: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Challenge: Recombination breaks down IBD segments

• Shared segment lengths decrease exponentially with # of generations – LRP is easy with close relatives

… but hard otherwise

Sub-chromosomal segment

Page 26: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

HMM vs. LRP: Modeling vs. Search

accurate fast… and accurate at very large sample sizes

Key contrast

“Let’s build a great model!” “Let’s use lots of data!”

Page 27: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Predictions about LRP

• Kong et al. 2008: – “We speculate that having as little as 1% of a

population genotyped may be adequate for the method to yield useful results.”

• Browning & Browning 2011: – “It is likely that… IBD-based phasing can be

extended… by using more sensitive methods for detecting IBD and combining IBD-based phasing with population haplotype frequency models.”

Page 28: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Predictions about LRP

• Kong et al. 2008: – “We speculate that having as little as 1% of a

population genotyped may be adequate for the method to yield useful results.”

• Browning & Browning 2011: – “It is likely that… IBD-based phasing can be

extended… by using more sensitive methods for detecting IBD and combining IBD-based phasing with population haplotype frequency models.”

Realization of

(beyond Iceland)

0.2%, in fact!

Yes!

Yes!

• Loh, Palamara & Price 2016 Nat Genet (in press)

Page 29: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Overview

• Background: Haplotype phasing

• New long-range phasing method: Eagle – Results on N=150K UK Biobank samples – Algorithm overview

• Future directions GCCGCGTTAATTGGTGGTATCTCGGGTCGCCTCCCACTGGTAATTAATGGTGCGAACCCTACCTCTCCGTTATGTCTGGT TCTACGGTGAACGGTGGCCTCTAGTCTCGACAACCAGTAGAAATGAAAGGGGCCCACGCAATCCCACGTTTATGTCAGGT TTTGCTTGGAACGTTCGCCTCCAATGTAGACACCCTGGGGTAATTAATGTTGCGAACCCACTTTTACCTTACTGAAACGC TTCGCGGTGAACGGTCGCCGCCAAGCACGCCAACCACGAGTAATGAAAGGTGTGAAAGCTACTCTACGTTTCTATATCTT GCCACTTTAAATGGTCGTCTCCAAGGACGCCTCGCAGTGTAAATGAATGGTGTCAAAGCTCCCCCACGGAACTGTCACTC TCCGCTGTGAACGGTGGCAGCTCGGCACGCCACGCTCTATTGATTAATGTGGTCCAACCTACTTTACGGTACTGAATCGC TCCACGGGGATTGTTGGCAGCCAGTGACGCCACCCACGATAAATTAATGTTGCCCAACCTACCCCACCTATCTGTCAGTC GTCGCGTGGAACGTTCGTATCTCGGCACGCCAACCACGGTAGATGAATGGTGCGCAAGCACTCTCTCCGTAATGACTGTC TCCACTTGGAATGTTGGTCTCCAGTCAAGCCTCCCAGGAGTAATTAAAGTGGCGCAACCTATCTTACCTAACTATCACGC TTTGCTGGGAACGTTCGTAGCCCGGCTCGACAACCTGGGGTAATTAATGTTGCGAACCCACTTTTACCTTACTGTAAGTT

Page 30: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

New LRP hybrid method: Eagle

A. Rapidly identify long (>4cM) IBD segments => make initial phase calls

B. Run two iterations of HMM-based phasing

GCCGCGTTAATTGGTGGTATCTCGGGTCGCCTCCCACTGGTAATTAATGGTGCGAACCCTACCTCTCCGTTATGTCTGGT TCTACGGTGAACGGTGGCCTCTAGTCTCGACAACCAGTAGAAATGAAAGGGGCCCACGCAATCCCACGTTTATGTCAGGT TTTGCTTGGAACGTTCGCCTCCAATGTAGACACCCTGGGGTAATTAATGTTGCGAACCCACTTTTACCTTACTGAAACGC TTCGCGGTGAACGGTCGCCGCCAAGCACGCCAACCACGAGTAATGAAAGGTGTGAAAGCTACTCTACGTTTCTATATCTT GCCACTTTAAATGGTCGTCTCCAAGGACGCCTCGCAGTGTAAATGAATGGTGTCAAAGCTCCCCCACGGAACTGTCACTC TCCGCTGTGAACGGTGGCAGCTCGGCACGCCACGCTCTATTGATTAATGTGGTCCAACCTACTTTACGGTACTGAATCGC TCCACGGGGATTGTTGGCAGCCAGTGACGCCACCCACGATAAATTAATGTTGCCCAACCTACCCCACCTATCTGTCAGTC GTCGCGTGGAACGTTCGTATCTCGGCACGCCAACCACGGTAGATGAATGGTGCGCAAGCACTCTCTCCGTAATGACTGTC TCCACTTGGAATGTTGGTCTCCAGTCAAGCCTCCCAGGAGTAATTAAAGTGGCGCAACCTATCTTACCTAACTATCACGC TTTGCTGGGAACGTTCGTAGCCCGGCTCGACAACCTGGGGTAATTAATGTTGCGAACCCACTTTTACCTTACTGTAAGTT

Note: 4cM = common ancestor ~12 generations ago!

Page 31: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

New data: UK Biobank (N=150K interim release)

• Samples: – N=150K ≈ 0.2% of British population – 94% ‘White’ ethnicity

• 88% British + 3% Irish + 3% Other

– 72 trios (70 white) • Allows benchmarking!

• Markers: – M=650K autosomal SNPs after QC

Page 32: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

15K 50K 150K

100

102

104

Sample size (N)

Run

tim

e (h

ours

)

BeagleSHAPEIT2HAPI-UREagle

15K 50K 150K

100

101

102

Sample size (N)

Mem

ory

(GB

)

BeagleHAPI-URSHAPEIT2Eagle

Computational performance: Eagle achieves ~14x speedup, ~3x less RAM

• Benchmark: 6K SNPs ≈ 1% of genome • Hardware: up to 10 cores of a Xeon L5640

Page 33: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Benchmarking phase accuracy

• Switch error: transition between following paternal haplotype vs. maternal haplotype

• Switch error rate = (# errors) / (# hets – 1)

0 20 40Genetic position (cM)

Sam

ples

Blue = matches paternal Red = matches maternal (from trio phasing)

Each row: Haplotype produced by algorithm

Page 34: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Accuracy: Eagle achieves 0.3% switch error rate at N=150K

• Benchmark: – First 40cM of chr10

(~6K SNPs) – Trio parents removed – Phase accuracy

evaluated on 70 trio children (at trio-phased hets)

• 0.3% error rate ≈ 1 switch per 13cM

• 2/3 of Eagle and SHAPEIT2 switch errors for N=150K are minor (1-3 SNPs): ≈ 1 major switch / 40cM

15K 50K 150K0

0.5

1

1.5

2

2.5

Sample size (N)

Sw

itch

erro

r rat

e (%

)

HAPI-URBeagleEagleSHAPEIT2

Large markers + solid lines: Methods that can phase 150K samples genome-wide in <200 node days

Page 35: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Eagle achieves ~4x lower error than other genome-wide tractable methods

Method Run time (12% of genome) Switch error rate

Eagle 1x150K 7.9 days 0.31%

SHAPEIT2 10x15K 24.4 days 1.35%

HAPI-UR 10x15K 15.8 days 2.20%

• Chromosome-scale analyses: chr1 (short arm), chr10, chr20 • Methods:

– Eagle, 1 batch of all 150K samples – SHAPEIT2 and HAPI-UR, 10 batches of 15K samples

• Batching is necessary due to computational cost • Hardware: up to 10 cores of a Xeon L5640

Page 36: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

0 20 40

Sam

ples

Step 1: Direct IBD-based phasing

0 20 40

Sam

ples

Step 2: Local phase refinement

0 20 40Genetic position (cM)

Sam

ples

Step 3a: HMM iteration 1

0 20 40Genetic position (cM)

Sam

ples

Step 3b: HMM iteration 2

Algorithm overview

1. Detect long matching segments (>4cM IBD); call initial phase

2. Locally refine phase in shorter segments (~1cM IBD/IBS)

3. Run two approximate HMM iterations

Page 37: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

0 20 40Genetic position (cM)

Sam

ples

Step 1: Direct IBD-based phasing

• Input: Diploid {0,1,2} data for N samples • Procedure:

– Find pairs of diploid segments that share 1 haplotype IBD – Combine IBD info to make phase calls

• Output: Accurate phase in long chunks of each sample (wherever IBD exists) = Haploid {0,1} reference panel of 2N haplotypes

Step 1: Rapidly search for long diploid matches (>4cM IBD); make initial phase calls

00010000110110001001010010001001010010010010010101000010001001000100100001010001 10001010100000010000010100010000100001010010100001010100111010100100010001010010 01000101010000010100011001100100000010010100101110001000000100100010100001001110 00001010010001010101111010000100001001100000010001000001001001000010010100001011 00100010010010010010101001000101010010000010010010101110010000100101010000010010 01010010101010010001001001001000110000101000001001001000100000100101100100100101 01010001010000100001000101100000001010000010100000100001010000000101010101010000 00100000010010000100100000100100000010000100000000101010000000100101000000001001 00101000100000100000100100000100001010000100100000010000101010000001001011000001 01010000000100001001100001000000101010010100101110001000000100100010100100001000

Page 38: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Finding IBD in diploid data

• If two diploid segments share a haplotype, they can’t have opposite homozygous sites (0 vs. 2)

• Basic idea: Scan all pairs of samples for long segments with no opposite homozygotes – 𝑂 𝑀𝑁2 time (N=#samples, M=#markers), but very

small constant factor via bit arithmetic Henn et al. 2012 PLOS ONE

01010002011000100200000101001102000 00120021002010000101001200000110011

Possible haplotype sharing

Page 39: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Finding IBD in diploid data

• Basic idea: Scan all pairs of samples for long segments with no opposite homozygotes

• Problem: Lots of false positives! • Solution:

– Consider allele frequencies and LD information => likelihood ratio score (IBD vs. chance)

– Check overlapping regions for consistency (i.e., existence of maternal/paternal bicoloring); trust longer regions

01010002011000100200000101001102000 00120021002010000101001200000110011

Possible haplotype sharing

Page 40: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

End of step 1: Some good chunks, some bad chunks

• We've used long IBD – Phasing is great where >4cM IBD (detectable in diploids) exists

• How can we use shorter IBD?

0 20 40Genetic position (cM)

Sam

ples

Step 1: Direct IBD-based phasing

Page 41: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

0 20 40Genetic position (cM)

Sam

ples

Step 2: Local phase refinement

Step 2: Locally refine phase using dip=hap1+hap2 constraint

• Input: Diploid {0,1,2} data for N samples + Haploid {0,1} provisional phasing (step 1)

• Procedure (for each sample in turn): – Find long segments of provisional {0,1}-haplotypes

consistent with {0,1,2} diploid sample – In overlapping ~1cM windows,

check existence of implied complementary haplotype: hap2 = dip – hap1

• Output: Improved phase calls (switch error rate ~1.5%)

Page 42: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Using the dip=hap1+hap2 constraint

• Input: Diploid {0,1,2} data for N samples + Haploid {0,1} provisional phasing: 2N haplotypes

• Find long segments of provisional {0,1}-haplotypes

consistent with {0,1,2} diploid sample – Need fast, error-tolerant search – Locality-sensitive hashing (LSH) overcomes “curse of

dimensionality” (work by Indyk, Motwani, et al.) • Idea: multiple random hashes

??????????????????????????????????? (hap2) + 00010011001000000100000100000101000 (hap1) 00122021002010000101001200000110011 (dip)

Possible haplotype sharing

Page 43: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Using the dip=hap1+hap2 constraint

• Input: Diploid {0,1,2} data for N samples + Haploid {0,1} provisional phasing: 2N haplotypes

• Does the implied haplotype (hap2 = dip – hap1) exist

among the provisional haplotypes? – Need fast, error-tolerant search – Locality-sensitive hashing (LSH) overcomes “curse of

dimensionality” (work by Indyk, Motwani, et al.) • Idea: multiple random hashes

?????01000101000000100110000001???? (hap2) + 00010011001000000100000100000101000 (hap1) 00122021002010000101001200000110011 (dip)

Possible haplotype sharing

Page 44: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

End of step 2: Mostly good chunks; sporadic errors

• We've used long+short IBD • How can we refine the inference?

0 20 40Genetic position (cM)

Sam

ples

Step 2: Local phase refinement

Page 45: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

0 20 40Genetic position (cM)

Sam

ples

Step 3a: HMM iteration 1

0 20 40Genetic position (cM)

Sam

ples

Step 3b: HMM iteration 2

Step 3: Run two HMM-like iterations • Input: Diploid {0,1,2} data for N samples

+ Haploid {0,1} provisional phasing (step 2) • Procedure (for each sample in turn):

– Build small sets of locally best reference haplotypes – Find approximate max-likelihood (Viterbi) path

• Instead of full dynamic programming, use beam search: branch and prune

Page 46: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

LRP vs. HMM-based phasing

• LRP: “top-down” – Search for long stretches of IBD;

use homozygous sites to call phase – Don’t worry about all-het sites; clean up later

• HMM: “bottom-up” – Model haplotype structure – Get short-range phasing right first; then improve

phase accuracy at longer scales – Well-engineered HMMs (SHAPEIT2)

implicitly make use of long IBD • O’Connell et al. 2014 PLOS Genet

Page 47: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

HMM vs. LRP: Modeling vs. Search

accurate fast… and accurate at very large sample sizes

Future direction: Best of both worlds?

• How about both? • Positional Burrows-Wheeler Transform (PBWT, Durbin 2014):

efficient data structure for haplotype storage/search

Page 48: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Eagle-PBWT (work in progress)

001000010100101000101110010001 010010100100100100011010010010 … 000100100100000100100100010000

0 1

0 1 0

0 1 0 0 1

. . .

. . .

. . . Series of haplotype trees

M

N

• 𝑂 𝑀𝑁 time to build complete set of trees!

• 𝑂 1 time to move along a haplotype prefix!

Page 49: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Other future directions

• Reference-based phasing – Haplotype Reference Consortium (HRC) has N=32K

samples for phasing + imputation • Applications of high-accuracy phasing

– Detecting allele-specific expression – Detecting clonal mosaicism – Inferring demography

Page 50: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Acknowledgments • Alkes Price • Pier Francesco Palamara • Gaurav Bhatia • Sasha Gusev • Mark Lipson • Bogdan Pasaniuc • Nick Patterson • Noah Zaitlen

Eagle software: http://hsph.harvard.edu/alkes-price/software/ Loh et al. 2016 Nat Genet (in press)

Page 51: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

In-sample imputation accuracy: 𝑅2 ≥ 0.75 down to 0.1% MAF

• Benchmark: – First 40cM of chr10

(~6K SNPs) – 2% of genotypes

randomly masked and imputed

– In-sample imputation 𝑅2 measured on 120K British-ancestry samples

• Note: Eagle and SHAPEIT2 hard-call imputed haplotypes; dosages allow higher 𝑅2

0.4

0.5

0.6

0.7

0.8

0.9

1

MAF bin (%)

Mea

n in

-sam

ple

impu

tatio

n R

2

0.1-0.

2

0.2-0.

50.5

-1 1-2 2-5 5-10

10-50

Eagle 1x150KSHAPEIT2 1x150KSHAPEIT2 3x50KSHAPEIT2 10x15K

Page 52: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

In-sample imputation accuracy remains high for non-British samples

• Benchmark: – First 40cM of chr10

(~6K SNPs) – 2% of genotypes

randomly masked and imputed

– In-sample imputation 𝑅2 stratified by self-reported ancestry (including minority populations):

• 5K “any other white” • 1K Indian • 1K Caribbean

0.65

0.7

0.75

0.8

0.85

0.9

0.95

1

MAF bin (%)

Mea

n in

-sam

ple

impu

tatio

n R

2

0.1-0.

2

0.2-0.

50.5

-1 1-2 2-5 5-10

10-50

BritishotherWhiteIndianCaribbean

Page 53: Haplotype phasing in large cohorts: Modeling, search, or both?...2016/03/09  · Haplotype phasing in large cohorts: Modeling, search, or both? Po-Ru Loh Harvard T.H. Chan School of

Eagle pre-phasing improves downstream imputation accuracy

MAF bin SHAPEIT2 10x15K Eagle 1x150K Difference 0.1–0.2% 0.574 (0.012) 0.594 (0.012) 0.020 (0.002) 0.2–0.5% 0.665 (0.010) 0.679 (0.010) 0.013 (0.002) 0.5–1% 0.753 (0.009) 0.765 (0.009) 0.012 (0.001) 1–2% 0.786 (0.008) 0.798 (0.008) 0.012 (0.001) 2–5% 0.812 (0.007) 0.822 (0.007) 0.010 (0.001)

5–10% 0.881 (0.007) 0.888 (0.006) 0.007 (0.000) 10–50% 0.924 (0.004) 0.928 (0.004) 0.004 (0.000)

• Chromosome-scale analyses: chr1 (short arm), chr10, chr20 • Pre-phasing:

– Eagle, 1 batch of all 150K samples – SHAPEIT2, 10 batches of 10K samples (due to computational cost)

• Imputation: Haplotype Reference Consortium (r1) – PBWT imputation algorithm on Sanger Imputation Service