統計遺伝学 Statistical Genetics 2009 - Statistical Genetics, Kyoto

Download Report

Transcript 統計遺伝学 Statistical Genetics 2009 - Statistical Genetics, Kyoto

統計遺伝学
Statistical Genetics
2009/09/01
2009/09/02
2009/09/03
2009/09/04
ゲノム医学センター
Center for Genomic Medicine
ノートを取りましょう
Take notes yourself
• 自分の言葉でノートを取ることで能動的な理
解が得られます。
• Taking notes yourself is the way to understand
the contents ACTIVELY.
構成
Contents
– 1
– コンピュータの準備
– Preparation of your computer
– 2
– 遺伝子多型
– Genetic polymorphisms
• 3
– 実験データのチェック
– Check experimental data
• 4
– 個別マーカーの検定
– Test individual markers
• 5
– 複数のマーカーの検定
– Test multiple markers
1&2
• 多型の生成の基礎である、変異・組換え・浮動を理
解し、浮動を題材にエクセルでデータシミュレーショ
ンの基礎を学ぶ
• Mutation, recombination and drift make
polymorphisms. Learn basics to simulate
polymorphism data with EXCEL.
• フリーのソフトをダウンロードして使えるようになるこ
と
• Learn how to set up free applications from internet.
遺伝子多型
Genetic polymorphisms
•
•
•
•
•
DNA
A,T,G,C
Variations
種間多様性 Inter-species variations
種内多様性 Intra-species variations
遺伝的多様性
Genetic heterogeneity
• 変異 Mutation
– 変異体 Mutant
• 組み換え Recombination
– 組み換え体 Recombinant
• 遺伝的浮動 Genetic drift
– アレル頻度変化 Change in allele frequency
– アレルの固定 Fixation
EXCELでMutationのシミュレーション
Simulate mutation with EXCEL
• 変数 Parameter
– 変異率 Mutation rate
• 世代/単位時間あたり、座位あたりに変異がおきる確率
• Is probability that mutation happens per locus per generation/unit
of time
• 列 Columns
– 第一列 The first column
• 変異座位数集計用 For sum of mutated loci
– 第二列以降 The second and after columuns
• 座位 Loci
• 行 Rows
– 世代 Generations
• 第一世代 The first generation
– 全座位 0
– All loci 0
第二世代以降を作る
Make the 2nd and after generations
• RAND() :
– 0-1の均一分布からの乱数
– Random values from uniform distribution from 0
to 1
均一分布
Uniform distribution
• 検定の基礎 Basics of statistical tests
• 確かめる Make sure they are so.
– 値貼り付け Copy and paste without changing the
value
– ソート Sort
– プロット Plot
RAND()を使ってアレルを変化させる
Mutate alleles with RAND()
– “=IF(RAND()<$B$1,B3+1,B3)”
• RAND()が変異率 $B$1より小さいときにアレルの値を
一つ大きくする
• When RAND() is less than mutation rate $B$1, increase
allele value by one
– “=IF(RAND()<$B$1,IF(B3+1=2,0,1),B3)”
• アレルの値が2になったら1に戻るように変える
• When allele value becomes 2, change it back to 0
世代ごとに変異アレルの数を数える
Count loci with allele 1
• “=SUM(B3:EF3)”
• グラフを描く Draw a graph
• Mutation rate を変えてみる
• Change mutation rate
EXCELで組換えのシミュレーション
Simulate recombination with EXCEL
• 変数 Parameter
– 組換え率 Recombination rate
• 単位時間/世代あたり、座位間あたりに組換えの起き
る確率
• Is probability that recombination happens per inter-loci
per generation/unit of time
• 列 Columns
– 座位 Loci
• 行 Rows
– 世代 Generations
• 第一世代 The first generation
– 全座位 0
– All loci 0
• 第二世代以降 The second and after
– 第一座位 The first locus
• “=IF(RAND()<$B$1,IF(A2+1=2,0,1),A2)”
– 第二座位以降 The second and after loci
• =IF(RAND()<$B$1,IF(B3=B2,IF(C2+1=2,0,1),C2),IF(B3=B2,C2,IF(C2+1
=2,0,1)))
• 一つ前の座位が組換えてあったかなかったかで対応を変える
• The condition whether the previous locus is recombinant or not
affects the allele
色を塗ってわかりやすくする
Color segments
• セルの書式設定で1のセルの色を変える
• Color cells with allele 1 (Cell format??)
• 縮小表示で全体を眺める
EXCELで浮動のシミュレーション
Simulate drift with EXCEL
• 注意:このシミュレーションの仕方はDiploidで
あることや、Mating の制約など、いろいろな
面でヒトのそれとして不適切な点を含む
• Note: This simulation method contains
multiple problems as human genetics; diploid,
mating system etc.
EXCELで浮動のシミュレーション
Simulate drift with EXCEL
• 初期値 Initial inputs
– アレル頻度 Allele frequency: af
– 染色体本数 No. chromosomes: nc
– 世代数 No. generation: ng
– 中立からの逸脱度 Deviation from neutrality: w
初期値を与える
Initial inputs
• エクセルファイルが完成した暁には、シミュ
レーションするにあたって、ここで入力した初
期値のみを変更します。
• When your excel file is completed, only these
initial inputs will be changed for simulation.
サンプル数x世代数の枠を与える
Make a frame of No. samples x No.
generations
• 列と行に連続整数を与えるのは簡単
• Colum and row with (0),1,2,… : Simple
• “IF”関数を使って、サンプル数と世代数をコン
トロールする
• Control nc and ng with “IF”
– “$D$1” : No. chromosomes, “$F$1” : No.
generations
– “=IF(i<= $D$1,1,0)”, “=IF(j<=$F$1,1,0)
乱数からアレルを決める
Set allele with random values
• “=IF(RAND()<$B$1,1,0)
– 乱数がアレル頻度未満のときに1、それ以外は0
– When random value is less than allele freq., allele is 1,
otherwise 0.
• “=IF(AND($B6=1,C$3=1), IF(RAND()<$B$1,1,0),0)”
– B列が1ならアレルを決める、そうでなければ0にする
– The chromosomes with 1 in column B, allele is given,
otherwise 0.
• Drag!
アレル頻度を計算する
Calculate allele freq.
•
•
•
•
計算のための行を2行作る
Insert 2 rows to calculate allele freq.
“=SUM(C6:C10000)”
“=C4/$D$1”
次世代を作る
Simulate next generation
• k世代のデータを作るときにk-1世代のアレル頻度を
使う
• Use allele frequency in k-1 generation to make k
generation.
• C6のセルの記載内容をツールバー下のウィンドウ
からコピーし、D6の入力内容とする。ただし、適当に
修正する
• Copy the content of cell C6 by copying the window
below tool bar, then input it into D6 with appropriate
modification.
すべての世代にコピーする
Copy to all generations
サイズを大きくし、アレル頻度変化
のグラフを描く
Expand the size and draw a graph
of allele frequency change
• 縦軸は最小値0、最大値1に固定する
• Fix the max and min of the horizontal axis
• グラフを入力パラメタが見える場所に移動す
る
• Move the graph to the area where you can see
input parameters.
生存に有利にしてみる
Make the allele beneficial to
survive
• “=IF(AND($B6=1,D$3=1),IF(RAND()<C$5*$H$1
,1,0),0)”
– 次世代のアレル頻度C$5が生殖年齢に達する割
合を$H$1倍する
– Multiple allele freq. (C$5) by $H$1 to increase the
fraction of the allele in reproductive age.
余裕のある人は・・・
染色体と世代の縦横を入れ替え
てみる
Exchange chromosomes and
generations if you are quicker than
others…
コンピュータの準備
Preparation of your computer
• 表計算ソフト(エクセルなど)
• Spreadsheet application such as EXCEL
• ハプロビュー
• Haploview
– “Haploview”で検索してインストール
– Search “Haploview” then install it
• Rフリー統計ソフト
• R statistical environment
– “CRAN”で検索してインストール
– Search “CRAN” then install it
作業フォルダ”TestFolder”を作る
Make a working folder “TestFolder”
• EXCEL
– Open a new document with EXCEL
– “test.txt”という名前でタブ区切りで”TestFolder”に保存
– Save as “test.txt” with “tab” delimiters
• Haploview
– Open haploview
– Open sample files.
• R
– Open R
– Change working directory to the folder “TestFolder”
SNPのアレル頻度
Allele frequency of SNP
• 大多数のSNPのアレル頻度は低く、アレル
頻度が高くなるに従って数は減る
• Vast majority of SNPs have low allele
frequency. The higher allele frequency, the
less.
• アレル頻度が10%以上になると、SNPの頻
度はほぼ同頻度
• SNPs with af more than 10% exist almost
evenly.
アレル頻度のシミュレーション
Simulate allele frequnecy
• SNPの場合 SNP
– 2アレル型 Diallelic
– 片方のアレルの頻度は、0-1均一分布
– Allele freq. of one allele takes uniform distribution
from 0 to 1.
– “RAND()” in EXCEL
アレル頻度のシミュレーション
Simulate allele frequnecy
• Rを使ってみる Use R
– ” af<-runif(1000)”
• 均一分布の確認 Make sure “af” in uniform
distribution
– 度数分布 Histogram
• ” hist(af)”
– ソートしてプロット Sort and plot
• ” afsort<-sort(af)”
• ” plot(afsort)”
Hardy-Weinberg Equilibrium (HWE)
and Disequilibrium
• 個体は染色体をペアで持つ。染色体がランダムに
ペアを作っている状態をHWEという
• Diploid organisms have pairs of chromosomes. When
chromosomes pair randomly, it is said HWE.
• Allele freq. are p and q; p+q=1
– Diploid frequency
• p*p=p^2, 2pq, q^2 in HWE
• p^2+2pq*f, 2pq(1-f), q^2+2pq*f
– f: Fixation index
» When f=0, HWE
» When f=1, no heterozygotes.
HWE and f
• Simulate with EXCEL.
– アレル頻度を与えます Give allele frequency
– もう一方のアレル頻度を計算します Calculate allele freq.
of another allele
– アレル頻度1,アレル頻度2、f、ホモ頻度、ヘテロ頻度、
逆ホモ頻度、3ディプロタイプ頻度の和、HWEの場合の
ホモ・ヘテロ・逆ホモ頻度を1行に
– Allele freq1, allele freq2, f, homozygous freq, heterozygous
freq, another homozygous freq, sum of three diplotypes,
homozygous/heterozygous/another homozygous freq in
HWE, place them in a row.
Chi-square test of HWE
• 人数Nのカラムを加える
• Add a column for N, No. individuals.
• 次のカラムも付け加える Add following columns.
• ディプロタイプ頻度(HWDとHWE)をN倍する
• Multiply diplotype freq in HWD and HWE by N.
• {D1,D2,D3},{E1,E2,E3}: No. samples of each diplotypes in
HWD/HWE
• Chi^2=(D1-E1)^2/E1+(D2-E2)^2/E2+(D3-E3)^2/E3
相関プロット Coplot
f and chi^2
•
•
•
•
•
•
•
•
•
fの列で、fを0から1まで0.1刻みで増やす
Increase f from -1 to 1 by 0.1 in the column
その他のカラムはコピーペースト
Copy for other columns
fとchi^2のカラムで相関プロット
Coplot for two columns f and chi^2
近似曲線の追加(多項式)
Add approximate line (Polynomial)
Chi^2=N*f^2
アレル頻度のシミュレーション
Simulate allele frequnecy
• ディプロタイプ頻度分布のシミュレーション
• Simulate diplotype frequency
– P^2+pq*f, 2pq(1-f), q^2+pq*f
• runifではなく, No runif
– ディリクレ分布からの乱数発生
– Random generation from Dirichlet distribution
– “MCMCpack”パッケージをインストール Install
“MCMApack” package
• ツールバーからインストール先を選択 Select instal lsite from
toolbar
– パッケージを読み込む Read the package
• “library MCMCpack”
• ”af<-rdirichlet(10,c(1,1))”
– 2個のアレルの頻度が10セット
– Ten sets of allele frequency of two alleles
•
•
•
•
•
“af<-rdiriclet(1000,c(1,1))”
“hist(af[,1])”
“hist(af[,2])”
“plot(sort(af[,1])”
“plot(sort(af[,2])”
• アレル頻度に差をつけてシミュレーションする
• Simulate allele freq with difference between
two alleles
• “af<-rdirichlet(1000,c(0.75,0.25))
• “hist(af[,1])”
• “mean(af[,1])” “mean(af[,2])
• “apply(af, 2,mean)”
•
•
•
•
•
アレル頻度ヒストグラムの集中度を上げる
Make histogram of allele freq. more peaked
分散を小さくする Make variance smaller
“af<-rdirichlet(1000,c(0.75,0.25)*100)”
“hist(af[,1])” “apply(af,2,mean)”
HWE/HWD→LE/LD
•
•
•
•
2x2 table
{p,q} x {p,q} → {p1,q1} x {p2,q2}
f→r
delta=pqf → delta=sqrt(p1p2q1q2)r
• Chi^2=N r^2
3
• 実験データのチェック
• Check experimental data
•
•
•
•
データの何をチェックするのか?
What in your data do you check?
チェックして、その後、どうしたいのか?
Check, then what do you want to do?
データは解析の対象として適切か?
Are the data appropriate to be
analyzed?
• データが解析にそぐわないとは
• What does “inappropriate for analysis” mean?
– データ解析は仮説・モデルが与える分布に合うかどうか
で行う
– Data are analyzed by comparing them with distribution
given by hypothesis/model.
分布 Distribution
• A. 仮説・モデルが与える理想的統計分布
• A. Ideal statistical distribution given by
hypothesis/model
• B. 滑らかだが理想的でない分布
• B. Smooth but non-idealistic distribution
• C. 滑らかでない分布・外れ値のある分布
• C. Non-smooth distribution, outliers
対処 What to do?
• A. 理想的 Ideal
→OK
• B. Smooth but not ideal
→Seek methods that can understand and utilize the distribution.
• C. Non-smooth, Outliers
→スムーズでない理由、外れ値の理由を見つける
→Identify sources of non-smoothness, outliers
→“理由”を持っているものを取り除く(値が外れているものを取り除くので
はなく)
→Remove items with the “cause” (Do not remove items with outliervalue).
分布を知る Know distributions
• 度数分布を描く Draw histogram
• 累積分布を描く Draw cumulative distribution
• 平均 average と 分散 variance
正規分布からの乱数
Random variables from normal distribution
• “N<-100000”
• “data1<-rnorm(N,1)”
• “hist(data1)”,
“plot(sort(data1))”,”mean(data1)”,”var(data1)”
ポアッソン分布からの乱数
Random variables from Poisson distribution
• “N<-100000”
• “data2<-rpois(N,0.1)”
• “hist(data2)”,
“plot(sort(data2))”,”mean(data2)”,”var(data2)”
ポアッソン分布がデータ不良を表し、
それに正規分布がかぶっている場合
When Poisson distribution represents
inappropriateness of data and normal
distribution is over it
• “sum<-data1*0.1+data2”
• “hist(sum)”,”plot(sort(sum))”,”mean(sum)”,”va
r(sum)”
• プロットを図ファイルとして残せるようになろう
• You should be able to save your drawing as a file!
データはRの外からやってくる
Your data will be outside of R.
• EXCEL file → Text file (tab delimiter)
– 複数列のファイル、多くの行のRAND()
– Multiple columns with many rows with RAND()
• “yourdata<read.table(file=“yourfile.txt”,header=T)”
– Or “yourdata<read.table(file=“yourfile.txt”,header=F)”
分布
•
•
•
•
“hist(yourdata$col1)”
“plot(sort(yourdata$col1))”
“mean(yourdata$col1)”
“var(yourdata$col1)”
数える Count
• 総数 Count all
– “length(yourdata$col1)”
• 条件付きで数える Count with one condition
– “length(which(yourdata$col1<0.5))
– 条件を増やす More conditions
• AND “&” OR“|”
• “length(which(yourdata$col1<0.5 &
yourdata$col2>0.1))”
• “length(which(yourdata$col1<0.5 |
yourdata$col2>0.1))”
加工したデータをファイルで残す
Save processed data as a file
• “write.table(selected1,file=“youselected.txt”,row.na
mes=F)”
• Rの終了(“q()”)に際して、保存しておけば、R.dataに
データが、R.history (テキストエディタで開きます)に
コマンドが記録されています
• When you quite R with “q()”, you can select the
option to save your work. The file “R.data” has your
data and “R.history” has your commands, which can
be read with text-editor application.
• C. Non-smooth, Outliers 理由 cause
• 理由の例 Examples of cause
– マーカー Markers
– サンプル Samples
– コールという作業 Calling processes
– 実験という作業 Assaying processes
– データ取り扱い作業 Data handling processes
マーカー Markers
『他のマーカーのデータはよいのに、こ
のマーカーのデータが悪い』
“Data of other markers are good but data
of these markers are bad.”
• マーカーは多型ではなかった
– The markers were not polymorphic.
• マーカーのアッセイデザインが不良だった
– Assay design (probe design) was bad.
サンプル Samples
『他のサンプルのデータは良いのに、このサンプルのデータは悪い』
“Data of other samples
are good, but data of these
samples are bad.”
• サンプルの抽出作業が悪かった
– DNA extraction was extracted badly.
• サンプルの保存状態が悪かった
– DNA samples were stocked in bad condition.
• サンプルを実験に使うときにうまく入らなかった
– DNA samples were not placed into assay liquid.
• サンプルを実験に使うときにコンタミした
– DNA samples were contaminated with others when used.
コールという作業 Calling processes
『ほかのコール作業の結果はよいのに、このコール
作業の結果は悪い』
“Results of other calling jobs are good but results of
these calling jobs are bad.”
• いつ、どこで、だれが、やったコール作業
– When, where, who called?
実験という作業 Assaying processes
『この実験結果はよいのに、この実験結果は
悪い』
“The result of these assays are good but the
result of these assays are bad.”
• いつ、どこで、どの試薬(ロット)で、どの機械
で、誰が
– When, where, which reagents, which machine,
who?
データ取り扱い作業 Data handling
processes
『このハンドリングのときはよいのに、このハンドリングのとき
は悪い』
“Outputs from these handling processes are good but outputs
from these are bad.”
• だれが、いつ、どのコンピュータのどのプログ
ラムを使って?
– Who, when, which computers, which programs ?
理由は、固有名詞で特定して、そ
の理由を持って、データを除去し
ます
Find unique name of causes and
remove a part of your data in the
name of “CAUSE”.
4
• 個別マーカーの検定
• Test individual markers
リスクSNPのディプロタイプ頻度をシミュレート
Diplotype frequency of Risk SNP in case-control study
• EXCEL
• Give allele frequency with f to set diplotype
frequency.
• Give relative risk (RR) of homozygotes (r) compared
to non-risk homozygoutes.
• Set genetic model (additive, dominant, recessive or
others) that gives RR of heterozygotes (r^k; k=0,1,2
and others,rispectively).
•
•
•
•
•
•
ケースのディプロタイプ頻度比を算
Calculate ratio of three diplotypes among cases.
その比率を標準化
Standardize the ratio.
非ケースは全体からケースを引いたそのあまり
Non-cases are subtraction of cases from the whole
population.
2x3 table
PB
PR
PG
P
QB
QR
QG
Q
B
R
G
N
N!通り
No. sequence patterns : N!
• サンプルがすべて同質であるとき、すべての
サンプルの並びは等しい確率で起こりうる。し
たがって、各パターンに合致する並びの数が
、そのパターンの起こる確率に比例する
• When no difference among the samples, every
sequence is equally likely to occur. Therefore
The number of sequences corresponding to
the patterns is proportional to the probability.
N!通りのテーブルにある規則で値を与える
Give a value to N! patterns based on a rule.
• 規則の例 Samples of Rule
– ケースとコントロールのアレル頻度の差
• Difference of allele freq. between cases and conts.
• Additive model
– ケースとコントロールのホモ頻度の差
• Difference of freq. of homozygotes btwn cases and conts.
• Recessive model
– パターンと同じテーブルの生起確率
• Occurrence probability of table to which each sequence belongs.
• 2x3 df=2 test
P-value
• 規則で与えた値について、観測と同等かそれ
よりも帰無仮説状態から遠い値を取る場合の
生起確率の和がP値
• Sum of occurrence probability of tables whose
“value” based on the rule is equal to or more
deviated from the value of null hypothesis, is
p-value.
どうやってP値を得るか?
How to get P-value?
•
Permutation test
– N!をすべて調べる
– Check all N! ways
• 正確検定 Exact test
– 正確検定はN!のすべてを調べる代わりに、同じテーブルを作る場合数を計算する
– Exact test calculates No. ways that make the same table rather than check all
of N! ways.
• Monte-Carlo permutation test
– N!からランダムにいくつかの場合を調べる
– Select a part of N! ways.
• 漸近近似検定 Asymptotic test
– 「規則」に則してデザインされた簡易計算方法である「漸近近似検定」を使う
– Asymptotic tests that use simple calculation methods developed for individual “rules”.
– 既知の分布・扱いやすい分布に近似する
– Assume known/easy-to-use statistical distributions
2x3以外のテーブルのテストや量的形質のテストでも
同様
2x3 and other table tests with more categories and also
tests for quantitative traits
•
Permutation test
• 正確検定 Exact test
– ※量的形質ではこの計算ができない
– ※No way to calculate for quantitative traits
• Monte-Carlo permutation test
• 漸近近似検定 Asymptotic test
正確検定はN!のすべてを調べ
る代わりに、同じテーブルを作
る場合数を計算する
Exact test calculate No. ways that
make the same table rather than
check all of N! ways.
2x3 table(3 colors, 2 segments)
N!=4! =24
1
1
1
1
1
1
2
2
2
2
2
2
3
3
3
3
3
3
4
4
4
4
4
4
2
2
3
3
4
4
1
1
3
3
4
4
1
1
2
2
4
4
1
1
2
2
3
3
B!R!G1=2!1!1!=2
3
4
4
2
2
3
3
4
4
1
1
3
2
4
1
4
1
2
2
3
1
3
1
2
4
3
2
4
3
2
4
3
1
4
3
1
4
2
4
1
2
1
3
2
3
1
2
1
K!=K(K-1)(K-2)…1
P!(PB!PR!PG!) x Q!/(QB!QR!QG!)
2x3 table
PB
PR
PG
P
QB
QR
QG
Q
B
R
G
N
N!
N!/(B!R!G!)
No. of PBPRPGABQRAG
P!/(PB!PR!PG!)xQ!/(QB!QR!QG!)
Which should be multiplied by B!R!G!
That is No. sequences satisfying the table.
Probability is the value divided by N!.
No. sequences=P!Q!B!R!G!/(PB!PR!PG!QB!QR!QG!)
Pr=P!Q!B!R!G!/(N!PB!PR!PG!QB!QR!QG!)
Calculate exact occurrence
probability of a 2x2 table
• EXCEL
• Give total sample size: N.
• Give number of cases: P.
– Q, number of controls is N-P.
• Give number of samples with a factor: A.
– B, number of samples without a factor: B.
• N! is “=EXP(GAMMALN(N+1))” in EXCEL.
– LN(P!Q!A!B!/(N!PA!PB!QA!QB!))=GAMMALN(P+1)+GAMM
ALN(Q+1)+GAMMALN(A+1)+GAMMALN(B+1)GAMMALN(N+1)-GAMMALN(PA+1)-GAMMALN(PB+1)GAMMALN(QA+1)-GAMMALN(QB+1)
検定分類
Classification of tests
•
•
•
•
ジェノタイプとフェノタイプとの間の関連・相関を検定する
Test association/correlation between genotypes and phenotypes .
ジェノタイプは、カテゴリカルデータである
Genotypes are categorical.
–
–
•
•
ジェノタイプカテゴリに順序を考慮しない場合と考慮する場合がある
Sometimes the order of genotypes matters and sometimes not.
フェノタイプは、カテゴリカルデータである場合と、量的データである場合がある
Phenotypes are sometimes categorical and sometimes quantitative.
–
–
フェノタイプがカテゴリカルデータの場合には、順序を考慮しない場合と考慮する場合がある
The order of categories of phenotypes sometimes matters and sometimes not.
ジェノタイプ・フェノタイプの2軸に順序を考慮す
るかしないかで、4通りの場合わけができる
–
–
ジェノタイプもフェノタイプも順序なし
No order in genotypes or phenotypes
•
•
–
–
(ジェノタイプカテゴリ数-1)x(フェノタイプカテゴリ数-1)の自由度の独立性検定
Test of independence of df=(No. genotype categories-1)x(No. phenotype categories-1)
ジェノタイプ順序あり、フェノタイプなし
Genotypes to be ordered and phenotypes not
• 傾向性カイ自乗検定(トレンドカイ自乗検定)・Armitage-Cockran検定
• Chi^2 test for trend / Armitage-Cockran trend test
• Kruskall-Wallis
– ジェノタイプ順序なし、フェノタイプあり
– Genotpypes no order, phenotypes to be ordered/quantitative
• 傾向性カイ自乗検定(トレンドカイ自乗検定)・Armitage-Cockran検定
• Chi^2 test for trend / Armitage-Cockran trend test
• Kruskall-Wallis
• ANOVA for quantitative phenotpyes
–
ジェノタイプ順序あり、フェノタイプあり
• Jonckheere-Terpstra
• (線形)回帰 (Linear) Regression
複合遺伝性疾患と閾値モデル
Complex genetic traits and threshold model
• リスク座位が増えるとリスクの分布が正規分
布化することを確かめる
• Simulate risk distribution with multiple loci.
複合遺伝性疾患と閾値モデル
Complex genetic traits and threshold model
X non-risk homozygoutes
Heritability = 0.6
Vall=Vg+Ve; Vg=0.6
VlocusX=0.6x0.01
Allele freq of X = 0.4
HWE
Phenocopy = 0.2
X heterozygoutes
Prevalence = 0.01
RR(homo1vs homo2) =1.71
RR(hetero vs homo2) = 1.29
X homozygoutes
パラメタを振ってみる
Change inputs
• 関連座位数がどのくらい多くてもまずまずの相対危
険度が出ることを確認する
– When many genes are related, locusFrac is low. Low
locusFrac still produces considerable relative risk.
• 遺伝率がそれほど高くなくてもまずまずの相対危険
度が出ることを確認する
– Relatively low heritability still produces considerable
relative risk.
• 有病率が高いと相対危険度が低くなることを確認す
る
– Higher prevalence makes relative risk lower.
5
• 複数のマーカーの検定
• Test multiple markers
多重検定
Multiple testing
形質(疾患)
1マーカーでの関連解析
マーカー
形質とマーカーとに強い関連がある
1マーカーでの関連解析
形質(疾患)
マーカー
形質とマーカーとに強い関連がある
多マーカーでの関連解析
形質(疾患)
マーカー2つ
形質と第1マーカーとに強い関連がある
多マーカーでの関連解析
形質(疾患)
マーカー
形質と第1マーカーとに強い関連がある?
多マーカーでの関連解析
形質(疾患)
マーカー
形質と第1マーカーとに強い関連がある
???????
マルチプルテスティング問題
多マーカーでの関連解析
多マーカーでの関連解析
←同じ→
多マーカーでの関連解析
多マーカーでの関連解析
多マーカーでの関連解析
どのマーカーとは言わないが
マーカーと形質には関係がある
マーカー同士は
独立である
多マーカーでの関連解析
どのマーカーとは言わないが
マーカーと形質には関係がある
マーカー同士は独立でない
相互に近いマーカーでは個人のジェノタイプが似ている
マーカー同士は
独立である
→連鎖不平衡にある
→本当のマルチプルテスティング問題
多マーカーでの関連解析
←同じ→
多マーカーでの関連解析
多マーカーでの関連解析
どのマーカーとは
言わないが
マーカーと形質に
は関係がある
マーカー同士は独立で
ない
相互に近いマーカーで
は個人のジェノタイプ
が似ている
→連鎖不平衡に
ある
多マーカーでの関連解析
どのマーカーとは
言わないが
多マーカーでの関連解析
マーカーと形質に
は関係がある
マーカー同士は独
立でない
個人のジェノタイ
マーカー同士は独立で
ない
プが似ているので
はなく、集団のジェ
ノタイプが似ている
相互に近いマーカーで
は個人のジェノタイプ
が似ている
→連鎖不平衡に
ある
→集団の遺伝
的バックグラ
ウンドが異なる
集団構造化
問題
理想的な場合
When ideal
• Nmarker<-1,000
– A project tests 1000 independent markers.
• Repeat<-10,000
– The project is repeated 10000 times.
• Ps<-matrix(runif(Nmarker*Repeat),nrow=Repeat)
• Plot(sort(Ps))
• minP<-apply(Ps,1,min)
– Minimum P values for each repeat.
• Plot(sort(minP)), mean(minP)~1/Nmarker
• quantile(minp,0.01)
– The smallest 1% of minp: nominal p value should be this low to consider
“p=0.01” in multiple testing setting.
– 1-(1-0.01)^(1/Nmarker)
• 理論的に計算できる You can calculate this value.
分布 Distribution
• A. 仮説・モデルが与える理想的統計分布
• A. Ideal statistical distribution given by
hypothesis/model
• B. 滑らかだが理想的でない分布
• B. Smooth but non-idealistic distribution
• C. 滑らかでない分布・外れ値のある分布
• C. Non-smooth distribution, outliers
• B. 滑らかだが理想的でない分布
• B. Smooth but non-idealistic distribution
• 滑らかだが理想的でない分布を理想的な分布に変
換することができれば、理想的な分布に基づく統計
学手法を使えるようになる
• If you can transform your “smooth but non-idealistic”
distribution into “the ideal statistical distribution”,
then statistical tests can help you.
理想的でない場合
When not ideal
データを利用する
Use your data
• EXCEL
• RAND()
– Uniform distribution
• CHIINV(x,1)
– Calculate chi^2 value from p value
•
•
•
•
Lambda =2
Inflated chi^2 value = chi^2 * Lambda
P=CHIDIST(Inflated chi^2,1)
Ps are smaller than should be
Genomic control method
• 得られた多数のp値からLambdaを推定して補
正する
• Estimate “Lambda” from obtained many pvalues and correct them.
• GC法はすべてのテストを均一に補正する
• GC-method corrects all tests evenly.
構造化 多軸の
シミュレーション
Haploviewの使い方