{"id":1364,"date":"2013-06-01T09:47:53","date_gmt":"2013-06-01T01:47:53","guid":{"rendered":"http:\/\/www.hzaumycology.com\/chenlianfu_blog\/?p=1364"},"modified":"2013-06-14T16:16:42","modified_gmt":"2013-06-14T08:16:42","slug":"%e8%b4%9d%e5%8f%b6%e6%96%af%e6%b3%95%e6%9e%84%e5%bb%ba%e8%bf%9b%e5%8c%96%e6%a0%91%ef%bc%9amrbayes","status":"publish","type":"post","link":"http:\/\/www.chenlianfu.com\/?p=1364","title":{"rendered":"\u8d1d\u53f6\u65af\u6cd5\u6784\u5efa\u8fdb\u5316\u6811\uff1aMrBayes"},"content":{"rendered":"<h1>1. \u7b80\u4ecb<\/h1>\n<p>\u4f7f\u7528\u8d1d\u53f6\u65af\u6cd5\u6784\u5efa\u8fdb\u5316\u6811\u7684\u8f6f\u4ef6\u6709\u5f88\u591a\u3002\u5728\u8fd9\u91cc\u7b80\u8981\u4ecb\u7ecdMrBayes\u7684\u5b89\u88c5\u548c\u4f7f\u7528\u3002\u4ee5\u4e0b\u4ecb\u7ecd\u662f\u5bf9\u51e0\u79cd\u8d1d\u53f6\u65af\u6cd5\u6784\u5efa\u8fdb\u5316\u6811\u8f6f\u4ef6\u7684\u7b80\u4ecb\uff1a<\/p>\n<p><a href=\"http:\/\/mrbayes.sourceforge.net\/index.php\" target=\"_blank\">MrBayes<\/a> is a program for Bayesian inference and model choice across a wide range of phylogenetic and evolutionary models. MrBayes uses Markov chain Monte Carlo (MCMC) methods to estimate the posterior distribution of model parameters.<\/p>\n<p><a href=\"http:\/\/www.mathcs.duq.edu\/larget\/bambe.html\" target=\"_blank\">BAMBE<\/a> A nice program by Bret Larget and Donald Simon for the Bayesian inference of phylogeny.<\/p>\n<p><a href=\"http:\/\/www.agapow.net\/software\/mac5\/\" target=\"_blank\">Mac5<\/a> A program by Paul-Michael Agapow that deals with gaps as a fifth state.<\/p>\n<p><a href=\"http:\/\/evolve.zoo.ox.ac.uk\/beast\/\" target=\"_blank\">Beast<\/a> BEAST, written by Alexei Drummond and Andrew Rambaut, is a cross-platform program for Bayesian MCMC analysis of molecular sequences. It is particularly good for molecular clock analyses.<\/p>\n<p><a href=\"http:\/\/physwww.mcmaster.ca\/~higgsp\/Phylogeny.htm\" target=\"_blank\">PHASE<\/a> Paul Higgs is the author of Phase, designed specifically for use with RNA sequences that have a conserved secondary structure, e.g. rRNA and tRNA.<\/p>\n<h1>2. MrBayes\u7684\u5b89\u88c5<\/h1>\n<p>\u901a\u8fc7MrByes\u5b98\u7f51\uff1a<a href=\"http:\/\/mrbayes.sourceforge.net\/\" target=\"_blank\">http:\/\/mrbayes.sourceforge.net\/<\/a>\u6765\u4e0b\u8f7dMrBayes\u8f6f\u4ef6\u5e76\u5b89\u88c5\u3002\u8f6f\u4ef6\u5305\u4e2d\u6709\u5176PDF\u683c\u5f0f\u7684Manual\u3002\u5728windows\u7cfb\u7edf\u4e0b\u7684MrBayes\u4e0d\u80fd\u652f\u6301\u591a\u7ebf\u7a0b\u8fd0\u884c\uff0c\u5728Linux\u4e0b\u5219\u80fd\u5f88\u597d\u5730\u8fdb\u884c\u5e76\u884c\u8fd0\u7b97\u3002<\/p>\n<p>MrBayes\u7684\u5b89\u88c5\u8fc7\u7a0b\u9700\u8981\u6ce8\u610f\uff1a\u5176src\u6587\u4ef6\u5939\u7684\u6e90\u7801\u6587\u4ef6\u4e2d\u6709\u4e2a\u540d\u4e3aCompileInstructions.txt\u7684\u6587\u4ef6\uff0c\u4ecb\u7ecd\u4e86\u5982\u4f55\u8fdb\u884c\u8f6f\u4ef6\u7684\u5b89\u88c5\u3002<\/p>\n<pre>$ sudo yum install openmpi* mpi*\r\n$ wget http:\/\/sourceforge.net\/projects\/mrbayes\/files\/latest\/download?source=files\r\n$ tar zxf mrbayes-3.*.*.tar.gz\r\n$ cd mrbayes_3.*.*\/src\r\n$ autoconf\r\n$ .\/configure --with-beagle=no --enable-mpi=yes\r\n$ make -j 8\r\n$ sudo cp mb \/usr\/local\/bin  (optional)<\/pre>\n<p>\u4ee5\u4e0b\u662f\u4f7f\u7528MrBayes\u7684\u6307\u4ee4\uff0c\u5355\u7ebf\u7a0b\u6216\u591a\u7ebf\u7a0b\u8fd0\u884cMrBayes.<\/p>\n<pre>$ .\/mb\r\n$ cat &gt; ~\/.mpd.conf\r\nMPD_SECRETWORD=mr45-j9z\r\n$ chmod 600 ~\/.mpd.conf\r\n$ mpd &amp;\r\n$ mpirun -np 8 .\/mb\r\n                            MrBayes v3.2.1 x64\r\n\r\n                      (Bayesian Analysis of Phylogeny)\r\n\r\n                             (Parallel version)\r\n                         (24 processors available)\r\n\r\n              Distributed under the GNU General Public License\r\n\r\n               Type \"help\" or \"help <command><\/command>\" for information\r\n                     on the commands that are available.\r\n\r\n                   Type \"about\" for authorship and general\r\n                       information about the program.\r\n\r\nMrBayes &gt;<\/pre>\n<h1>\u9644\u52a0\u4f7f\u7528\u5fc3\u5f97<\/h1>\n<p>1. \u4f7f\u7528\u591a\u7ebf\u7a0b\u7248\u672c\u5f97\u5230\u7684\u6811\u72b6\u56fe\u548c\u5355\u7ebf\u7a0b\u7248\u672c\u7684\u6811\u72b6\u56fe\u5b8c\u5168\u4e0d\u4e00\u6837\uff0c\u5dee\u522b\u592a\u5927\u3002\u591a\u7ebf\u7a0b\u7248\u672c\u7684\u6811\u72b6\u56fe\u5b8c\u5168\u662f\u6240\u6709\u7684\u5206\u652f\u90fd\u96c6\u5408\u5230\u4e00\u4e2a\u70b9\u4e0a\uff0c\u800c\u5355\u7ebf\u7a0b\u7684\u5c31\u6b63\u5e38\u4e86\u3002\u8fd9\u53ef\u80fd\u662f\u7531\u4e8e\u4e0d\u4f1a\u4f7f\u7528\u591a\u7ebf\u7a0b\u8fd0\u884cMrBayes\u7684\u539f\u56e0 \u6216 \u8f6f\u4ef6\u5728\u591a\u7ebf\u7a0b\u4e0b\u7684\u8fd0\u7b97\u65b9\u6cd5\u4e0d\u597d(\u53ef\u80fd\u6027\u5f88\u5c0f)<\/p>\n<p>2. \u5728\u4f7f\u7528MrBayes 3.2.1\u7248\u672c\u4e2d\uff0c\u53d1\u73b0\u9ed8\u8ba4\u4e0b\u5f97\u51fa\u7684tree\u6587\u4ef6\u4e2d\u5728treeview\u8f6f\u4ef6\u4e2d\u663e\u73b0\u4e0d\u51fa\u540e\u9a8c\u6982\u7387\uff0c\u800c3.1.2\u7248\u672c\u6709\u3002<\/p>\n<p>3. \u4f46\u662f\u572864\u4f4d\u7684Linux\u7cfb\u7edf\u4e2d\u4f7f\u75283.1.2\u7248\u672c\u603b\u662f\u4f1aCrash (core dumped)\u3002\u5e78\u597d\u5728\u6b64\u7f51\u9875\u4e2d\u627e\u5230\u4e86\u89e3\u51b3\u65b9\u6cd5\uff1a<a href=\"https:\/\/technical.bestgrid.org\/index.php\/Bioinformatics_applications_at_University_of_Canterbury_HPC\" target=\"_blank\">Bioinformatics applications at University of Canterbury HPC<\/a>\u3002<\/p>\n<p>\u9700\u8981\u5bf9Mrbayes\u5b89\u88c5\u5305\u4e2d\u591a\u4e2a\u6587\u4ef6\u8fdb\u884c\u4fee\u6539\uff0c\u65b9\u6cd5\u5c31\u662f\u6253\u4e2a\u8865\u4e01\uff1a<a href=\"https:\/\/technical.bestgrid.org\/images\/7\/73\/Mb_64bit-safe.patch.txt\" target=\"_blank\">mb_64bit_safe.patch<\/a>\uff0c\u518d\u4ee564\u4f4d\u7684\u53c2\u6570\u6765make\u3002\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<pre>\r\n$ wget http:\/\/sourceforge.net\/projects\/mrbayes\/files\/mrbayes\/3.1.2\/mrbayes-3.1.2.tar.gz\r\n$ tar zxf mrbayes-3.1.2.tar.gz\r\n$ cd mrbayes-3.1.2\r\n$ wget https:\/\/technical.bestgrid.org\/images\/7\/73\/Mb_64bit-safe.patch.txt\r\n$ patch -R -p 1 < Mb_64bit-safe.patch.txt\r\n$ OBJECT_MODE=64 make _64BIT=yes\r\n<\/pre>\n<p>\u81f3\u6b64\uff0c\u5219\u8fd0\u884cMrBayes\u6b63\u5e38\u4e86\u3002<\/p>\n<h1>3. MrBayes\u7684\u7b80\u5355\u6559\u7a0b<\/h1>\n<h2>3.1 \u4f7f\u7528MrBayes\u6765\u505a\u4e00\u4e2a\u5178\u578b\u7684 Bayesian phylogenetic analysis\uff0c\u5305\u62ec4\u4e2a\u6b65\u9aa4\uff1a<\/h2>\n<p>a. Read the Nexus data file<br \/>\nb. Set the evolutionary model<br \/>\nc. Run the analysis<br \/>\nd. Summarize the samples<\/p>\n<h2>3.2 MrBayes\u5206\u6b65\u6f14\u793a<\/h2>\n<p>1. \u5bfc\u5165nex\u6587\u4ef6.\u672c\u6848\u4f8b\u4f7f\u7528\u591a\u7ebf\u7a0b\u8fd0\u884c\u7684\u6f14\u793a,\u4f7f\u752824\u4e2aCPU\u8fd0\u884c\u7a0b\u5e8f\u3002<\/p>\n<pre>$ mpd &amp;\r\n$ mpirun -np 24 mb\r\nMrBayes &gt; execute example.nex<\/pre>\n<p>2. \u8bbe\u7f6e\u8fdb\u5316\u6a21\u578b\u53c2\u6570.\u672c\u4f8b\u4e2d\u8bbe\u5b9a\u6570\u636e\u4e3aDNA\u6570\u636e.<\/p>\n<pre>MrBayes &gt; lset nst=6 rates=invgamma<\/pre>\n<p>3.1 \u4e3b\u7a0b\u5e8f\u8fd0\u884c\u3002<br \/>\n\u4ee5\u4e0b\u547d\u4ee4\u4e2dnchains\u7684\u503c\u8981 &gt;= \u8bbe\u7f6e\u4f7f\u7528CPU\u6570\u3002\u5728\u5355\u7ebf\u7a0b\u8fd0\u884c\u7684\u65f6\u5019\u53ef\u4ee5\u4e0d\u9700\u8981\u8bbe\u7f6e,\u800c\u5728\u591a\u7ebf\u7a0b\u8fd0\u884c\u7684\u65f6\u5019\u4e0d\u8bbe\u7f6e\u5219\u4f1a\u62a5\u9519\uff1bngen\u5219\u662f\u8fd0\u884c\u7684\u957f\u5ea6\uff0c\u9ed8\u8ba41,000,000\u6b21\uff1bsamplefreq\u5219\u662f\u53d6\u6837\u9891\u7387\uff0c\u6bcf\u9694\u591a\u5c11\u6b21\u8fd0\u884c\u6b21\u6570\u53d6\u4e00\u6b21\u6837\uff1bprintfreq\u662f\u6253\u5370\u9891\u7387\uff0c\u5373\u6bcf\u8fd0\u884c\u591a\u5c11\u6b21\u5c06\u6253\u5370\u4e00\u884c\u7ed3\u679c\u5230\u5c4f\u5e55\u4e0a\uff0c\u9ed8\u8ba4\u4e3a500\uff1bdiagnfreq\u5219\u4ee3\u8868\u6bcf\u8fd0\u884c\u591a\u5c11\u6b21\u5206\u6790\u4e00\u6b21\u7ed3\u679c\uff0c\u5f97\u51fa Average standard deviation of split frequencies\uff0c\u9ed8\u8ba4\u662f5,000.<\/p>\n<p>\u8fd0\u884c\u65f6\uff0c\u4f1a\u5728\u8f93\u51fa\u5230\u5c4f\u5e55\u7684\u6700\u540e\u4e00\u5217\u770b\u5230\u9884\u6d4b\u7684\u7a0b\u5e8f\u5269\u4f59\u8fd0\u884c\u65f6\u95f4\u3002<\/p>\n<pre>MrBayes &gt; mcmc nchains=24 ngen=2000000 samplefreq=1000 printfreq=500 diagnfreq=5000<\/pre>\n<p>3.2 \u5982\u679c\u5728\u8bbe\u5b9a\u7684\u4ee3\u6570\u8fd0\u884c\u5b8c\u6bd5\u540e\uff0c\u7ed9\u51fa\u7684 Average standard deviation of split frequencies\u7684\u503c\u5c0f\u4e8e0.01\uff0c\u5219\u6839\u636e\u63d0\u793a\u8f93\u5165\u2018no'\u6765\u505c\u6b62\u8fd0\u884c\uff0c\u53cd\u4e4b\u5219\u8f93\u5165'yes'\u7ee7\u7eed\u8fd0\u884c\u76f4\u5230\u6ee1\u8db3\u5176\u503c\u5c0f\u4e8e0.01\u4e3a\u6b62\u3002<\/p>\n<p>If you are intersted mainly in the well-supported parts of the tree, a standard deviation below 0.05 may be adequate.<\/p>\n<p>4.1 \u4f7f\u7528sump\u6765\u5bf9\u53c2\u6570\u503c\u8fdb\u884c\u5f52\u7eb3\u3002\u8bbe\u7f6e\u7684burnin\u503c\u4e3a (ngen \/ samplefreq) * 0.25 \u3002\u7a0b\u5e8f\u7ed9\u51fa\u4e00\u4e2a\u6982\u62ec\u7684\u8868\uff0c\u8981\u786e\u4fddPSRF\u4e00\u5217\u4e2d\u7684\u503c\u63a5\u8fd1 1.0\uff0c\u5426\u5219\u9700\u8981\u8fd0\u884c\u8be5\u591a\u7684\u4ee3\u6570\u3002<\/p>\n<pre>MrBayes &gt; sump burnin=500<\/pre>\n<p>4.2 \u4f7f\u7528sumt\u6765\u6784\u6811\u3002burnin\u503c\u548c\u524d\u4e00\u4e2a\u76f8\u540c<\/p>\n<pre>MrBayes &gt; sumt burnin=500<\/pre>\n<h1>4. \u8be6\u7ec6\u7684MrBayes\u4f7f\u7528\u6559\u7a0b<\/h1>\n<h2>4.1 \u5c06\u6570\u636e\u5bfc\u5165\u5230MrBayes<\/h2>\n<p>MrBayes\u5bfc\u5165\u7684\u6570\u636e\u4e3aNexus\u6587\u4ef6\uff0c\u8be5\u6587\u4ef6\u53ef\u4ee5\u67094\u4e2d\u6570\u636e\u7c7b\u578b\uff1aaligned nucleotide or amino acid sequences, morphological (\"standard\") data, restriction site (binary) data\u3002Nexus\u6587\u4ef6\u4e2d\u53ef\u4ee5\u6df7\u5408\u6709\u8fd94\u79cd\u6570\u636e\u3002<\/p>\n<p>Nexus\u6570\u636e\u6587\u4ef6\u901a\u5e38\u7531\u5176\u5b83\u7a0b\u5e8f\u4ea7\u751f\uff0c\u6bd4\u5982 Mesquite\u3002\u6587\u4ef6\u4ee5 nex \u4e3a\u540e\u7f00\u3002<\/p>\n<p>\u4f7f\u7528 <strong>execute fielename<\/strong> \u6216 <strong>exe filename<\/strong>\u5c06\u6587\u4ef6\u4e2d\u7684\u6570\u636e\u5bfc\u5165\u5230MrBayes\u4e2d\u3002<\/p>\n<h2>4.2 \u6307\u5b9a\u6a21\u578b<\/h2>\n","protected":false},"excerpt":{"rendered":"<p>1. \u7b80\u4ecb \u4f7f\u7528\u8d1d\u53f6\u65af\u6cd5\u6784\u5efa\u8fdb\u5316\u6811\u7684\u8f6f\u4ef6\u6709\u5f88\u591a\u3002\u5728\u8fd9\u91cc\u7b80\u8981\u4ecb\u7ecdMrBayes\u7684\u5b89 &hellip; <a href=\"http:\/\/www.chenlianfu.com\/?p=1364\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/posts\/1364"}],"collection":[{"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1364"}],"version-history":[{"count":12,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/posts\/1364\/revisions"}],"predecessor-version":[{"id":1602,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/posts\/1364\/revisions\/1602"}],"wp:attachment":[{"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1364"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}