Haplotype analysis

Shaun Purcell

spurcell@pngu.mgh.harvard.edu

MGH, Boston

Overview

What are haplotypes?

Recombination and linkage disequilibrium

How do we measure haplotypes?

Estimating haplotype phase and frequency

How can we use haplotypes to map causal variants?

Haplotype-based association analysis

What is association?

Categorical traits

disease susceptibility genes

Continuous traits

quantitative trait loci, QTL

Linkage disequilibrium mapping

Genotyped markers

Linkage disequilibrium mapping

QTL

Genotyped markers

Linkage disequilibrium mapping

Genotyped markers

Ungenotyped markers

QTL

Recombination

Paternal chromosome

Maternal chromosome

Homologous chromosomes in one parent

Recombination event

during meiosis

Recombinant gamete transmitted,

harboring mutation

Paternal chromosome

Maternal chromosome

Homologous chromosomes in one parent

No recombination event

during meiosis

Nonrecombinant gamete transmitted,

not harboring mutation

Linkage: affected sib pairs

Paternal chromosome

Maternal chromosome

First affected offspring,

no recombination

Second affected offspring,

recombinant gamete

IBD sharing from this one parent (0 or 1)

1

0

Mutation occurs on a ‘red’ chromosome

Mutation occurs on a ‘red’ chromosome

Association due to `linkage disequilibrium’

A	a

M	aM

m	am

This individual has aa and Mm genotypes

and am and aM haplotypes

Haplotypes

A	a

M	AM	aM

m	am

This individual has Aa and Mm genotype

and AM and am haplotypes…

A	a

M	AM	aM

m	am

This individual has Aa and Mm genotype

and AM and am haplotypes… but given only genotype data,

consistent with Am/aM as well as AM/am

A	a

M	AM	aM

m	Am	am

This individual has AA and Mm genotypes	and AM and Am haplotypes

Haplotype analysis

Estimate haplotypes from genotypes

Associate haplotypes with trait

Haplotype	Freq.	Odds Ratio

AAGG	40%	1.00*

AAGT	30%	2.21

CGCG	25%	1.07

AGCT	5%	0.92

* baseline, fixed to 1.00

Measuring haplotypes

Expectation – Maximisation algorithm

Applicable in situations where there are more categories than can be distinguished

i.e. ‘incomplete data problems’

Complete data = ( Observed data , Missing data )

Haplotype data = ( Genotype data , Phase data )

Measuring haplotypes

Genotypes	Haplotypes

A/A B/b C/c	ABC / Abc

or Phases

ABc / AbC

E-M algorithm

1. Guess haplotype frequencies

2. (E) Use those frequencies to replace ambiguous genotypes with fractional haplotype counts

3. (M) Estimate frequency of each haplotype by counting

4. Repeat (2) and (3) until convergence

Dataset to be phased

4 individuals genotyped for 2 diallelic markers

ID1	A/A	B/B

ID2	A/a	b/b

ID3	A/a	B/b

ID4	a/a	b/b

Dataset to be phased

4 individuals genotyped for 2 diallelic markers

ID1	A/A	B/B	AB / AB

ID2	A/a	b/b	Ab / ab

ID3	A/a	B/b	AB / ab ? Ab / aB

ID4	a/a	b/b	ab / ab

E-step

Replace ambiguous A/a B/b genotype with :

AB / ab :

Ab / aB :

E-step

PAB = 0.25

PaB = 0.25

PAb = 0.25

Pab = 0.25

Replace ambiguous A/a B/b genotype with :

AB / ab : 2 × PAB × Pab

Ab / aB : 2 × PAb × PaB

E-step

PAB = 0.25

PaB = 0.25

PAb = 0.25

Pab = 0.25

Replace ambiguous A/a B/b genotype with :

AB / ab : 2 × PAB × Pab	= 2 × 0.25 × 0.25 = 0.125

Ab / aB : 2 × PAb × PaB = 2 × 0.25 × 0.25 = 0.125

= 0.125/(0.125+0.125) = 0.50

= 0.125/(0.125+0.125) = 0.50

E-step

Incomplete data	Complete data	Count

A/A	B/B	AB / AB	1.00

A/a	b/b	Ab / ab	1.00

A/a	B/b	AB / ab	0.50

Ab / aB	0.50

a/a	b/b	ab / ab	1.00

M-step

Incomplete data	Complete data	Count

A/A	B/B	AB / AB	1.00

A/a	b/b	Ab / ab	1.00

A/a	B/b	AB / ab	0.50

Ab / aB	0.50

a/a	b/b	ab / ab	1.00

Counting AB haplotype = 2 × 1 + 1 × 0.5 = 2.5

M-step

Incomplete data	Complete data	Count

A/A	B/B	AB / AB	1.00

A/a	b/b	Ab / ab	1.00

A/a	B/b	AB / ab	0.50

Ab / aB	0.50

a/a	b/b	ab / ab	1.00

Counting aB haplotype = 1 × 0.5 = 0.5

M-step

Incomplete data	Complete data	Count

A/A	B/B	AB / AB	1.00

A/a	b/b	Ab / ab	1.00

A/a	B/b	AB / ab	0.50

Ab / aB	0.50

a/a	b/b	ab / ab	1.00

Counting Ab haplotype = 1 × 1 + 1 × 0.5 = 1.5

M-step

Incomplete data	Complete data	Count

A/A	B/B	AB / AB	1.00

A/a	b/b	Ab / ab	1.00

A/a	B/b	AB / ab	0.50

Ab / aB	0.50

a/a	b/b	ab / ab	1.00

Counting ab haplotype = 1 × 1 + 1 × 0.5 + 2 × 1 = 3.5

M-step

Haplotype counts, frequencies from complete data

Count	Freq

AB	2.5	0.3125

aB	0.5	0.0625

Ab	1.5	0.1875

ab	3.5	0.4375

Sum	8.0	1.0000

back to the E-step….

PAB = 0.25

PaB = 0.25

PAb = 0.25

Pab = 0.25

PAB = 0.3125

PaB = 0.0625

PAb = 0.1875

Pab = 0.4375

are now replaced with

the updated estimates

back to the E-step….

Replace ambiguous A/a B/b genotype with :

AB / ab : 2 × PAB × Pab	= 2 × 0.3125 × 0.4375 = 0.273

Ab / aB : 2 × PAb × PaB = 2 × 0.1875 × 0.0625 = 0.023

= 0.023/(0.273+0.023) = 0.08

= 0.273/(0.273+0.023) = 0.92

PAB = 0.25

PaB = 0.25

PAb = 0.25

Pab = 0.25

PAB = 0.3125

PaB = 0.0625

PAb = 0.1875

Pab = 0.4375

are now replaced with

the updated estimates

back to the M-step…

Incomplete data	Complete data	Count

A/A	B/B	AB / AB	1.00

A/a	b/b	Ab / ab	1.00

A/a	B/b	AB / ab	0.92

Ab / aB	0.08

a/a	b/b	ab / ab	1.00

Counting AB haplotype = 2 × 1 + 1 × 0.92 = 2.92

back to the M-step…

Incomplete data	Complete data	Count

A/A	B/B	AB / AB	1.00

A/a	b/b	Ab / ab	1.00

A/a	B/b	AB / ab	0.92

Ab / aB	0.08

a/a	b/b	ab / ab	1.00

Counting aB haplotype = 1 × 0.08 = 0.08

back to the M-step…

Incomplete data	Complete data	Count

A/A	B/B	AB / AB	1.00

A/a	b/b	Ab / ab	1.00

A/a	B/b	AB / ab	0.92

Ab / aB	0.08

a/a	b/b	ab / ab	1.00

Counting Ab haplotype = 1 × 1 + 1 × 0.08 = 1.08

back to the M-step…

Incomplete data	Complete data	Count

A/A	B/B	AB / AB	1.00

A/a	b/b	Ab / ab	1.00

A/a	B/b	AB / ab	0.92

Ab / aB	0.08

a/a	b/b	ab / ab	1.00

Counting ab haplotype = 1 × 1 + 1 × 0.92 + 2 × 1 = 3.92

back to the M-step…

Haplotype counts, frequencies from complete data

Count	Freq

AA	2.92	0.365

aB	0.08	0.010

Ab	1.08	0.135

ab	3.92	0.490

Sum	8.0	1.0000

and back, again, to the E-step…

and back, again, to the M-step…

and back, again, to the E-step…

and back, again, to the M-step…

and back, again, to the E-step…

and back, again, to the M-step…

……

Haplotype frequency estimates

AB	aB	Ab	ab

i0	0.250	0.250	0.250	0.250

i1	0.315	0.0625	0.1875	0.4375.

i2	0.365	0.010	0.135	0.490

…	…	…	…	…

iN	0.375	0.000	0.125	0.500

Posterior probabilities

Genotype	Phase	P(H|G)

A/A	B/B	AB / AB	1.00

A/a	b/b	Ab / ab	1.00

A/a	B/b	AB / ab	1.00

Ab / aB	0.00

a/a	b/b	ab / ab	1.00

Missing genotype data

A/A 0/0 c/c consistent with 3 phases

Phase	P(H|G)

ABc / ABc	( PABc × PABc ) / S

ABc / Abc	( 2 × PABc × PAbc ) / S

Abc / Abc	( PAbc × PAbc ) / S

where S = PABc × PABc + 2 × PABc × PAbc + PAbc × PAbc

Using parental genotypes

Can often help to resolve phase

A/a B/b C/c

Using parental genotypes

Can often help to resolve phase

A/A B/B C/c a/a b/b c/c

A/a B/b C/c

Using parental genotypes

Can often help to resolve phase

A/A B/B C/c a/a b/b c/c

A/a B/b C/c

ABC / abc

Using parental genotypes

Can often help to resolve phase

A/A B/B C/c a/a b/b c/c

A/a B/b C/c

… but not always

A/a B/b C/c A/a B/b c/c

A/a B/b C/c

ABC / abc

A (slightly) less trivial example

1	1 1	1 2	1 2

2	1 2	1 1	1 2

3	2 2	1 1	1 2

4	1 2	1 2	1 1

5	1 2	1 1	1 2

6	1 1	2 2	2 2

7	1 2	1 1	2 2

8	2 2	1 1	1 1

9	1 2	1 2	2 2

10	2 2	2 2	2 2

?

?

211 / 212

?

?

122 / 122

112 / 212

211 / 211

?

222 / 222

haplotype frequencies

E-M iteration

Estimated

haplotype

frequency

log-likelihood

Haplotype frequencies

H	P(H)

211	0.299996

112 0.235391

222 0.135402

122 0.114604

212 0.114602

121 0.099994

111 0.000010

221 0.000000

ID chr Hap P(H|G)

1	1	111 0.0001234

1	2	122 0.0001234

1	1	112 0.9998766

1	2	121 0.9998766

2	1	111 0.0000411

2	2	212 0.0000411

2	1	112 0.9999589

2	2	211 0.9999589

3	1	211 1.0000000

3	2	212 1.0000000

4	1	111 0.0000000

4	2	221 0.0000000

4	1	121 1.0000000

4	2	211 1.0000000

5	1	111 0.0000411

5	2	212 0.0000411

5	1	112 0.9999589

5	2	211 0.9999589

ID chr Hap P(H|G)

6	1	122 1.0000000

6	2	122 1.0000000

7	1	112 1.0000000

7	2	212 1.0000000

8	1	211 1.0000000

8	2	211 1.0000000

9	1	112 0.7080343

9	2	222 0.7080343

9	1	122 0.2919657

9	2	212 0.2919657

10	1	222 1.0000000

10	2	222 1.0000000

A (slightly) less trivial example

1	1 1	1 2	1 2

2	1 2	1 1	1 2

3	2 2	1 1	1 2

4	1 2	1 2	1 1

5	1 2	1 1	1 2

6	1 1	2 2	2 2

7	1 2	1 1	2 2

8	2 2	1 1	1 1

9	1 2	1 2	2 2

10	2 2	2 2	2 2

112 / 121

112 / 211

211 / 212

121 / 211

112 / 211

122 / 122

112 / 212

211 / 211

112 / 222 ? 122 / 212

222 / 222

But it's not always this easy...

For m SNPs there are…

2m possible haplotypes

2m-1 (2m+1) possible haplotype pairs

For m = 10 then

1,024 possible haplotypes

524, 800 possible haplotype pairs

Linkage equilibrium

A	a

M	pr	ps	p

m	qr	qs	q

r	s

Linkage disequilibrium

A	a

M	pr + D	ps - D	p

m	qr - D	qs + D	q

r	s

DMAX = Min(qs, pr)

D’ = D /DMAX e.g D = P(AM) - P(A)P(M)

r2 = D2 / pqrs

Practical sessions

Visualising data and testing for association in Haploview

Detecting haplotpe association using whap

Fitting nested model to explore the association using whap

Practical 1 : Haploview

Folder F:\pshaun\haplotype\

Pedigree format: data1234.ped

Case/control sample (N=200+200)

Load data into Haploview

Examine LD and block structure

Examine single SNP association

Examine haplotype-based association

Sample files

data1234.ped

1_A 1 0 0 1 2 A A C C C A G G C C

2_A 1 0 0 1 2 A A A C C A T G A C

...

1_B 1 0 0 1 1 C C C C C C G G A A

2_B 1 0 0 1 1 A C C C A C G G C A

...

dataACGT.ped

1_A 1 0 0 1 2 1 1 2 2 2 1 3 3 2 2

...

dataACGT.dat

dataACGT.map

A disease

M snp1

M snp2

M snp3

M snp4

M snp5

1 snp1 0 1

1 snp2 0 2

1 snp3 0 3

1 snp4 0 4

1 snp5 0 5

pedstats -p data1234.ped -d data1234.dat

LD, block structure

Based on default “Gabriel blocks”

Single SNP association

Block-based haplotype tests

The true model

General population haplotype frequencies

ACAGC 0.25

CCCGC 0.25

CCCGA 0.20

AAATA 0.20

AACTA 0.05	Increases risk for disease

ACCGC 0.05

AAATA

ACAGC

CCCGA

CCCGC

AACTA

ACCGC

AA A TA

AC A GC

CC C GA

CC C GC

AA C TA

AC C GC

CC GA

AC GC

AA TA

Implied from block definitions

True model

Significantly associated with increased risk

Significantly associated with decreased risk

Manually specifying the 'block'

Results with 5-SNP block

whap

Numerous recent methods using GLM approach

Schaid et al (02) AJHG

Zaykin et al (02) Hum Hered

Seltman et al (03) Genet Epi

Quantitative and qualitative traits

Mixture of regressions framework

Between/within family model

Model either L(X|G) or L(G|X)

Independent secondary test, 1 df

Flexible specification of nested submodels

Single locus analysis

Fulker et al (1999)

1

1

1

S1

-1

0

1

S2

B-W

B+W

1

0

aa

AA

B-W

B+W

0.5

0.5

Aa

AA

B-W

B+W

0

1

AA

AA

S2

S1

W

B

S2

S1

Note : W = S1 – B

Parental genotypes

Use parental genotypes to generate B

Examples

AA from AAxAA	W = 0

Aa from AAxAa	W = -0.5

Aa from AaxAa	W = 0

0.5

0

1

-1

-0.5

0

-0.5

0

0.5

0

1

B

1

0

0

0

-1

0

1

-1

0

-1

-1

-1

-1

1

1

1

Pat

Mat

Available tests

X ~ N( bB + wW , δ2 )

Basic test

HA : b = w

H0 : b = w = 0

Robust test

HA : b, w

H0 : b , w = 0

Test for stratification

HA : b, w

H0 : b = w

Robust test (2)

HA : b = 0, w

H0 : b = w = 0

Analysis of selected samples

Conditioning on trait values

Model likelihood of observing genotype conditional on trait value

Singletons:

G = { AA, Aa, aa }

Pairs:

G = { AA/AA, AA/Aa, AA/aa, … }

With parents:

G = { AA | AAxAA, AA | AAxAa, … }

G = { AA/AA | AAxAA, AA/AA | AAxAa, … }

Robust in selected samples

Type I error rates

Sib pairs

10% extreme selection

Within sibship test

5.0

13.8

Parents

5.3

26.7

No parents

Selected sample

5.0

5.2

Parents

5.4

5.4

No parents

Full sample

L(G|X)

L(X|G)

Extension to haplotype analysis

Probabilistic haplotype reconstruction via E-M algorithm

AA BB cc Dd

AA Bb cc Dd

ABcD / ABcd P(P1) = 1.00

ABcD / Abcd P(P1) = 0.85

ABcd / AbcD P(P2) = 0.15

Weighted likelihood

Individual i has G consistent phases

Estimated via E-M algorithm

Quantitative & qualitative traits

Quantitative traits

Qualitative traits

B [phase x haplotype] matrix of scores

 [haplotype x 1] vector of regression coefficients

c is a constant

Example B matrix

Individual i

Genotypes:

1/1 1/1 1/1

111 / 111 P() = 1.0

Haplotypes:

1

1

1

1

2

1

1

2

2

2

2

2

1

1

2

2

2

1

2

0

0

0

0

0

g =

b1

b2

b3

b4

b5

b6

=

2b1

1.0

L(G=g) =

B matrix

Vector of

regression coefficients

Example B matrix

Individual j

Genotypes:

1/1 1/2 1/2

112 / 121 P() = 0.8

111 / 122 P() = 0.2

Haplotypes:

1

1

1

1

2

1

1

2

2

2

2

2

1

1

2

2

2

1

0

1

1

0

0

1

0

0

1

0

0

0

g =

b1

b2

b3

b4

b5

b6

=

b2 + b5

b1 + b3

0.8

0.2

L(G=g) =

Testing nested hypotheses

1

1

1

1

2

1

1

2

2

2

2

2

1

1

2

2

2

1

0

1

1

0

0

1

0

0

1

0

0

0

g =

c1

c2

c2

c3

c1

c3

=

c2 + c1

c1 + c2

Test effect of a locus conditional on haplotype background. e.g. drop the 3rd locus

b1 = b5

b2 = b3

b4 = b6

Parental genotypes

Phase parental genotypes via E-M

Parental phase P(PP,M)= P(PP)× P(PM)

For each PP,M enumerate offspring phases, PC consistent with GC

Calculate P(PC | PP,M)

Can allow for recombination

Weighted likelihood over all PP,M and PC

Between/within partitioning

1/1 1/2 1/2

1/1 0/0 2/2

1/1 2/2 2/2

122\111 X 112\122 => 122\122

122\111 X 122\112 => 122\122

122\111 X 122\122 => 122\122

=> 122\122

111\122 X 112\122 => 122\122

111\122 X 122\112 => 122\122

111\122 X 122\122 => 122\122

=> 122\122

[ 0.000 0.000 0.000 0.000 0.000 2.000 0.000 ]

Offspring matrix

Seven haplotypes > 1%

212 111 211 112

222 122 121

[ 0.000 0.500 0.000 0.500 0.000 1.000 0.000 ]

[ 0.000 0.500 0.000 0.500 0.000 1.000 0.000 ]

[ 0.000 0.500 0.000 0.000 0.000 1.500 0.000 ]

[ 0.000 0.500 0.000 0.000 0.000 1.500 0.000 ]

[ 0.000 0.500 0.000 0.500 0.000 1.000 0.000 ]

[ 0.000 0.500 0.000 0.500 0.000 1.000 0.000 ]

[ 0.000 0.500 0.000 0.000 0.000 1.500 0.000 ]

[ 0.000 0.500 0.000 0.000 0.000 1.500 0.000 ]

212 111 211 112 222 122 121

B

[ 0.000 -0.500 0.000 -0.500 0.000 1.000 0.000 ]

[ 0.000 -0.500 0.000 -0.500 0.000 1.000 0.000 ]

[ 0.000 -0.500 0.000 0.000 0.000 0.500 0.000 ]

[ 0.000 -0.500 0.000 0.000 0.000 0.500 0.000 ]

[ 0.000 -0.500 0.000 -0.500 0.000 1.000 0.000 ]

[ 0.000 -0.500 0.000 -0.500 0.000 1.000 0.000 ]

[ 0.000 -0.500 0.000 0.000 0.000 0.500 0.000 ]

[ 0.000 -0.500 0.000 0.000 0.000 0.500 0.000 ]

212 111 211 112 222 122 121

W

Two main types of test

Haplotype-specific tests

H tests each with 1 df

compare each haplotype versus all others

correction for multiple tests not built-in

Omnibus test

single test with H-1 df

compare each haplotype against an (arbitrary) reference haplotype

built-in correction for multiple tests

ACCGAGACTA

ACCACTGTGC

GCTGAGGCGC

ATTGAGATGA

versus

ACCGAGACTA

ACCACTGTGC

GCTGAGGCGC

ATTGAGATGA

0

b1

0

b1

b2

b3

Secondary analysis

H haplotypes will have H-1 coefficients

Reduces power of test – high degrees of freedom

More similar haplotypes should have more similar effects

G 100001100

Cladogram-collapsing

E 100001001

D 010000000

J 011000000

K 110000000

F 100001010

B 100000000

A 000000000

H 000100000

I 000010000

C 100001000

After Seltman et al (03)

G 100001100

Cladogram-collapsing

E 100001001

D 010000000

J 011000000

K 110000000

F 100001010

B 100000000

A 000000000

H 000100000

I 000010000

C 100001000

After Seltman et al (03)

G 100001100

Cladogram-collapsing

E 100001001

D 010000000

J 011000000

K 110000000

F 100001010

B 100000000

A 000000000

H 000100000

I 000010000

C 100001000

After Seltman et al (03)

G 100001100

Cladogram-collapsing

E 100001001

D 010000000

J 011000000

K 110000000

F 100001010

B 100000000

A 000000000

H 000100000

I 000010000

C 100001000

G 100001100

Cladogram-collapsing

E 100001001

D 010000000

J 011000000

K 110000000

F 100001010

B 100000000

A 000000000

H 000100000

I 000010000

C 100001000

Secondary analysis

1212

2212

2111

2211

2222

1111

1112

12-X-12

22-X-12

21-0-11

22-0-11

22-X-22

11-0-11

11-0-12

Secondary analysis

Haplotype	Estimated coefficients

2211	0.000

2111	-0.092

1111	0.102

1112	-0.234

1212	0.634

2212	0.332

2222	0.865

Secondary analysis

Haplotype similarity

Global and local identity

Haplotype effect similarity

Squared difference in MLE regression coefficients

1111112212

1111121222

1111112212

1111121222

1111112212

1111121222

Global (0.7)

Local 1 (0.5)

Local 8 (0.1)

( b1 – b2 )2 = ( 0.405 - 0.620 )2 = 0.462

Sliding window analysis

M1	M2	M3	M4	M5	M6	M7	M8

Ta

Tb

Tc

Td

Te

Tf

Tg

(Ta+Tb)/2

(Tb+Tc)/2

(Tc+Td)/2

(Td+Te)/2

(Te+Tf)/2

(Tf+Tg)/2

Tg

Ta

File formats

QTDT/Merlin input format

Example command lines

1 1 0 0 1 -9 1 2 A A

1 2 0 0 2 -9 2 2 C C

1 3 1 2 1 -0.23 1 2 A C

data.ped

T quant1

M rs000001

M rs000002

data.dat

14 rs000001 0 123232

14 rs000002 0 123887

data.map

whap --file data --alt 5,6,7 --null 5,7

whap --file data --alt 1,2,3 --at 5 --sec --perm 5000

whap --file data --alt 1,2 --window --cond --prev 0.02 --model w --wperm 5000

For full details: http://www.broad.mit.edu/~shaun/whap/

Omnibus test

whap --file data --alt 5,6,7,8,9,10,11 --at 2

300 individuals w/out parents. 0 individuals with parents.

275 of 300 individuals are informative

Hap Freq Alt(B) Alt(W) Null(B) Null(W)

--- ----- ------ ------ ------- -------

2122221 0.313 0.000 0.000 [1] 0.000 0.000 [1]

2112121 0.169 -0.249 -0.249 [2] 0.000 0.000 [1]

2221211 0.122 -0.417 -0.417 [3] 0.000 0.000 [1]

2212222 0.115 -0.419 -0.419 [4] 0.000 0.000 [1]

2122222 0.112 0.044 0.044 [5] 0.000 0.000 [1]

1112121 0.099 -0.213 -0.213 [6] 0.000 0.000 [1]

2222221 0.041 0.115 0.115 [7] 0.000 0.000 [1]

2212221 0.029 -0.662 -0.662 [8] 0.000 0.000 [1]

--- ----- ------ -------

766.078 787.673

Proportion of haplotypes covered = 0.955

LRT = 21.595

df = 7

p = 0.00298

Haplotype-specific tests

whap --file data --alt 1,2,3 --at 2 --hs

1 AGC 0.525 -0.472 -0.472 8.546 0.00346

2 CGC 0.220 0.107 0.107 0.428 0.513

3 CGA 0.180 -0.088 -0.088 0.265 0.606

4 ATA 0.075 0.116 0.116 0.381 0.537

Haplotype

Freq

B & W coeffs

Chi-sq

p

Practical 2

Use whap to phase dataACGT.ped

Single SNP analysis

Haplotype analysis

whap --file dataACGT --phase

whap --file dataACGT --phase > probs.txt

whap --file dataACGT --alt 1

Analyse 1st SNP

whap --file dataACGT --alt 5

Analyse 5th SNP

whap --file dataACGT --window --perm 50

Sliding window

+ empirical p-values

whap --file dataACGT

whap --file dataACGT --alt 1,2,3,4,5

whap --file dataACGT --hs

Omnibus test

All haplotype-specific tests

As above

Just print out phases

...or send to a file

Performance of phasing

Of 400 individuals, 16 could not be assigned phase with (near)

certainty: all 16 had the same genotypes: AA AC AC GT AC

AAATA / ACCGC 0.324 AACTA / ACAGC 0.676

1_A 1 1 ACCGC ACAGC 1.000

2_A 1 1 AACTA ACAGC 0.676

2_A 1 2 AAATA ACCGC 0.324

3_A 1 1 ACAGC AAATA 1.000

4_A 1 1 AAATA AACTA 1.000

5_A 1 1 ACAGC AACTA 0.676

5_A 1 2 ACCGC AAATA 0.324

6_A 1 1 ACAGC ACAGC 1.000

7_A 1 1 AAATA CCCGC 1.000

8_A 1 1 CCCGC ACCGC 1.000

9_A 1 1 ACCGC ACAGC 1.000

...

...

Single SNP analysis

whap --file data --window --perm 500

Global permutation tests

------------------------

P_MAX = 6.791 p = 0.0279

P_SUM = 21.618 p = 0.0119

Local permutation tests

-----------------------

>> snp1 1 P_1= 0.019 p= 0.8822

>> snp2 2 P_2= 6.791 p= 0.0119

>> snp3 3 P_3= 4.412 p= 0.0199

>> snp4 4 P_4= 6.791 p= 0.0119

>> snp5 5 P_5= 3.605 p= 0.0518

Empirical p-values, corrected

for multiple testing

Omnibus test

whap --file dataACGT --alt 1,2,3,4,5

WHAP! | v2.04 | 05/09/03 | S. Purcell, P. Sham | purcell@wi.mit.edu

400 individuals w/out parents. 0 individuals with parents. Binary trait:

400 of 400 individuals/trios are informative

Hap Freq Alt(B) Alt(W) Null(B) Null(W)

--- ----- ------ ------ ------- -------

ACAGC 0.264 0.000 0.000 [1] 0.000 0.000 [1]

CCCGC 0.237 0.406 0.406 [2] 0.000 0.000 [1]

CCCGA 0.212 0.269 0.269 [3] 0.000 0.000 [1]

AAATA 0.169 0.383 0.383 [4] 0.000 0.000 [1]

AACTA 0.067 1.338 1.338 [5] 0.000 0.000 [1]

ACCGC 0.050 0.424 0.424 [6] 0.000 0.000 [1]

--- ----- ------ -------

535.439 554.518

Proportion of haplotypes covered = 1.000

LRT = 19.079

df = 5

p = 0.00186

Haplotype-specific tests

Haplotype	Chi-sq(1df)	p-value	beta	OR

ACAGC	8.546	0.00346	-0.472	0.62

CCCGC	0.428	0.513	0.107	1.11

CCCGA	0.265	0.607	-0.088	0.91

AAATA	0.381	0.537	0.116	1.23

AACTA	13.929	0.00019	1.128	3.08

ACCGC	0.073	0.787	0.092	1.09

Largest haplotype-specific test

(empirical p-value to correct

for multiple testing)

Omnibus test

Haplotype-specific or omnibus?

Average test statistic

Omnibus + secondary test

Largest haplotype-specific test

(empirical p-value to correct

for multiple testing)

Omnibus test

Haplotype-specific or omnibus?

Average test statistic

Practical 3 : exploring the effect

Detection

single SNP

haplotype-specific

omnibus test

“Is X associated with my phenotype?”

where X is either an allele, genotype, haplotype or set of haplotypes

Practical 3 : exploring the effect

Exploring the nature of an association

i.e. assuming there is an association, where is it coming from?

a single haplotype or multiple haplotype effects?

a single variant explains the entire effect?

“Is X associated with my phenotype independent of Y?”

Interpreting effects

1	AACG 90%

2	GGAC	05%

3	AAAC	05%

2

3

1

2

3

1

2

3

1

v.s.

v.s.

v.s.

Haplotype-specific tests:

1

2

3

True model

1	AACG 90%

2	GGAC	05%

3	AAAC	05%

Looks like

Interpreting effects

1	AACG 50%

2	GGAC	40%

3	AAAC	10%

True model

1	AACG OR = 1.0

2	GGAC	OR = 0.4

3	AAAC	OR = 0.9

Under an omnibus test

strong effect

mild effect

Specifying the model in whap

Specify markers to form haplotypes from under the alternate and null

--alt 1,2,3,4 --null 3,4

1111 [1]

1122 [2]

2221 [3]

2222 [4]

2211 [5]

1111 [1]

1122 [2]

2221 [3]

2222 [2]

2211 [1]

Specifying the model in whap

Equate haplotypes directly

--constrain 1,2,3,4,5/1,2,3,2,1

1111 [1]

1122 [2]

2221 [3]

2222 [4]

2211 [5]

1111 [1]

1122 [2]

2221 [3]

2222 [2]

2211 [1]

Note: first haplotype always has to have parameter [1]

Must specify as many parameters as there are haplotypes

Conditional tests

Two SNPs both individually predict the phenotype

Do they have independent effects?

Or can one explain the other?

Haplotype	Freq	Odds ratio

AB	0.50	1.00 (fixed)

ab	0.45	2.00

Ab	0.05	?

--alt 1,2 --null 2

Alt	Null

[1]	[1]

[2]	[2]

[3]	[2]

Conditional tests

Assuming significant omnibus test:

can we make it go away?

X independently contributes (if signif.)

--alt 1,2,3,4,5 --null 2,3,4,5

“independent effect test”

X is necessary and sufficient (if test n.signif.)

--alt 1,2,3,4,5 --null 1

--constrain 1,2,3,4,5,6/1,2,1,1,1,1

“sole variant test”

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

--constrain 1,2,2,2,2,2 / 1,1,1,1,1,1

Haplotype-specific test (H1)

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

--constrain 1,2,1,1,1,1 / 1,1,1,1,1,1

Haplotype-specific test (H2)

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

--constrain 1,2,3,4,5,6 / 1,1,1,1,1,1

Omnibus test (df=5)

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

--constrain 1,1,2,2,3,3 / 1,1,2,2,2,2

Clade-based homogeneity test (1df)

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

--alt 2

Single SNP test (2nd marker)

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

--alt 1,2,3,4,5 --null 2,3,4,5

Independent effect test for SNP 1

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

--alt 1,2,3,4,5 --null 4,5

Independent effect test for SNPs 1, 2 and 3

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

--alt 1,2,3,4,5 --null 2

Sole-variant test for 2nd SNP

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

A A A T A

A C A G C

C C C G A

C C C G C

A A C T A

A C C G C

--constrain 1,2,3,4,5,6 / 1,2,1,1,1,1

Sole-variant test for haplotype 2

Practical: conditional tests

For each SNP, perform an independent effects and a “sole-variant” test. Compare these to the standard single SNP and haplotype-specific tests. What do they tell you?

Independent effect tests, e.g.

whap --file dataACGT --alt 1,2,3,4,5 --null 2,3,4,5

Sole-variant SNP tests, e.g.

whap --file dataACGT --alt 1,2,3,4,5 --null 1

Sole-variant haplotype tests, e.g.

--constrain 1,2,3,4,5,6/1,2,2,2,2,2

--constrain 1,2,3,4,5,6/1,2,1,1,1,1

Standard SNP test (df=1) (chi-sq, p-value)

SNP1	0.019	0.89

SNP2	6.791	0.00916

SNP3	4.412	0.0357

SNP4	6.791	0.00916

SNP5	3.605	0.0576

Independent effect test (df=1) (chi-sq, p-value)

SNP1	0.003	0.959

SNP2	n/a	n/a

SNP3	8.954	0.0114

SNP4	n/a	n/a

SNP5	0.408	0.523

Sole-variant test (df=4) (chi-sq, p-value)

SNP1	19.060	0.000765

SNP2	12.288	0.0153

SNP3	14.667	0.00544

SNP4	12.289	0.0153

SNP5	15.474	0.00381

--alt 1,2,3,4,5 --null 2,3,4,5

--alt 1

--alt 1,2,3,4,5 --null 1

Sole-variant tests for haplotypes

1,2,2,2,2,2 / 1,1,1,1,1,1

1,2,1,1,1,1 / 1,1,1,1,1,1

1,1,2,1,1,1 / 1,1,1,1,1,1

1,1,1,2,1,1 / 1,1,1,1,1,1

1,1,1,1,2,1 / 1,1,1,1,1,1

1,1,1,1,1,2 / 1,1,1,1,1,1

Haplotype	Chi-sq(1df)	p-value

ACAGC	8.546	0.00346

CCCGC	0.428	0.513

CCCGA	0.265	0.607

AAATA	0.381	0.537

AACTA	13.929	0.00019

ACCGC	0.073	0.787

Haplotype	Chi-sq(4df)	p-value

ACAGC	10.533	0.0323

CCCGC	18.651	0.00092

CCCGA	18.814	0.000855

AAATA	18.698	0.000901

AACTA	5.150	0.272

ACCGC	19.006	0.000784

1,2,3,4,5,6 / 1,2,2,2,2,2

1,2,3,4,5,6 / 1,2,1,1,1,1

1,2,3,4,5,6 / 1,1,2,1,1,1

1,2,3,4,5,6 / 1,1,1,2,1,1

1,2,3,4,5,6 / 1,1,1,1,2,1

1,2,3,4,5,6 / 1,1,1,1,1,2

Standard haplotype-specific tests

Sole-variant tests for haplotypes

Including the causal variant

AC-C-AGC

CC-C-CGC

CC-C-CGA

AA-C-ATA

AA-T-CTA

AC-C-CGC

Files

cvACGT.*

cv1234.*

1_A 1 0 0 1 2 A A C C C A G G C C C C

2_A 1 0 0 1 2 A A A C C A T G A C T C

3_A 1 0 0 1 2 A A C A A A G T C A C C

4_A 1 0 0 1 2 A A A A A C T T A A C T

5_A 1 0 0 1 2 A A C A A C G T C A C T

6_A 1 0 0 1 2 A A C C A A G G C C C C

A disease

M snp1

M snp2

M snp3

M snp4

M snp5

M cv

1 snp1 0 1

1 snp2 0 2

1 cv 0 3

1 snp3 0 4

1 snp4 0 5

1 snp5 0 6

Single locus test of the CV

whap --file data-cv --alt 3

WHAP! | v2.04 | 05/09/03 | S. Purcell, P. Sham | purcell@wi.mit.edu

400 individuals w/out parents. 0 individuals with parents. Binary trait:

400 of 400 individuals/trios are informative

Hap Freq Alt(B) Alt(W) Null(B) Null(W)

--- ----- ------ ------ ------- -------

C 0.935 0.000 0.000 [1] 0.000 0.000 [1]

T 0.065 1.064 1.064 [2] 0.000 0.000 [1]

--- ----- ------ -------

541.518 554.518

Proportion of haplotypes covered = 1.000

LRT = 13.000

df = 1

p = 0.000311

exp(1.064) ~ OR 2.9

Omnibus test with CV included

whap --file sim-cv --alt 1,2,3,4,5,6

WHAP! | v2.04 | 05/09/03 | S. Purcell, P. Sham | purcell@wi.mit.edu

400 individuals w/out parents. 0 individuals with parents. Binary trait:

400 of 400 individuals/trios are informative

Hap Freq Alt(B) Alt(W) Null(B) Null(W)

--- ----- ------ ------ ------- -------

ACCAGC 0.261 0.000 0.000 [1] 0.000 0.000 [1]

CCCCGC 0.237 0.411 0.411 [2] 0.000 0.000 [1]

CCCCGA 0.212 0.276 0.276 [3] 0.000 0.000 [1]

AACATA 0.171 0.406 0.406 [4] 0.000 0.000 [1]

AATCTA 0.065 1.317 1.317 [5] 0.000 0.000 [1]

ACCCGC 0.052 0.482 0.482 [6] 0.000 0.000 [1]

--- ----- ------ -------

535.616 554.518

Proportion of haplotypes covered = 1.000

LRT = 18.901

df = 5

p = 0.00201

Sole-variant SNP tests

SNP1	--alt 1,2,3,4,5,6 --null 1	LRT = 18.882	df = 4	p = 0.000829

SNP2	--alt 1,2,3,4,5,6 --null 2	LRT = 12.111	df = 4	p = 0.0165

CV	--alt 1,2,3,4,5,6 --null 3	LRT = 5.901	df = 4	p = 0.207

SNP3	--alt 1,2,3,4,5,6 --null 4	LRT = 14.489	df = 4	p = 0.0295

SNP4	--alt 1,2,3,4,5,6 --null 5	LRT = 12.111	df = 4	p = 0.0165

SNP5	--alt 1,2,3,4,5,6 --null 6	LRT = 15.296	df = 4	p = 0.00413

Sole-variant test of the CV

whap --file cvACGT --alt 1,2,3,4,5,6 --null 3

WHAP! | v2.06 | 13/Dec/04 | S. Purcell, P. Sham | spurcell@pngu.mgh.harvard.edu

400 individuals w/out parents. 0 individuals with parents. Binary trait:

400 of 400 individuals/trios are informative

Hap Freq Alt(B) Alt(W) Null(B) Null(W)

--- ----- ------ ------ ------- -------

ACCAGC 0.261 0.000 0.000 [1] 0.000 0.000 [1]

CCCCGC 0.237 0.412 0.412 [2] 0.000 0.000 [1]

CCCCGA 0.212 0.276 0.276 [3] 0.000 0.000 [1]

AACATA 0.171 0.406 0.406 [4] 0.000 0.000 [1]

AATCTA 0.065 1.317 1.317 [5] 1.065 1.065 [2]

ACCCGC 0.052 0.483 0.483 [6] 0.000 0.000 [1]

--- ----- ------ -------

535.616 541.518

Proportion of haplotypes covered = 1.000

LRT = 5.901

df = 4

p = 0.207

Single SNP vs “sole-variant”

SNP1

SNP2

CV

SNP3

SNP4

SNP5

SNP1

SNP2

CV

SNP3

SNP4

SNP5

Standard SNP test

“Sole-variant” test

Weighted haplotype analysis

IBM USER

2005-03-11T10:45:59