dn/ds又叫ka/ks,具體的概念,意義百度上都有?,F(xiàn)主要介紹最近用到的三種計(jì)算途徑,分別是maga7,datamonkey,paml。
做選擇壓力分析的序列文件,需要先clustal和剔除終止密碼子,這步可以在MAGA里完成。
1.MAGA7
MAGA7,是通過分別求取dn,ds的值,然后得到dn/ds。
將fasta格式的序列文件導(dǎo)入MAGA, 然后選擇Distance——computer overall mean distance進(jìn)入圖一頁面:仔細(xì)看下面的選項(xiàng)卡,在substitutions type 中選擇 Syn-Nonsynonymous;Genetic code table 按照自己的序列選擇;modle/method 選擇 Nei-Gojobori method (No. of Differences);Substitutions to include 選擇要計(jì)算的dn或者ds。下一步,就能得到dn或者ds,兩者相比得到結(jié)果。
如果在distance——computer pairwise#####,然后按照后面步驟操作,結(jié)果會得到一個兩兩比較的矩陣(三角),我還不知道這個要怎么用。
如果只計(jì)算dn/ds,第一種應(yīng)該夠用了。

2.Datamonkey
官網(wǎng):https://www.datamonkey.org/
三種方式,按照你的序列條件選擇其中一種。以FEL為例:

在method and tool 里選擇適合的方式,如FEL,選擇文件導(dǎo)入sqe序列,選擇genetic code。 RUN~ 選擇select all —— save branch selection 運(yùn)行


得到結(jié)果后,前面兩行表示的是positive和negative的位點(diǎn)數(shù),以及p值。向下滑,最后的表格的左下角是dn/ds的結(jié)果。更多的結(jié)果都在這個結(jié)果頁面和export的annalyze log里。


3.PAML-codeml
楊子恒教授開發(fā)并免費(fèi)提供的一個軟件。paml現(xiàn)在已經(jīng)開發(fā)到4.9h版了,這是一個命令行軟件,現(xiàn)在已經(jīng)有圖形操作界面-pamlX,但是因?yàn)槊钚胁僮髌饋砗芎唵?,而且學(xué)會也不難,就沒有學(xué)習(xí)pamlX。
paml官網(wǎng):http://abacus.gene.ucl.ac.uk/software/paml.html#PAMLx
參照官網(wǎng)信息可以完成下載,安裝和運(yùn)行示例文件。示例文件在下載的paml4.9h的example文件夾里。這里需要注意,可以將所有的’.exe‘文件和codeml.ctl (控制文件)復(fù)制到paml 的bin的文件夾里。方便運(yùn)行,減少出錯。
按照要求準(zhǔn)備序列文件和樹文件(樹文件可以直接用maga做),有提示序列文件需要 .phy或者.paml格式,但是實(shí)踐證明用.fasta格式也可以(注意文件名中不能有空格)。
windows系統(tǒng)打開cmd:win+R,輸入cmd,回車
輸入paml4.9h所在的盤,如:d: ,回車
輸入cd, cd的命令查詢文件,
輸入bin文件夾所在位置,回車,>后 需要輸入運(yùn)行的程序codemL
回車就是運(yùn)行的結(jié)果。
windows不區(qū)別大小寫,都可以。
下面是codeml.ctl文件的設(shè)置
seqfile =aa.fas * sequence data filename
?treefile =aa.nwk? ? ? * tree structure file name
?outfile = aa.txt? ? ? ? ? * main result file name
? ? ? ? noisy = 3? * 0,1,2,3,9: how much rubbish on the screen
? ? ? verbose = 0? * 0: concise; 1: detailed, 2: too much
? ? ? runmode = 0? * 0: user tree;? 1: semi-automatic;? 2: automatic
? ? ? ? ? ? ? ? ? * 3: StepwiseAddition; (4,5):PerturbationNNI; -2: pairwise
? ? ? seqtype = 1? * 1:codons; 2:AAs; 3:codons-->AAs
? ? CodonFreq = 2? * 0:1/61 each, 1:F1X4, 2:F3X4, 3:codon table
*? ? ? ? ndata = 10
? ? ? ? clock = 0? * 0:no clock, 1:clock; 2:local clock; 3:CombinedAnalysis
? ? ? aaDist = 0? * 0:equal, +:geometric; -:linear, 1-6:G1974,Miyata,c,p,v,a
? aaRatefile = dat/jones.dat? * only used for aa seqs with model=empirical(_F)
? ? ? ? ? ? ? ? ? * dayhoff.dat, jones.dat, wag.dat, mtmam.dat, or your own
? ? ? ? model = 0? 【這個是branch/branch-site/site的選項(xiàng),site選擇0,具體區(qū)別可另外檢索】
? ? ? ? ? ? ? ? ? * models for codons:
? ? ? ? ? ? ? ? ? ? ? * 0:one, 1:b, 2:2 or more dN/dS ratios for branches
? ? ? ? ? ? ? ? ? * models for AAs or codon-translated AAs:
? ? ? ? ? ? ? ? ? ? ? * 0:poisson, 1:proportional, 2:Empirical, 3:Empirical+F
? ? ? ? ? ? ? ? ? ? ? * 6:FromCodon, 7:AAClasses, 8:REVaa_0, 9:REVaa(nr=189)
? ? ? NSsites = 0? 1? 2 3 7 8? 【下面附上的結(jié)果解讀鏈接里有區(qū)別,其中包含零假設(shè)和替代假設(shè)】* 0:one w;1:neutral;2:selection; 3:discrete;4:freqs;
? ? ? ? ? ? ? ? ? * 5:gamma;6:2gamma;7:beta;8:beta&w;9:betaγ
? ? ? ? ? ? ? ? ? * 10:beta&gamma+1; 11:beta&normal>1; 12:0&2normal>1;
? ? ? ? ? ? ? ? ? * 13:3normal>0
? ? ? ? icode = 1? 【根據(jù)密碼子選擇】* 0:universal code; 1:mammalian mt; 2-10:see below
? ? ? ? Mgene = 0
? ? ? ? ? ? ? ? ? * codon: 0:rates, 1:separate; 2:diff pi, 3:diff kapa, 4:all diff
? ? ? ? ? ? ? ? ? * AA: 0:rates, 1:separate
? ? fix_kappa = 0? * 1: kappa fixed, 0: kappa to be estimated
? ? ? ? kappa = 2? * initial or fixed kappa
? ? fix_omega = 0? * 1: omega or omega_1 fixed, 0: estimate
? ? ? ? omega = .4 * initial or fixed omega, for codons or codon-based AAs
? ? fix_alpha = 1? * 0: estimate gamma shape parameter; 1: fix it at alpha
? ? ? ? alpha = 0. * initial or fixed alpha, 0:infinity (constant rate)
? ? ? Malpha = 0? * different alphas for genes
? ? ? ? ncatG = 8? * # of categories in dG of NSsites models
? ? ? ? getSE = 0? * 0: don't want them, 1: want S.E.s of estimates
RateAncestor = 1? * (0,1,2): rates (alpha>0) or ancestral states (1 or 2)
? Small_Diff = .5e-6
? ? cleandata = 1? * remove sites with ambiguity data (1:yes, 0:no)?
*? fix_blength = 0? * 0: ignore, -1: random, 1: initial, 2: fixed, 3: proportional
? ? ? method = 0? * Optimization method 0: simultaneous; 1: one branch a time
* Genetic codes: 0:universal, 1:mammalian mt., 2:yeast mt., 3:mold mt.,
* 4: invertebrate mt., 5: ciliate nuclear, 6: echinoderm mt.,
* 7: euplotid mt., 8: alternative yeast nu. 9: ascidian mt.,
* 10: blepharisma nu.
* These codes correspond to transl_table 1 to 11 of GENEBANK.



ps:教程:http://www.itdecent.cn/u/214b3ff96d82
B站視頻教程:https://www.bilibili.com/video/av10469605 from=search&seid=4867078036525249250
如何解讀結(jié)果:http://blog.sina.com.cn/s/blog_65ba09d90102x4ua.html
ps:我覺得視頻教程里up主說做的是branch,然后取model=0是零假設(shè),與我理解的有出入,我以為model=0是site,NSsite可以決定那個是零假設(shè)那個是替代假設(shè)。
另外,在對結(jié)果解讀的過程中,很多文章都提到M1a,M2a,但是NSsite里沒有M1a,M2a,只有M1, M2, 不解。
視頻UP主是branch test ,另一種計(jì)算模型,并非兩者有錯誤。
所有內(nèi)容不保證正確,有錯就改。
建議忽略NEB的輸出,選用BEB的輸出,BEB只在正向選擇的M2/M8中存在。