├── doc ├── Makefile.am ├── SMME_paper │ ├── src │ │ ├── fig1.png │ │ ├── fig2.png │ │ ├── fig3.png │ │ ├── fig4.png │ │ ├── fig5.png │ │ ├── fig6.png │ │ ├── fig7.png │ │ ├── fig8.png │ │ ├── fig9.png │ │ ├── fig10.png │ │ ├── fig11.png │ │ ├── fig12.png │ │ ├── README.md │ │ └── Huelsenbeck_Ronquist_SMME_2005.bib │ ├── Huelsenbeck_Ronquist_SMME_2005.pdf │ └── Makefile.am └── manual │ ├── src │ ├── Appendix_Fig1.pdf │ ├── Appendix_Fig2.pdf │ └── Appendix_Fig3.pdf │ ├── Manual_MrBayes_v3.2.pdf │ └── Makefile.am ├── Makefile.am ├── examples ├── Makefile.am ├── codon.nex ├── replicase.nex ├── primates.nex ├── avian_ovomucoids.nex ├── hym.nex └── Makefile.in ├── .github ├── ISSUE_TEMPLATE │ ├── internal-issue.md │ └── bug-report.md └── workflows │ ├── doc-tests.yml │ └── code-tests.yml ├── testing ├── Makefile.am ├── test1.nex ├── test2.nex └── runtests.sh.in ├── src ├── Makefile.am ├── command.h ├── best.h ├── sumpt.h ├── mcmc.h ├── mbbeagle.h ├── model.h ├── config.h.in ├── likelihood.h ├── proposal.h └── utils.h ├── autotools ├── ax_reset_header_cache.m4 ├── test-driver ├── missing ├── install-sh └── compile ├── .gitignore ├── TODO ├── README ├── INSTALL-Docker-Ubuntu.md ├── INSTALL-Docker-CentOS.md ├── NEWS ├── configure.ac └── INSTALL /doc/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS= manual SMME_paper 2 | -------------------------------------------------------------------------------- /doc/SMME_paper/src/fig1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/SMME_paper/src/fig1.png -------------------------------------------------------------------------------- /doc/SMME_paper/src/fig2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/SMME_paper/src/fig2.png -------------------------------------------------------------------------------- /doc/SMME_paper/src/fig3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/SMME_paper/src/fig3.png -------------------------------------------------------------------------------- /doc/SMME_paper/src/fig4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/SMME_paper/src/fig4.png -------------------------------------------------------------------------------- /doc/SMME_paper/src/fig5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/SMME_paper/src/fig5.png -------------------------------------------------------------------------------- /doc/SMME_paper/src/fig6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/SMME_paper/src/fig6.png -------------------------------------------------------------------------------- /doc/SMME_paper/src/fig7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/SMME_paper/src/fig7.png -------------------------------------------------------------------------------- /doc/SMME_paper/src/fig8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/SMME_paper/src/fig8.png -------------------------------------------------------------------------------- /doc/SMME_paper/src/fig9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/SMME_paper/src/fig9.png -------------------------------------------------------------------------------- /doc/SMME_paper/src/fig10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/SMME_paper/src/fig10.png -------------------------------------------------------------------------------- /doc/SMME_paper/src/fig11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/SMME_paper/src/fig11.png -------------------------------------------------------------------------------- /doc/SMME_paper/src/fig12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/SMME_paper/src/fig12.png -------------------------------------------------------------------------------- /doc/manual/src/Appendix_Fig1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/manual/src/Appendix_Fig1.pdf -------------------------------------------------------------------------------- /doc/manual/src/Appendix_Fig2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/manual/src/Appendix_Fig2.pdf -------------------------------------------------------------------------------- /doc/manual/src/Appendix_Fig3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/manual/src/Appendix_Fig3.pdf -------------------------------------------------------------------------------- /doc/manual/Manual_MrBayes_v3.2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/manual/Manual_MrBayes_v3.2.pdf -------------------------------------------------------------------------------- /doc/SMME_paper/Huelsenbeck_Ronquist_SMME_2005.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NBISweden/MrBayes/HEAD/doc/SMME_paper/Huelsenbeck_Ronquist_SMME_2005.pdf -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | dist_doc_DATA= COPYING README NEWS 2 | 3 | EXTRA_DIST= INSTALL 4 | 5 | SUBDIRS= src examples testing 6 | 7 | if BUILD_DOC 8 | SUBDIRS+= doc 9 | endif 10 | -------------------------------------------------------------------------------- /examples/Makefile.am: -------------------------------------------------------------------------------- 1 | examplesdir= ${datarootdir}/examples/${PACKAGE} 2 | 3 | dist_examples_DATA= \ 4 | avian_ovomucoids.nex \ 5 | codon.nex \ 6 | cynmix.nex \ 7 | finch.nex \ 8 | hymfossil.nex \ 9 | kim.nex \ 10 | primates.nex \ 11 | replicase.nex 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/internal-issue.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Internal issue 3 | about: ONLY for use by developers associated with this project 4 | 5 | --- 6 | 7 | 9 | -------------------------------------------------------------------------------- /testing/Makefile.am: -------------------------------------------------------------------------------- 1 | TEST_EXTENSIONS= .nex 2 | 3 | NEX_LOG_DRIVER= \ 4 | env AM_TAP_AWK='$(AWK)' $(SHELL) \ 5 | $(top_srcdir)/autotools/tap-driver.sh 6 | 7 | NEX_LOG_COMPILER= ./runtests.sh 8 | 9 | TESTS= test1.nex \ 10 | test2.nex 11 | 12 | EXTRA_DIST= \ 13 | $(TESTS) \ 14 | runtests.sh 15 | -------------------------------------------------------------------------------- /testing/test1.nex: -------------------------------------------------------------------------------- 1 | #NEXUS 2 | [Test 1. Mixed model with partitions.] 3 | begin mrbayes; 4 | set autoclose=yes nowarnings=yes; 5 | execute "primates.nex"; 6 | partition test = 2: 1-400, 401-.; 7 | set partition=test; 8 | lset nst=mixed rates=invgamma; 9 | unlink statefr=(all) revmat=(all) pinvar=(all) shape=(all); 10 | prset ratepr=variable; 11 | mcmc ng=20000; 12 | sump; 13 | sumt; 14 | end; 15 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS= mb 2 | 3 | mb_SOURCES= \ 4 | bayes.c \ 5 | bayes.h \ 6 | best.c \ 7 | best.h \ 8 | command.c \ 9 | command.h \ 10 | likelihood.c \ 11 | likelihood.h \ 12 | mbbeagle.c \ 13 | mbbeagle.h \ 14 | mcmc.c \ 15 | mcmc.h \ 16 | model.c \ 17 | model.h \ 18 | proposal.c \ 19 | proposal.h \ 20 | sumpt.c \ 21 | sumpt.h \ 22 | utils.c \ 23 | utils.h 24 | 25 | mb_CFLAGS= $(CFLAGS) 26 | 27 | mb_LDADD= $(BEAGLE_LIBS) 28 | mb_CFLAGS+= $(BEAGLE_CFLAGS) 29 | -------------------------------------------------------------------------------- /testing/test2.nex: -------------------------------------------------------------------------------- 1 | #NEXUS 2 | [Test 2. Mixed model with partitions. IGR-clock model.] 3 | begin mrbayes; 4 | set autoclose=yes nowarnings=yes; 5 | execute "primates.nex"; 6 | partition test = 2: 1-400, 401-.; 7 | set partition=test; 8 | lset nst=mixed rates=invgamma; 9 | unlink statefr=(all) revmat=(all) pinvar=(all) shape=(all); 10 | prset brlenspr=clock:uniform clockratepr=exp(1) clockvarpr=igr; 11 | mcmc ng=20000; 12 | sump; 13 | sumt; 14 | end; 15 | -------------------------------------------------------------------------------- /.github/workflows/doc-tests.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: Run documentation build tests 4 | on: 5 | push: 6 | paths-ignore: 7 | - 'src/**' 8 | 9 | jobs: 10 | build-doc: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout 15 | uses: actions/checkout@v2 16 | 17 | - name: Install documentation prerequisites 18 | run: sudo apt-get install latexmk texlive-formats-extra 19 | 20 | - name: Configure project 21 | run: ./configure 22 | 23 | - name: Build project 24 | run: make pdf 25 | -------------------------------------------------------------------------------- /autotools/ax_reset_header_cache.m4: -------------------------------------------------------------------------------- 1 | # SYNOPSIS 2 | # 3 | # AX_RESET_HEADERS_CACHE(headers ...) 4 | # 5 | # DESCRIPTION 6 | # 7 | # This macro invalidates the headers cache variables created by previous AC_CHECK_HEADER/AC_CHECK_HEADERS checks. 8 | # 9 | AC_DEFUN([AX_RESET_HEADERS_CACHE], [ 10 | AS_FOR([AX_var], [ax_var], [$1], [ 11 | dnl You can replace "ac_cv_header_" with any prefix from http://www.gnu.org/software/autoconf/manual/html_node/Cache-Variable-Index.html 12 | AS_VAR_PUSHDEF([ax_Var], [ac_cv_header_${ax_var}]) 13 | AS_UNSET([ax_Var]) 14 | AS_VAR_POPDEF([ax_Var]) 15 | ]) 16 | ]) # AX_RESET_HEADERS_CACHE 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated on OS X sometimes (by dsymutil when using valgrind) 2 | *.dSYM 3 | 4 | # Distribution file (generated by "make distcheck" and "make dist") 5 | mrbayes-*.tar.gz 6 | 7 | # GNU autotools generated files 8 | Makefile 9 | autom4te.cache 10 | config.cache 11 | config.h 12 | config.log 13 | config.status 14 | 15 | # Generated by Unix build 16 | *~ 17 | src/*.o 18 | src/.deps 19 | src/mb 20 | src/stamp-h1 21 | 22 | # hidden files 23 | .gitignore 24 | 25 | # OS X files 26 | .DS_Store 27 | Thumbs.db 28 | 29 | # LaTeX temporary files 30 | .texpadtmp 31 | 32 | # XCode project 33 | *.xcodeproj 34 | 35 | # Tags files 36 | TAGS 37 | tags 38 | 39 | # cscope output 40 | cscope.out 41 | 42 | # private file 43 | local.env 44 | build 45 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Use this to report a suspected bug 4 | 5 | --- 6 | 7 | 10 | 11 | ### What is the current observed behaviour? 12 | 14 | 15 | ### What is the expected/wanted behaviour? 16 | 17 | ### How may we reproduce this bug? 18 | 19 | 20 | Steps to reproduce the bug: 21 | 1. 22 | 2. 23 | 3. 24 | 4. 25 | 26 | ### Would you be able to compile and run MrBayes to test fixes to this bug? 27 | - [ ] Yes, I know how to use `git` and how to compile MrBayes. 28 | - [ ] No, sorry. 29 | 30 | ### What is the environment that you run MrBayes in? 31 | - Operating system (including variant and release): 32 | - Version of MrBayes: 33 | - If possible, include the output of the `Version` command in MrBayes below: 34 | 35 | 37 | 38 | ### Other information that may be of use to us in resolving this issue 39 | -------------------------------------------------------------------------------- /src/command.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMAND_H_ 2 | #define COMMAND_H_ 3 | 4 | int AddString (char ***list, int len, char *token); 5 | BitsLong Expecting (int y); 6 | int CheckString (char **list, int len, char *token, int *matchIndex); 7 | int CheckStringValidity (char *s); 8 | int DoExecute (void); 9 | int FreeMatrix (void); 10 | int GetToken (char *token, int *tokenType, char **sourceH); 11 | int FindValidCommand (char *tk, int *numMatches); 12 | int IsArgValid (char *s, char *validArg); 13 | int IsIn (char ch, char *s); 14 | int IsSame (char *s1, char *s2); 15 | int IsWhite (char c); 16 | int ParseCommand (char *s); 17 | void ResetCharacterFlags (void); 18 | void ResetTaxaFlags (void); 19 | int RootUserTree (TreeNode *p); 20 | void SetUpParms (void); 21 | void ShowNodes (TreeNode *p, int indent, int isThisTreeRooted); 22 | int ShowTree (Tree *t); 23 | void State_CODON (char *state, int code, int division); 24 | void State_DOUBLET (char *state, int code); 25 | int StateCode_AA (int n); 26 | int StateCode_NUC4 (int n); 27 | int StateCode_Std (int n); 28 | char WhichAA (int x); 29 | char WhichNuc (int x); 30 | char WhichRes (int x); 31 | char WhichStand (int x); 32 | 33 | #endif /* COMMAND_H_ */ 34 | -------------------------------------------------------------------------------- /src/best.h: -------------------------------------------------------------------------------- 1 | #ifndef BEST_H_ 2 | #define BEST_H_ 3 | 4 | /* typedefs used by Fredrik's code, derived from BEST code */ 5 | 6 | /* struct for constraints (similar to Distance in BEST code, except 7 | that a bitfield is used to hold info on the taxon pair) */ 8 | typedef struct { 9 | double depth; 10 | BitsLong* pairSet; 11 | } Depth; 12 | 13 | /* Declaration of functions that are called from MrBayes */ 14 | void AllocateBestChainVariables (void); 15 | int FillSpeciesTreeParams (RandLong* seed, int from, int to); 16 | void FreeBestChainVariables (void); 17 | int IsSpeciesTreeConsistent (Tree *speciesTree, int chain); 18 | double LnSpeciesTreeProb (int chain); 19 | double LnJointGeneTreeSpeciesTreePr (Tree **geneTrees, int numGeneTrees, Tree *speciesTree, int chain); 20 | int Move_GeneTree1 (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 21 | int Move_GeneTree2 (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 22 | int Move_GeneTree3 (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 23 | int Move_NodeSliderGeneTree (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 24 | int Move_SpeciesTree (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 25 | void ShowUpperTriangMatrix (double *values, int squareSize); 26 | 27 | /* NOTE: To add and set up more move functions, a struct needs to be added to SetUpMoveTypes in model.c */ 28 | 29 | #endif /* BEST_H_ */ 30 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | TODO: 2 | 3 | * Data parallelization 4 | 5 | MrBayes currently uses MPI to run different chains in parallel 6 | on different processors. However, data sets are becoming a lot 7 | larger now with respect to number of sites, so it is becoming 8 | important also to distribute likelihood computations on data across 9 | processors. This would require some programming but it is not a 10 | huge challenge. 11 | 12 | * Native AVX and FMA code 13 | 14 | I have added native AVX and FMA code for the 4by4 nucleotide models. 15 | It would be straightforward to add native AVX and FMA code for the 16 | other models. Particularly the AA-model would probably benefit from 17 | this code (when not using the beagle library). 18 | 19 | * Dynamic scaling 20 | 21 | Scaling of likelihoods take a surprisingly large amount of time when 22 | using the standard 4by4 nucleotide models. Maxim added dynamic 23 | scaling code for the Beagle implementation but not for the native 24 | likelihoood calculators, which are faster. The dynamic scaling 25 | code adjusts the rescaling frequency so that you do not rescale 26 | likelihoods more often than needed to avoid numerical exceptions and 27 | achieve a reasonable level of precision. For typical-size trees 28 | and the 4by4 model, no rescaling is often needed. I added the 29 | infrastructure needed to support dynamic scaling for both Beagle and 30 | native calculators in December 2015. In principle, it should be 31 | straightforward now to rewrite Maxim's dynamic scaling code (which 32 | is not so pretty C code) so that it works for both Beagle and native 33 | likelihood calculators. 34 | -------------------------------------------------------------------------------- /examples/codon.nex: -------------------------------------------------------------------------------- 1 | #NEXUS 2 | 3 | [ Example command file, which reads in a data file and sets up different codon models. 4 | Use one of the blocks to set up the model you are interested in. ] 5 | 6 | begin mrbayes; 7 | [The following line is useful for automatic execution with no 8 | warnings issued before files are overwritten and automatic 9 | termination of chains after the prespecified number of generations.] 10 | set autoclose=yes nowarn=yes; 11 | 12 | [Read in a data file with protein-coding sequences] 13 | execute replicase.nex; 14 | 15 | [Use ONE of the blocks below depending one what model you like] 16 | 17 | [One omega value for the gene 18 | The estimated single omega value, valid for 19 | the entire gene or gene fragment, is printed 20 | to the .p file(s)] 21 | lset nucmodel=codon; 22 | 23 | [Omega variation across sites with three classes, 24 | omega_1 < 1, omega_2 = 1, omega_3 > 1. 25 | The estimated omega_1 and omega_3 are printed to 26 | the .p file(s) as omega(-) and omega(+). 27 | If you set report possel=yes, you 28 | will also get the probability of each site being in 29 | the positively selected omega class. 30 | If you set report siteomega=yes, you 31 | will also get the omega value for each site.] 32 | lset nucmodel=codon omegavar=ny98; 33 | report possel=yes; 34 | report siteomega=yes; 35 | 36 | [Omega variation across sites with three classes, 37 | omega_1 < omega_2 < omega_3. Otherwise very similar 38 | to the Nielsen and Yang model.] 39 | lset nucmodel=codon omegavar=m3; 40 | report possel=yes; 41 | 42 | [These models are slow, so print to screen more frequently] 43 | mcmcp printfreq = 10; 44 | 45 | [Only the mcmc command is missing now to run the analysis] 46 | end; 47 | 48 | -------------------------------------------------------------------------------- /doc/manual/Makefile.am: -------------------------------------------------------------------------------- 1 | dist_pdf_DATA= Manual_MrBayes_v3.2.pdf 2 | 3 | EXTRA_DIST= src 4 | 5 | DISTCLEANFILES= Manual_MrBayes_v3.2.pdf 6 | 7 | CLEANFILES= \ 8 | Manual_MrBayes_v3.2.aux \ 9 | Manual_MrBayes_v3.2.bbl \ 10 | Manual_MrBayes_v3.2.blg \ 11 | Manual_MrBayes_v3.2.fdb_latexmk \ 12 | Manual_MrBayes_v3.2.fls \ 13 | Manual_MrBayes_v3.2.log \ 14 | Manual_MrBayes_v3.2.out \ 15 | Manual_MrBayes_v3.2.toc 16 | 17 | envvars= \ 18 | TEXINPUTS=$(srcdir)/src: \ 19 | BIBINPUTS=$(srcdir)/src: \ 20 | BSTINPUTS=$(srcdir)/src: 21 | 22 | deps= \ 23 | $(srcdir)/src/Appendix_Fig1.pdf \ 24 | $(srcdir)/src/Appendix_Fig2.pdf \ 25 | $(srcdir)/src/Appendix_Fig3.pdf \ 26 | $(srcdir)/src/Manual_MrBayes_v3.2.tex \ 27 | $(srcdir)/src/bayes.bib \ 28 | $(srcdir)/src/sysbio.bst 29 | 30 | if HAVE_LATEX 31 | if HAVE_LATEXMK 32 | 33 | pdf: Manual_MrBayes_v3.2.pdf 34 | 35 | Manual_MrBayes_v3.2.pdf: $(deps) 36 | env $(envvars) $(LATEXMK) -quiet -pdf $(srcdir)/src/Manual_MrBayes_v3.2 37 | 38 | else # !HAVE_LATEXMK 39 | 40 | # The order of pdflatex and bibtex runs below (and the number of runs) 41 | # mirrors what latexmk seems to want to do. 42 | Manual_MrBayes_v3.2.pdf: $(deps) 43 | env $(envvars) $(PDFLATEX) --interaction=batchmode $(srcdir)/src/Manual_MrBayes_v3.2 44 | env $(envvars) $(BIBTEX) -terse Manual_MrBayes_v3.2 45 | env $(envvars) $(PDFLATEX) --interaction=batchmode $(srcdir)/src/Manual_MrBayes_v3.2 46 | env $(envvars) $(BIBTEX) -terse Manual_MrBayes_v3.2 47 | env $(envvars) $(PDFLATEX) --interaction=batchmode $(srcdir)/src/Manual_MrBayes_v3.2 48 | env $(envvars) $(BIBTEX) -terse Manual_MrBayes_v3.2 49 | env $(envvars) $(PDFLATEX) --interaction=batchmode $(srcdir)/src/Manual_MrBayes_v3.2 50 | 51 | endif 52 | else # !HAVE_LATEX 53 | 54 | Manual_MrBayes_v3.2.pdf: 55 | @echo 'Can not build the manual PDF since LaTeX was not detected' >&2 56 | @exit 0 57 | 58 | endif 59 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Hi, 2 | 3 | This is the GitHub repository for MrBayes, a program used for Bayesian 4 | inference of phylogeny. 5 | 6 | 7 | Build instructions, very very short version (would install MrBayes as 8 | "/usr/local/bin/mb" on a Unix system): 9 | 10 | git clone --depth=1 https://github.com/NBISweden/MrBayes.git 11 | cd MrBayes 12 | ./configure 13 | make && sudo make install 14 | 15 | Refer to the document called "INSTALL" for further information. 16 | 17 | 18 | Current repository directory layout: 19 | 20 | . 21 | ├── autotools : Files relating to the build system 22 | ├── doc 23 | │   └── manual : The manual 24 | ├── examples : Example input data sets 25 | └── src : C source code 26 | 27 | 28 | The MrBayes web site is available at 29 | 30 | http://mrbayes.net/ 31 | 32 | 33 | Historical releases are tagged with "v3.2.0" (etc.) from release 3.2.0 34 | onwards. 35 | 36 | The 'master' branch contains releases. 37 | 38 | The 'develop' branch should hopefully, at all times, contain working 39 | development code that at least compiles. Apart from simple fixes, new 40 | development happens on feature branches off the 'develop' branch, and 41 | are merged back into 'develop' when finished. This more or less follows 42 | the "git-flow" branching model. 43 | 44 | The 'gh-pages' branch contains the web site (only). 45 | 46 | The 'testing' branch contains testing data files (only). 47 | 48 | After release 3.2.6 (November 2015), MrBayes entered "maintenance mode", 49 | and its care has been passed over to NBIS (National Bioinformatics 50 | Infrastructure Sweden, http://nbis.se/). The original development 51 | team is still involved with the program, but any future releases will 52 | probably be geared more towards bug-fixes rather than addition of new 53 | features. 54 | 55 | With kind regards, 56 | Andreas (Kusalananda) Kähäri, and 57 | Johan Nylander 58 | NBIS 59 | -------------------------------------------------------------------------------- /src/sumpt.h: -------------------------------------------------------------------------------- 1 | #ifndef SUMPT_H_ 2 | #define SUMPT_H_ 3 | 4 | /* struct to hold info about a .p file */ 5 | typedef struct 6 | { 7 | int longestLineLength; 8 | int headerLine; 9 | int firstParamLine; 10 | int numRows; 11 | int numColumns; 12 | } SumpFileInfo; 13 | 14 | /* struct to hold info about a model probability */ 15 | typedef struct 16 | { 17 | int index; 18 | double prob; 19 | } ModelProb; 20 | 21 | /* struct to hold a parameter sample, possibly from multiple files */ 22 | typedef struct 23 | { 24 | MrBFlt **values; 25 | } ParameterSample; 26 | 27 | /* function declarations */ 28 | int AllocateParameterSamples (ParameterSample **parameterSamples, int numRuns, int numRows, int numColumns); 29 | int DoSump (void); 30 | int DoSumpParm (char *parmName, char *tkn); 31 | int DoSumSs (void); 32 | int DoSumSsParm (char *parmName, char *tkn); 33 | int ExamineSumpFile (char *fileName, SumpFileInfo *fileInfo, char ***headerNames, int *nHeaders); 34 | int FindHeader (char *token, char **headerNames, int nHeaders, int *index); 35 | void FreeParameterSamples (ParameterSample *parameterSamples); 36 | int GetHeaders (char ***headerNames, char *headerLine, int *nHeaders); 37 | int PrintPlot (MrBFlt *xVals, MrBFlt *yVals, int nSamples); 38 | int ReadParamSamples (char *fileName, SumpFileInfo *fileInfo, ParameterSample *parameterSamples, int runNo); 39 | 40 | int DoCompareTree (void); 41 | int DoCompareTreeParm (char *parmName, char *tkn); 42 | int DoCompRefTree (void); 43 | int DoSumt (void); 44 | int DoSumtParm (char *parmName, char *tkn); 45 | int DoSumtTree (void); 46 | int DoSumtTreeParm (char *parmName, char *tkn); 47 | void ResetTranslateTable (void); 48 | int ShowConTree (FILE *fp, PolyTree *t, int screenWidth, int showSupport); 49 | void ShowParts (FILE *fp, BitsLong *p, int nTaxaToShow); 50 | 51 | #endif /* SUMPT_H_ */ 52 | -------------------------------------------------------------------------------- /.github/workflows/code-tests.yml: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | name: Run code build tests 4 | on: 5 | push: 6 | paths-ignore: 7 | - 'doc/**' 8 | 9 | jobs: 10 | without-mpi: 11 | name: Tests without MPI 12 | runs-on: ubuntu-latest 13 | strategy: 14 | matrix: 15 | beagle: [--with-beagle, --without-beagle] 16 | 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v2 20 | 21 | - name: Install Readline 22 | run: sudo apt-get install libreadline-dev 23 | 24 | - name: Install Beagle if needed 25 | if: ${{ matrix.beagle == '--with-beagle' }} 26 | run: sudo apt-get install libhmsbeagle-dev 27 | 28 | - name: Configure project 29 | run: ./configure --disable-doc --without-mpi ${{ matrix.beagle }} CC=clang 30 | 31 | - name: Build project 32 | run: make -j 2 33 | 34 | - name: Run test (not with Beagle for now) 35 | if: ${{ matrix.beagle != '--with-beagle' }} 36 | run: make check 37 | 38 | with-mpi: 39 | name: Tests with MPI 40 | runs-on: ubuntu-latest 41 | strategy: 42 | matrix: 43 | beagle: [--with-beagle, --without-beagle] 44 | 45 | steps: 46 | - name: Checkout 47 | uses: actions/checkout@v2 48 | 49 | - name: Install Readline 50 | run: sudo apt-get install libreadline-dev 51 | 52 | - name: Install Beagle if needed 53 | if: ${{ matrix.beagle == '--with-beagle' }} 54 | run: sudo apt-get install libhmsbeagle-dev 55 | 56 | - name: Install MPI if needed 57 | run: sudo apt-get install libopenmpi-dev 58 | 59 | - name: Configure project 60 | run: ./configure --disable-doc --with-mpi ${{ matrix.beagle }} CC=clang CFLAGS="$( mpicc --showme:compile )" LDFLAGS="$( mpicc --showme:link )" 61 | 62 | - name: Build project 63 | run: make -j 2 64 | 65 | - name: Run test (not with Beagle for now) 66 | if: ${{ matrix.beagle != '--with-beagle' }} 67 | run: make check 68 | -------------------------------------------------------------------------------- /src/mcmc.h: -------------------------------------------------------------------------------- 1 | #ifndef MCMC_H_ 2 | #define MCMC_H_ 3 | 4 | int AddToPrintString (char *tempStr); 5 | void AutotuneDirichlet (MrBFlt acceptanceRate, MrBFlt targetRate, int batch, MrBFlt *alphaPi, MrBFlt minTuning, MrBFlt maxTuning); 6 | void AutotuneMultiplier (MrBFlt acceptanceRate, MrBFlt targetRate, int batch, MrBFlt *lambda, MrBFlt minTuning, MrBFlt maxTuning); 7 | void AutotuneSlider (MrBFlt acceptanceRate, MrBFlt targetRate, int batch, MrBFlt *width, MrBFlt minTuning, MrBFlt maxTuning); 8 | void AutotuneRJClocks (MrBFlt acceptanceRate, MrBFlt targetRate, int batch, MrBFlt *w, MrBFlt minTuning, MrBFlt maxTuning); 9 | int DoMcmc (void); 10 | int DoMcmcp (void); 11 | int DoMcmcParm (char *parmName, char *tkn); 12 | int DoSs (void); 13 | int DoSsp (void); 14 | int DoSsParm (char *parmName, char *tkn); 15 | int ExhaustiveParsimonySearch (Tree *t, int chain, TreeInfo *tInfo); 16 | MrBFlt GetParsDP (Tree *t, TreeNode *p, int chain); 17 | void GetParsFP (Tree *t, TreeNode *p, int chain); 18 | int GetParsimonyBrlens (Tree *t, int chain, MrBFlt *brlens); 19 | MrBFlt GetParsimonyLength (Tree *t, int chain); 20 | void GetParsimonySubtreeRootstate (Tree *t, TreeNode *root, int chain); 21 | MrBFlt GetRate (int division, int chain); 22 | int LnBirthDeathPriorPr (Tree *t, MrBFlt clockRate, MrBFlt *prob, MrBFlt sR, MrBFlt eR, char *sS, MrBFlt sF); 23 | int LnCoalescencePriorPr (Tree *t, MrBFlt *prob, MrBFlt theta, MrBFlt growth); 24 | MrBFlt LnUniformPriorPr (Tree *t, MrBFlt clockRate); 25 | int LnFossilizationPriorPr (Tree *t, MrBFlt clockRate, MrBFlt *prob, MrBFlt *sR, MrBFlt *eR, MrBFlt *fR, MrBFlt sF, char *sS); 26 | int LogClockTreePriorRatio (Param *param, int chain, MrBFlt *lnPriorRatio); 27 | MrBFlt LogDirPrior (Tree *t, ModelParams *mp, int PV); 28 | MrBFlt LogOmegaPrior (MrBFlt w1, MrBFlt w2, MrBFlt w3); 29 | FILE *OpenNewMBPrintFile (char *fileName); 30 | int ResetScalersPartition (int *isScalerNode, Tree* t, unsigned rescaleFreq); 31 | int SafeSprintf (char **target, int *targetLen, char *fmt, ...); 32 | int SetFilePositions (int samplePos); 33 | MrBFlt TreeLength (Param *param, int chain); 34 | 35 | #endif /* MCMC_H_ */ 36 | -------------------------------------------------------------------------------- /src/mbbeagle.h: -------------------------------------------------------------------------------- 1 | #ifndef MBBEAGLE_H_ 2 | #define MBBEAGLE_H_ 3 | 4 | void BeaglePrintResources (void); 5 | void BeaglePrintFlags (long inFlags); 6 | void BeagleNotLinked (void); 7 | void BeagleThreadsNotAvailable (void); 8 | int BeagleCheckFlagCompatability (long inFlags); 9 | void BeagleAddGPUDevicesToList (int **beagleResource, int *beagleResourceCount); 10 | void BeagleRemoveGPUDevicesFromList (int **beagleResource, int *beagleResourceCount); 11 | int ScheduleLogLikeForAllDivisions (void); 12 | 13 | void LaunchBEAGLELogLikeForDivision (int chain, int d, ModelInfo* m, Tree* tree, MrBFlt* lnL); 14 | void *LaunchThreadLogLikeForDivision (void *arguments); 15 | MrBFlt LaunchLogLikeForAllDivisionsInParallel (int chain); 16 | void recalculateScalers (int chain); 17 | 18 | int InitBeagleInstance (ModelInfo *m, int division); 19 | 20 | int createBeagleInstance(ModelInfo *m, int nCijkParts, int numGammaCats, int numModelStates, int numCondLikes, int numScalers, int numChars, int numTiProbs, int numPartAmbigTips, int division); 21 | 22 | int TreeCondLikes_Beagle_Always_Rescale (Tree *t, int division, int chain); 23 | int TreeLikelihood_Beagle (Tree *t, int division, int chain, MrBFlt *lnL, int whichSitePats); 24 | int TreeTiProbs_Beagle (Tree *t, int division, int chain); 25 | int TreeCondLikes_Beagle_No_Rescale (Tree *t, int division, int chain); 26 | int TreeCondLikes_Beagle_Rescale_All (Tree *t, int division, int chain); 27 | 28 | int InitBeagleMultiPartitionInstance (void); 29 | void LaunchBEAGLELogLikeMultiPartition(int* divisions, int divisionCount, int chain, MrBFlt* lnL); 30 | int TreeTiProbs_BeagleMultiPartition (int* divisions, int divisionCount, int chain); 31 | int TreeCondLikes_BeagleMultiPartition_No_Rescale (int* divisions, int divisionCount, int chain); 32 | int TreeCondLikes_BeagleMultiPartition_Rescale_All (int* divisions, int divisionCount, int chain); 33 | int TreeCondLikes_BeagleMultiPartition_Always_Rescale (int* divisions, int divisionCount, int chain); 34 | int TreeLikelihood_BeagleMultiPartition (int* divisions, int divisionCount, int chain, MrBFlt *lnL, int whichSitePats); 35 | 36 | 37 | //extern char *beagleGetVersion (void); 38 | 39 | #endif /* MBBEAGLE_H_ */ 40 | -------------------------------------------------------------------------------- /doc/SMME_paper/Makefile.am: -------------------------------------------------------------------------------- 1 | dist_pdf_DATA= Huelsenbeck_Ronquist_SMME_2005.pdf 2 | 3 | EXTRA_DIST= src 4 | 5 | DISTCLEANFILES= Huelsenbeck_Ronquist_SMME_2005.pdf 6 | 7 | CLEANFILES= \ 8 | Huelsenbeck_Ronquist_SMME_2005.aux \ 9 | Huelsenbeck_Ronquist_SMME_2005.bbl \ 10 | Huelsenbeck_Ronquist_SMME_2005.blg \ 11 | Huelsenbeck_Ronquist_SMME_2005.fdb_latexmk \ 12 | Huelsenbeck_Ronquist_SMME_2005.fls \ 13 | Huelsenbeck_Ronquist_SMME_2005.log \ 14 | Huelsenbeck_Ronquist_SMME_2005.idx \ 15 | Huelsenbeck_Ronquist_SMME_2005.ilg \ 16 | Huelsenbeck_Ronquist_SMME_2005.ind \ 17 | Huelsenbeck_Ronquist_SMME_2005.toc 18 | 19 | envvars= \ 20 | TEXINPUTS=$(srcdir)/src: \ 21 | BIBINPUTS=$(srcdir)/src: \ 22 | BSTINPUTS=$(srcdir)/src: 23 | 24 | deps= \ 25 | $(srcdir)/src/Huelsenbeck_Ronquist_SMME_2005.bib \ 26 | $(srcdir)/src/Huelsenbeck_Ronquist_SMME_2005.tex \ 27 | $(srcdir)/src/fig1.png \ 28 | $(srcdir)/src/fig2.png \ 29 | $(srcdir)/src/fig3.png \ 30 | $(srcdir)/src/fig4.png \ 31 | $(srcdir)/src/fig5.png \ 32 | $(srcdir)/src/fig6.png \ 33 | $(srcdir)/src/fig7.png \ 34 | $(srcdir)/src/fig8.png \ 35 | $(srcdir)/src/fig9.png \ 36 | $(srcdir)/src/fig10.png \ 37 | $(srcdir)/src/fig11.png \ 38 | $(srcdir)/src/fig12.png \ 39 | $(srcdir)/src/svmult.cls 40 | 41 | if HAVE_LATEX 42 | if HAVE_LATEXMK 43 | 44 | pdf: Huelsenbeck_Ronquist_SMME_2005.pdf 45 | 46 | Huelsenbeck_Ronquist_SMME_2005.pdf: $(deps) 47 | env $(envvars) $(LATEXMK) -quiet -pdf $(srcdir)/src/Huelsenbeck_Ronquist_SMME_2005 48 | 49 | else # !HAVE_LATEXMK 50 | 51 | # The order of pdflatex and bibtex runs below (and the number of runs) 52 | # mirrors what latexmk seems to want to do. 53 | Huelsenbeck_Ronquist_SMME_2005.pdf: $(deps) 54 | env $(envvars) $(PDFLATEX) --interaction=batchmode $(srcdir)/src/Huelsenbeck_Ronquist_SMME_2005 55 | env $(envvars) $(BIBTEX) -terse Huelsenbeck_Ronquist_SMME_2005 56 | env $(envvars) $(PDFLATEX) --interaction=batchmode $(srcdir)/src/Huelsenbeck_Ronquist_SMME_2005 57 | env $(envvars) $(BIBTEX) -terse Huelsenbeck_Ronquist_SMME_2005 58 | env $(envvars) $(PDFLATEX) --interaction=batchmode $(srcdir)/src/Huelsenbeck_Ronquist_SMME_2005 59 | 60 | endif 61 | else # !HAVE_LATEX 62 | 63 | Huelsenbeck_Ronquist_SMME_2005.pdf: 64 | @echo 'Can not build the Huelsenbeck and Ronquist 2005 PDF since LaTeX was not detected' >&2 65 | @exit 0 66 | 67 | endif 68 | -------------------------------------------------------------------------------- /src/model.h: -------------------------------------------------------------------------------- 1 | #ifndef MODEL_H_ 2 | #define MODEL_H_ 3 | 4 | int AreDoublesEqual (MrBFlt x, MrBFlt y, MrBFlt tol); 5 | int ChangeNumRuns (int from, int to); 6 | int ChangeNumChains (int from, int to); 7 | int CheckModel (void); 8 | int DoesTreeSatisfyConstraints (Tree *t); 9 | int DoLink (void); 10 | int DoLinkParm (char *parmName, char *tkn); 11 | int DoLset (void); 12 | int DoLsetParm (char *parmName, char *tkn); 13 | int DoPlot (void); 14 | int DoPlotParm (char *parmName, char *tkn); 15 | int DoPropset (void); 16 | int DoPropsetParm (char *parmName, char *tkn); 17 | int DoPrset (void); 18 | int DoPrsetParm (char *parmName, char *tkn); 19 | int DoQuit (void); 20 | int DoReport (void); 21 | int DoReportParm (char *parmName, char *tkn); 22 | int DoShowMcmcTrees (void); 23 | int DoShowModel (void); 24 | int DoShowMoves (void); 25 | int DoShowmovesParm (char *parmName, char *tkn); 26 | int DoShowParams (void); 27 | int DoStartvals (void); 28 | int DoStartvalsParm (char *parmName, char *tkn); 29 | int DoUnlink (void); 30 | int FillNormalParams (RandLong *seed, int fromChain, int toChain); 31 | int FillRelPartsString (Param *p, char **relPartString); 32 | void FillStdStateFreqs (int chfrom, int chto, RandLong *seed); 33 | int FillTopologySubParams (Param *param, int chn, int state, RandLong *seed); 34 | int FillTreeParams (RandLong *seed, int fromChain, int toChain); 35 | int FreeModel (void); 36 | int GetEmpiricalFreqs (int *relParts, int nRelParts); 37 | int GetNumDivisionChars (void); 38 | int *GetParamIntVals (Param *parm, int chain, int state); 39 | MrBFlt *GetParamStdStateFreqs (Param *parm, int chain, int state); 40 | MrBFlt *GetParamSubVals (Param *parm, int chain, int state); 41 | MrBFlt *GetParamVals (Param *parm, int chain, int state); 42 | Tree *GetTree (Param *parm, int chain, int state); 43 | Tree *GetTreeFromIndex (int index, int chain, int state); 44 | int InitializeLinks (void); 45 | int InitializeTreeCalibrations (Tree *t); 46 | int Link (void); 47 | int SetAARates (void); 48 | int SetLocalTaxa (void); 49 | int SetModelDefaults (void); 50 | int SetMoves (void); 51 | int SetUpAnalysis (RandLong *seed); 52 | void SetUpMoveTypes (void); 53 | int ShowModel (void); 54 | int Unlink (void); 55 | int UpdateClockRate (MrBFlt clockRate, int chain); 56 | int UpdateCppEvolLengths (Param *param, TreeNode *p, int chain); 57 | int UpdateTK02EvolLengths (Param *param, Tree *t, int chain); 58 | int UpdateIndBrachLengths (Param *param, Tree *t, int chain); 59 | 60 | #endif /* MODEL_H_ */ 61 | -------------------------------------------------------------------------------- /doc/SMME_paper/src/README.md: -------------------------------------------------------------------------------- 1 | # Files for building "Bayesian Analysis of Molecular Evolution using MrBayes" 2 | 3 | - Last modified: fre jul 26, 2019 07:04 4 | - Sign: Johan Nylander 5 | 6 | 7 | ## Description 8 | 9 | * The files in this directory are "reversed engineered" to be able to build 10 | the LaTeX file `Huelsenbeck_Ronquist_SMME_2005.tex`. The build process works, 11 | but see **Issues** below. 12 | 13 | * This is a **draft version** to what was published as 14 | 15 | > Huelsenbeck J.P., Ronquist F. (2005) Bayesian Analysis of Molecular Evolution 16 | > Using MrBayes. Pp 183-226 in: Statistical Methods in Molecular Evolution. Statistics 17 | > for Biology and Health. Springer, New York, NY. 18 | > 19 | > DOI: 20 | > 21 | > URL: 22 | 23 | * The style class file `svmult.cls` is from Springer, and was downloaded on 19 July 2019 from 24 | 25 | [https://sv.sharelatex.com/templates/books/springer's-edited-book-svmult](https://sv.sharelatex.com/templates/books/springer's-edited-book-svmult) 26 | 27 | 28 | ## Files included 29 | 30 | Huelsenbeck_Ronquist_SMME_2005.tex 31 | Huelsenbeck_Ronquist_SMME_2005.bib 32 | svmult.cls 33 | fig1.png fig2.png fig3.png fig4.png 34 | fig5.png fig6.png fig7.png fig8.png 35 | fig9.png fig10.png fig11.png fig12.png 36 | README.md 37 | 38 | ## Compile 39 | 40 | pdflatex Huelsenbeck_Ronquist_SMME_2005.tex 41 | bibtex Huelsenbeck_Ronquist_SMME_2005 42 | pdflatex Huelsenbeck_Ronquist_SMME_2005 43 | 44 | Or, if `latexmk` is available: 45 | 46 | latexmk -pdf Huelsenbeck_Ronquist_SMME_2005.tex 47 | 48 | 49 | ## Issues 50 | 51 | - The bibliography list is not yet complete. See the file 52 | `Huelsenbeck_Ronquist_SMME_2005.bib`. 53 | 54 | - Figures are not original versions. 55 | I did not have access to the original image material, so all PNG images 56 | are screenshots(!) from the original publication. 57 | 58 | - "`Overfull \hbox`" issues -- several. 59 | I changed font size for some of the verbatim listings in the Appendix 2 to 60 | accommodate some warnings. 61 | 62 | - "`Underfull \hbox`" issues -- several. 63 | No action taken. 64 | 65 | - `LaTeX Font Warning: Font shape `OT1/lmr/bx/sc' undefined`. 66 | No action taken. 67 | 68 | - Use of alternative command: 69 | ``` 70 | Package amsmath Warning: Foreign command \over; 71 | (amsmath) \frac or \genfrac should be used instead 72 | (amsmath) on input line 108. 73 | ``` 74 | This can be adressed by using, for example, `\frac{a}{b}` instead of `{a \over b}`. 75 | No action taken. 76 | 77 | -------------------------------------------------------------------------------- /INSTALL-Docker-Ubuntu.md: -------------------------------------------------------------------------------- 1 | # Install MrBayes+Beagle3 inside an Ubuntu 20.04 Docker container 2 | 3 | - Status (June 2020): 4 | - CUDA: N/A 5 | - OpenCL: OK 6 | - OpenMPI: OK 7 | - Beagle3: OK 8 | - MrBayes+MPI: OK 9 | - MrBayes: OK 10 | 11 | - This file describes a "proof-of-concept" installation of the develop branch 12 | of MrBayes with Beagle. The installation is made inside a Docker container, 13 | hence, this is *not* a Dockerfile. 14 | 15 | - Instructions for Debian are identical, but you would use a Debian container 16 | such as `debian:sid` instead of `ubuntu:20.04`. 17 | 18 | - We could not get beagle to work from inside MrBayes unless Beagle is 19 | configured using `-rpath`, or `LD_LIBRARY_PATH` is set before running 20 | MrBayes. 21 | 22 | - When configuring the beagle library, we expect to see these warning messages 23 | (since we asked for not using CUDA or Java): 24 | - `WARNING: NVIDIA CUDA nvcc compiler not found` 25 | - `WARNING: JDK installation not found` 26 | 27 | - We are not building the LaTeX version of the documentation for MrBayes. For 28 | building the documentation, we recommend to use the `latexmk` script. Using 29 | `apt install latexmk texlive-latex-extra` will install the script an all 30 | necessary TeX-libraries. 31 | 32 | - When running the MPI (parallel) version of MrBayes inside the Docker 33 | container, we need to use `--allow-run-as-root` (since we are starting 34 | `mpirun` as user `root`). 35 | 36 | ## Install and run 37 | 38 | $ docker run -it ubuntu:20.04 /bin/bash 39 | 40 | # Base system 41 | apt update -y && apt upgrade -y 42 | 43 | DEBIAN_FRONTEND=noninteractive apt install -y tzdata 44 | 45 | apt install -y \ 46 | autoconf \ 47 | g++ \ 48 | git \ 49 | libreadline-dev \ 50 | libtool \ 51 | make 52 | 53 | # OpenCL 54 | apt install -y \ 55 | ocl-icd-opencl-dev \ 56 | pocl-opencl-icd 57 | 58 | # OpenMPI 59 | apt install -y \ 60 | libopenmpi-dev 61 | 62 | # Beagle 63 | git clone --depth=1 https://github.com/beagle-dev/beagle-lib.git 64 | cd beagle-lib 65 | ./autogen.sh 66 | LDFLAGS=-Wl,-rpath=/usr/local/lib ./configure --without-jdk --disable-doxygen-doc 67 | make -j2 68 | make install 69 | 70 | cd / 71 | 72 | # MrBayes 73 | git clone --depth=1 --branch=develop https://github.com/NBISweden/MrBayes.git 74 | cd MrBayes 75 | ./configure --with-mpi --enable-doc=no 76 | make -j2 77 | 78 | # Test MPI (parallel) version 79 | mpirun --allow-run-as-root -np 1 src/mb <<< 'version;showb;quit' 80 | 81 | make clean 82 | ./configure --enable-doc=no 83 | make -j2 84 | 85 | # Test serial version 86 | src/mb <<< 'version;showb;quit' 87 | 88 | -------------------------------------------------------------------------------- /INSTALL-Docker-CentOS.md: -------------------------------------------------------------------------------- 1 | # Run MrBayes+Beagle3 inside a CentOS 8 Docker container 2 | 3 | - Status (June 2020): 4 | - CUDA: N/A 5 | - OpenCL: FAIL 6 | - OpenMPI: OK 7 | - Beagle3: OK 8 | - MrBayes+MPI: OK 9 | - MrBayes: OK 10 | 11 | - This file describes a "proof-of-concept" installation of the develop branch 12 | of MrBayes with Beagle. The installation is made inside a Docker container, 13 | hence, this is *not* a Dockerfile. 14 | 15 | - We could not get beagle to work from inside MrBayes unless Beagle is 16 | configured using `-rpath`, or `LD_LIBRARY_PATH` is set before running 17 | MrBayes. 18 | 19 | - When configuring the beagle library, we expect to see these warning messages 20 | (since we asked for not using OpenCL, CUDA or Java): 21 | - `WARNING: OpenCL not found or disabled` 22 | - `WARNING: NVIDIA CUDA nvcc compiler not found` 23 | - `WARNING: JDK installation not found` 24 | 25 | - We are not building the LaTeX version of the documentation for MrBayes. For 26 | building the documentation, we recommend to use the `latexmk` script. Using 27 | the commands below will install the script an all necessary TeX-libraries. 28 | 29 | yum install -y epel-release 30 | yum -y update 31 | yum -y install texlive latexmk texlive-wrapfig 32 | 33 | - When running the MPI (parallel) version of MrBayes inside the Docker 34 | container, we need to use `--allow-run-as-root` (since we are starting 35 | `mpirun` as user `root`). 36 | 37 | 38 | # Install and run 39 | 40 | $ docker run -it centos:8 /bin/bash 41 | 42 | LC_ALL=C 43 | 44 | # Base system 45 | yum -y install \ 46 | autoconf \ 47 | gcc-c++ \ 48 | git \ 49 | libtool \ 50 | make \ 51 | readline-devel 52 | 53 | # OpenCL 54 | # Tue 30 Jun 2020: Beagle compiles with OpenCL, but when run in MrBayes, we get 55 | # OpenCL error: Unknown error from file , line 115. 56 | #yum -y install \ 57 | # 'dnf-command(config-manager)' 58 | #yum -y config-manager --set-enabled PowerTools 59 | #yum -y update 60 | #yum -y install \ 61 | # ocl-icd \ 62 | # ocl-icd-devel 63 | #ln -s /usr/lib64/libOpenCL.so.1 /usr/lib/libOpenCL.so # https://unix.stackexchange.com/questions/292630/how-to-install-opencl-in-centos-7-using-yum 64 | 65 | # OpenMPI 66 | yum -y install \ 67 | openmpi-devel 68 | source /etc/profile 69 | module load mpi 70 | 71 | # Beagle 72 | git clone --depth=1 https://github.com/beagle-dev/beagle-lib.git 73 | cd beagle-lib 74 | ./autogen.sh 75 | LDFLAGS=-Wl,-rpath=/usr/local/lib ./configure --without-jdk --without-cuda --without-opencl --disable-doxygen-doc 76 | make -j2 77 | make install 78 | 79 | cd / 80 | 81 | # MrBayes 82 | git clone --depth=1 --branch=develop https://github.com/NBISweden/MrBayes.git 83 | cd MrBayes 84 | ./configure --with-mpi --enable-doc=no 85 | make -j2 86 | 87 | mpirun --allow-run-as-root -np 1 src/mb <<< 'version;showb;quit' 88 | 89 | make clean 90 | ./configure --enable-doc=no 91 | make -j2 92 | 93 | src/mb <<< 'version;showb;quit' 94 | 95 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | Release Note 2 | 3 | v3.2.8 (development version, not yet released) 4 | * Move to semantic versioning scheme (see https://semver.org/). 5 | Release numbers are MAJOR.MINOR.PATCH where a new MAJOR release 6 | number means backward incompatible changes were made, a new MINOR 7 | number means backward compatible features were added, and a new 8 | PATCH number means backward compatible bugfixes to the C code were 9 | made. We may or may not use transient suffixes like "a", "b", 10 | "-alpha", "-beta" and "-rcN" as well at times. 11 | * Use latexmk to build the PDF documentation, if avaliable. 12 | * Support MCMC chains longer than 2E9 generations. 13 | * Correct the parameterization sigma (sd_log) in lnorm rate variation across sites. 14 | * Correct the parameterization in the TK02 model. 15 | * Renamed the white noise relaxed clock model to WN. 16 | * Added independent lognormal (ILN) and independent gamma (IGR) relaxed clocks. 17 | * Support model averaging (rjMCMC) between ILN and IGR clock models. 18 | * Support unord characters up to 24 states (0-9 A-N). 19 | * Extend the coalescent prior to support serially-sampled tips. 20 | * Update help messages for the FBD model and parameters. 21 | * Bug fix to multi-partition Beagle code. 22 | * Bug fix to directional state frequency models. 23 | * Fix erroneous printing of header alpha_symdir. 24 | * Fix setting popsizepr and growthpr for protein data. 25 | * Fix disabling variable ratepr for single partition. 26 | 27 | v3.2.7a (Mar 06 2019): hotfix 28 | * PDF manual re-generated from already updated LaTeX sources. 29 | 30 | v3.2.7 (Feb 13 2019) 31 | * Added lognormal and flat ordered dirichelet distributions as 32 | alternatives to the gamma prior on site variation across sites. 33 | * Added new, optional moves for the fossilized birth-death model. 34 | * Added new, optional parsimony-guided moves for non-clock trees. 35 | * Support for Beagle 3 added. 36 | * Added support for FMA and AVX instructions in built-in likelihood 37 | calculators for 4by4 nucleotide models. 38 | * Added basic command line option support on Unix systems (-h,-i,-v) 39 | * Various minor bug fixes. 40 | 41 | v3.2.6 (Nov 25 2015) 42 | * Add invertebrate mt, Echinoderm and Euplotid codes [lset code=invermt]. 43 | * Fix a bug of updating branch lengths in tree-stretch move. 44 | * Correct the proposal ratio in the add/delete branch move. 45 | * Add more coding options for restriction site chars. 46 | 47 | v3.2.5 (Apr 8 2015) 48 | * Fix pdf in the coalescent prior. 49 | * Fix a few issues when appending to the previous run. 50 | * Improve the efficiency of moving ancestral fossils. 51 | * Add lognormal rate variation among sites [lset rate=lnorm]. 52 | * Add parsimony-biased SPR and TBR proposals (for developers). 53 | * Other minor bug fixes and improvements. 54 | 55 | v3.2.4 (Jan 27 2015) 56 | * Correct the proposal ratio in the node slider move for non-clock tree. 57 | * Fix reporting ancestral states under GTR+I+G model. 58 | * Fix the sliding window in the move of updating omega in codon model. 59 | * Fix the likelihood and proposal ratio of NaN in the multi-species 60 | coalescent analysis. 61 | * Correct screen output messages for a few commands. 62 | * Fix the interaction of MrBayes with Beagle for the Windows executable. 63 | * Fix prior pdf of relative rates (rate multipliers). 64 | 65 | v3.2.3 (Oct 22 2014) 66 | * Correct the proposal ratio in the extending TBR move for non-clock tree. 67 | * Fix numerical error of calculating proposal ratio in 68 | parsimony-biased SPR moves. 69 | * Set unconstrained:gammadir prior as default to help avoid 70 | overestimating branch lengths. 71 | * Add clock:fossilization prior for total-evidence dating analysis. 72 | * Add LG model to Aamodelpr [prset aamodelpr=fixed(LG)]. 73 | * Rearrange the code to be more concise. 74 | * Other minor bug fixes and improvements. 75 | 76 | v3.2.2 (Aug 22 2013) 77 | * Disable LIKE_EPSILON warning for standard users. 78 | * Fix segmentation fault errors in 64bit version. 79 | * Fix some issues when dealing with constraints. 80 | * Fix setting aarevmatpr parameters to fixed for GTR. 81 | * Other bug fixes and improvements. 82 | 83 | v3.2.1 (Feb 8 2012) 84 | v3.2.0 (Nov 16 2011) 85 | Major release. 86 | -------------------------------------------------------------------------------- /testing/runtests.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$#" -ne 1 ]; then 4 | cat <<-END_USAGE 5 | Usage: 6 | 7 | $0 path-to-NEX-file 8 | 9 | END_USAGE 10 | exit 1 11 | fi 12 | 13 | nex_file=$1 14 | 15 | # We're doing 7 tests: 16 | # One setup test, one run tests, five result tests 17 | 18 | echo 1..7 19 | t=0 # current test number 20 | 21 | ok () { 22 | printf 'ok %d - %s\n' "$t" "$m" 23 | } 24 | 25 | fail () { 26 | printf 'not ok %d - %s\n' "$t" "$m" 27 | } 28 | 29 | xfail () { 30 | printf 'not ok %d - %s # TODO (expected to sometimes fail)\n' "$t" "$m" 31 | } 32 | 33 | error () { 34 | fail 35 | printf 'Bail out! %s\n' "$1" 36 | exit 1 37 | } 38 | 39 | case "@TESTS_USE_MPI@" in 40 | yes) 41 | set -- mpirun -np 2 -H localhost:2 "@abs_top_builddir@/src/mb" 42 | ;; 43 | no) 44 | set -- "@abs_top_builddir@/src/mb" 45 | ;; 46 | *) 47 | echo 'Do not know whether to use MPI or not' >&2 48 | exit 1 49 | esac 50 | 51 | tmpdir=$(mktemp -d ./${nex_file##*/}.XXXXXXXX) 52 | 53 | t=$(( t + 1 )); m='Setup' 54 | if cp "@top_srcdir@/examples/primates.nex" "$tmpdir" && 55 | cp "$nex_file" "$tmpdir" 56 | then ok; else error 'Could not copy needed files...'; fi 57 | 58 | trap 'rm -rf "$tmpdir"' EXIT TERM INT 59 | 60 | pathname=${nex_file##*/} 61 | 62 | t=$(( t + 1 )); m='Ran MrBayes' 63 | if (cd "$tmpdir" && "$@" "$pathname") >"$tmpdir/$pathname.out" 64 | then ok; else error 'Could not create output...'; fi 65 | 66 | t=$(( t + 1 )); m='Analysis completed' 67 | # Analysis completed in N seconds 68 | # ... should occur once (N is integer). 69 | awk ' 70 | /Analysis completed in [[:digit:]]+ seconds/ { 71 | count++ 72 | } 73 | END { 74 | if (count != 1) { 75 | printf "Did find expected text (count = %d != 1)\n", count 76 | err = 1 77 | } 78 | exit err 79 | }' "$tmpdir/$pathname".out 80 | if [ "$?" -eq 0 ]; then ok; else fail; fi 81 | 82 | t=$(( t + 1 )); m='Cold state likelihood in range [-5715,-5700]' 83 | # Likelihood of best state for "cold" chain of run 1 was N 84 | # ... should occur once, with N in the range [-5715,-5700] (N is a "simple" float). 85 | awk ' 86 | /Likelihood of best state for "cold" chain of run 1 was [-[:digit:]]+\.[[:digit:]]+/ { 87 | count++ 88 | if ($NF < -5715 || $NF > -5700) { 89 | printf "%g not in range [-5715,-5700] on line %d\n", $NF, NR 90 | err = 1 91 | } 92 | } 93 | END { 94 | if (count != 1) { 95 | printf "Did find expected text (count = %d != 1)\n", count 96 | err = 1 97 | } 98 | exit err 99 | }' "$tmpdir/$pathname".out 100 | if [ "$?" -eq 0 ]; then ok; else xfail; fi 101 | 102 | t=$(( t + 1 )); m='TL{all} in range [0.95,1.2]' 103 | # There should be one line with "TL{all}" in the first field. 104 | # The value in the last field on that lines should be in the range [0.95,1.2]. 105 | awk ' 106 | $1 == "TL{all}" { 107 | count++ 108 | if ($NF < 0.95 || $NF > 1.2) { 109 | printf "%g not in range [0.95,1.2] on line %d\n", $NF, NR 110 | err = 1 111 | } 112 | } 113 | END { 114 | if (count != 1) { 115 | printf "Did find expected text (count = %d != 1)\n", count 116 | err = 1 117 | } 118 | exit err 119 | }' "$tmpdir/$pathname".out 120 | if [ "$?" -eq 0 ]; then ok; else xfail; fi 121 | 122 | t=$(( t + 1 )); m='Avg. stdv. of split freqs. < 0.05' 123 | # Average standard deviation of split frequencies = N 124 | # ... should occur one times, where N is a "simple" float. 125 | # N should be below 0.05. 126 | awk ' 127 | /Average standard deviation of split frequencies = [[:digit:]]+\.[[:digit:]]+/ { 128 | count++ 129 | if ($NF >= 0.05) { 130 | printf "%g not below 0.05 on line %d\n", $NF, NR 131 | err = 1 132 | } 133 | } 134 | END { 135 | if (count != 1) { 136 | printf "Did find expected text (count = %d != 1)\n", count 137 | err = 1 138 | } 139 | exit err 140 | }' "$tmpdir/$pathname".out 141 | if [ "$?" -eq 0 ]; then ok; else xfail; fi 142 | 143 | t=$(( t + 1 )); m='Avg. PSRF in range [0.95,1.2]' 144 | # Average PSRF for parameter values (excluding NA and >10.0) = N 145 | # ... should occur once and N (a "simple" float) should lie in the range [0.95,1.2]. 146 | awk ' 147 | /Average PSRF for parameter values \(excluding NA and >10.0\) = [[:digit:]]+\.[[:digit:]]+/ { 148 | count++ 149 | if ($NF < 0.95 || $NF > 1.2) { 150 | printf "%g not in range [0.95,1.2] on line %d\n", $NF, NR 151 | err = 1 152 | } 153 | } 154 | END { 155 | if (count != 1) { 156 | printf "Did find expected text (count = %d != 2)\n", count 157 | err = 1 158 | } 159 | exit err 160 | }' "$tmpdir/$pathname".out 161 | if [ "$?" -eq 0 ]; then ok; else xfail; fi 162 | -------------------------------------------------------------------------------- /autotools/test-driver: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # test-driver - basic testsuite driver script. 3 | 4 | scriptversion=2016-01-11.22; # UTC 5 | 6 | # Copyright (C) 2011-2017 Free Software Foundation, Inc. 7 | # 8 | # This program is free software; you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation; either version 2, or (at your option) 11 | # any later version. 12 | # 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program. If not, see . 20 | 21 | # As a special exception to the GNU General Public License, if you 22 | # distribute this file as part of a program that contains a 23 | # configuration script generated by Autoconf, you may include it under 24 | # the same distribution terms that you use for the rest of that program. 25 | 26 | # This file is maintained in Automake, please report 27 | # bugs to or send patches to 28 | # . 29 | 30 | # Make unconditional expansion of undefined variables an error. This 31 | # helps a lot in preventing typo-related bugs. 32 | set -u 33 | 34 | usage_error () 35 | { 36 | echo "$0: $*" >&2 37 | print_usage >&2 38 | exit 2 39 | } 40 | 41 | print_usage () 42 | { 43 | cat <$log_file 2>&1 108 | estatus=$? 109 | 110 | if test $enable_hard_errors = no && test $estatus -eq 99; then 111 | tweaked_estatus=1 112 | else 113 | tweaked_estatus=$estatus 114 | fi 115 | 116 | case $tweaked_estatus:$expect_failure in 117 | 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 118 | 0:*) col=$grn res=PASS recheck=no gcopy=no;; 119 | 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 120 | 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; 121 | *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; 122 | *:*) col=$red res=FAIL recheck=yes gcopy=yes;; 123 | esac 124 | 125 | # Report the test outcome and exit status in the logs, so that one can 126 | # know whether the test passed or failed simply by looking at the '.log' 127 | # file, without the need of also peaking into the corresponding '.trs' 128 | # file (automake bug#11814). 129 | echo "$res $test_name (exit status: $estatus)" >>$log_file 130 | 131 | # Report outcome to console. 132 | echo "${col}${res}${std}: $test_name" 133 | 134 | # Register the test result, and other relevant metadata. 135 | echo ":test-result: $res" > $trs_file 136 | echo ":global-test-result: $res" >> $trs_file 137 | echo ":recheck: $recheck" >> $trs_file 138 | echo ":copy-in-global-log: $gcopy" >> $trs_file 139 | 140 | # Local Variables: 141 | # mode: shell-script 142 | # sh-indentation: 2 143 | # eval: (add-hook 'write-file-hooks 'time-stamp) 144 | # time-stamp-start: "scriptversion=" 145 | # time-stamp-format: "%:y-%02m-%02d.%02H" 146 | # time-stamp-time-zone: "UTC0" 147 | # time-stamp-end: "; # UTC" 148 | # End: 149 | -------------------------------------------------------------------------------- /src/config.h.in: -------------------------------------------------------------------------------- 1 | /* src/config.h.in. Generated from configure.ac by autoheader. */ 2 | 3 | /* Define if you want to enable Beagle */ 4 | #undef BEAGLE_ENABLED 5 | 6 | /* Define to enable Beagle v3.1 extensions */ 7 | #undef BEAGLE_V3_ENABLED 8 | 9 | /* Compiler vendor */ 10 | #undef COMPILER_VENDOR 11 | 12 | /* Compiler version */ 13 | #undef COMPILER_VERSION 14 | 15 | /* AVX code path should not be compiled. */ 16 | #undef DISABLE_AVX 17 | 18 | /* FMA code path should not be compiled. */ 19 | #undef DISABLE_FMA 20 | 21 | /* SSE code path should not be compiled. */ 22 | #undef DISABLE_SSE 23 | 24 | /* Define to 1 to support Advanced Bit Manipulation */ 25 | #undef HAVE_ABM 26 | 27 | /* Define to 1 to support Multi-Precision Add-Carry Instruction Extensions */ 28 | #undef HAVE_ADX 29 | 30 | /* Define to 1 to support Advanced Encryption Standard New Instruction Set 31 | (AES-NI) */ 32 | #undef HAVE_AES 33 | 34 | /* Support Altivec instructions */ 35 | #undef HAVE_ALTIVEC 36 | 37 | /* Define to 1 to support Advanced Vector Extensions */ 38 | #undef HAVE_AVX 39 | 40 | /* Define to 1 to support Advanced Vector Extensions 2 */ 41 | #undef HAVE_AVX2 42 | 43 | /* Define to 1 to support AVX-512 Byte and Word Instructions */ 44 | #undef HAVE_AVX512_BW 45 | 46 | /* Define to 1 to support AVX-512 Conflict Detection Instructions */ 47 | #undef HAVE_AVX512_CD 48 | 49 | /* Define to 1 to support AVX-512 Doubleword and Quadword Instructions */ 50 | #undef HAVE_AVX512_DQ 51 | 52 | /* Define to 1 to support AVX-512 Exponential & Reciprocal Instructions */ 53 | #undef HAVE_AVX512_ER 54 | 55 | /* Define to 1 to support AVX-512 Foundation Extensions */ 56 | #undef HAVE_AVX512_F 57 | 58 | /* Define to 1 to support AVX-512 Integer Fused Multiply Add Instructions */ 59 | #undef HAVE_AVX512_IFMA 60 | 61 | /* Define to 1 to support AVX-512 Conflict Prefetch Instructions */ 62 | #undef HAVE_AVX512_PF 63 | 64 | /* Define to 1 to support AVX-512 Vector Byte Manipulation Instructions */ 65 | #undef HAVE_AVX512_VBMI 66 | 67 | /* Define to 1 to support AVX-512 Vector Length Extensions */ 68 | #undef HAVE_AVX512_VL 69 | 70 | /* Define to 1 to support Bit Manipulation Instruction Set 1 */ 71 | #undef HAVE_BMI1 72 | 73 | /* Define to 1 to support Bit Manipulation Instruction Set 2 */ 74 | #undef HAVE_BMI2 75 | 76 | /* Define to 1 if you have the header file. */ 77 | #undef HAVE_FLOAT_H 78 | 79 | /* Define to 1 if you have the `floor' function. */ 80 | #undef HAVE_FLOOR 81 | 82 | /* Define to 1 to support Fused Multiply-Add Extensions 3 */ 83 | #undef HAVE_FMA3 84 | 85 | /* Define to 1 to support Fused Multiply-Add Extensions 4 */ 86 | #undef HAVE_FMA4 87 | 88 | /* Define to 1 if you have the header file. */ 89 | #undef HAVE_HISTORY_H 90 | 91 | /* Define to 1 if you have the header file. */ 92 | #undef HAVE_INTTYPES_H 93 | 94 | /* Define to 1 if you have the `m' library (-lm). */ 95 | #undef HAVE_LIBM 96 | 97 | /* Define if you have a readline compatible library */ 98 | #undef HAVE_LIBREADLINE 99 | 100 | /* Define to 1 if you have the header file. */ 101 | #undef HAVE_LIMITS_H 102 | 103 | /* Define to 1 if you have the header file. */ 104 | #undef HAVE_MEMORY_H 105 | 106 | /* Define to 1 if you have the `memset' function. */ 107 | #undef HAVE_MEMSET 108 | 109 | /* Define to 1 to support Multimedia Extensions */ 110 | #undef HAVE_MMX 111 | 112 | /* Define to 1 to support Memory Protection Extensions */ 113 | #undef HAVE_MPX 114 | 115 | /* Define to 1 if you have the `pow' function. */ 116 | #undef HAVE_POW 117 | 118 | /* Define to 1 to support Prefetch Vector Data Into Caches WT1 */ 119 | #undef HAVE_PREFETCHWT1 120 | 121 | /* Define to 1 to support Digital Random Number Generator */ 122 | #undef HAVE_RDRND 123 | 124 | /* Define to 1 if you have the header file. */ 125 | #undef HAVE_READLINE_H 126 | 127 | /* Define if your readline library has \`add_history' */ 128 | #undef HAVE_READLINE_HISTORY 129 | 130 | /* Define to 1 if you have the header file. */ 131 | #undef HAVE_READLINE_HISTORY_H 132 | 133 | /* Define to 1 if you have the header file. */ 134 | #undef HAVE_READLINE_READLINE_H 135 | 136 | /* Define to 1 to support Secure Hash Algorithm Extension */ 137 | #undef HAVE_SHA 138 | 139 | /* Define to 1 if you have the `sqrt' function. */ 140 | #undef HAVE_SQRT 141 | 142 | /* Define to 1 to support Streaming SIMD Extensions */ 143 | #undef HAVE_SSE 144 | 145 | /* Define to 1 to support Streaming SIMD Extensions */ 146 | #undef HAVE_SSE2 147 | 148 | /* Define to 1 to support Streaming SIMD Extensions 3 */ 149 | #undef HAVE_SSE3 150 | 151 | /* Define to 1 to support Streaming SIMD Extensions 4.1 */ 152 | #undef HAVE_SSE4_1 153 | 154 | /* Define to 1 to support Streaming SIMD Extensions 4.2 */ 155 | #undef HAVE_SSE4_2 156 | 157 | /* Define to 1 to support AMD Streaming SIMD Extensions 4a */ 158 | #undef HAVE_SSE4a 159 | 160 | /* Define to 1 to support Supplemental Streaming SIMD Extensions 3 */ 161 | #undef HAVE_SSSE3 162 | 163 | /* Define to 1 if you have the header file. */ 164 | #undef HAVE_STDINT_H 165 | 166 | /* Define to 1 if you have the header file. */ 167 | #undef HAVE_STDLIB_H 168 | 169 | /* Define to 1 if you have the `strchr' function. */ 170 | #undef HAVE_STRCHR 171 | 172 | /* Define to 1 if you have the header file. */ 173 | #undef HAVE_STRINGS_H 174 | 175 | /* Define to 1 if you have the header file. */ 176 | #undef HAVE_STRING_H 177 | 178 | /* Define to 1 if you have the header file. */ 179 | #undef HAVE_SYS_STAT_H 180 | 181 | /* Define to 1 if you have the header file. */ 182 | #undef HAVE_SYS_TYPES_H 183 | 184 | /* Define to 1 if you have the header file. */ 185 | #undef HAVE_UNISTD_H 186 | 187 | /* Support VSX instructions */ 188 | #undef HAVE_VSX 189 | 190 | /* Define to 1 to support eXtended Operations Extensions */ 191 | #undef HAVE_XOP 192 | 193 | /* Define to 1 if the system has the type `_Bool'. */ 194 | #undef HAVE__BOOL 195 | 196 | /* Host CPU type */ 197 | #undef HOST_CPU 198 | 199 | /* Host triplet */ 200 | #undef HOST_TYPE 201 | 202 | /* Define if you want to enable MPI */ 203 | #undef MPI_ENABLED 204 | 205 | /* Name of package */ 206 | #undef PACKAGE 207 | 208 | /* Define to the address where bug reports for this package should be sent. */ 209 | #undef PACKAGE_BUGREPORT 210 | 211 | /* Define to the full name of this package. */ 212 | #undef PACKAGE_NAME 213 | 214 | /* Define to the full name and version of this package. */ 215 | #undef PACKAGE_STRING 216 | 217 | /* Define to the one symbol short name of this package. */ 218 | #undef PACKAGE_TARNAME 219 | 220 | /* Define to the home page for this package. */ 221 | #undef PACKAGE_URL 222 | 223 | /* Define to the version of this package. */ 224 | #undef PACKAGE_VERSION 225 | 226 | /* Define to 1 if you have the ANSI C header files. */ 227 | #undef STDC_HEADERS 228 | 229 | /* Version number of package */ 230 | #undef VERSION 231 | 232 | /* Define to `unsigned int' if does not define. */ 233 | #undef size_t 234 | -------------------------------------------------------------------------------- /examples/replicase.nex: -------------------------------------------------------------------------------- 1 | #NEXUS 2 | 3 | [Bacteriphage RNA sequences from the Huelsenbeck lab] 4 | 5 | begin data; 6 | dimensions ntax=9 nchar=720; 7 | format datatype=rna interleave=no gap=- missing=?; 8 | matrix 9 | [ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50] 10 | FR GGC AAC GGU --- GUG UUU ACU GUU CCG AAG AAC AAU AAA AUA GAU CGG GCU GCU UGC AAA GAG CCU GAU AUG AAU AUG UAC UUA CAG AAA GGG GUC GGC GGU UUC AUC CGU CGC CGC CUU AAG ACU GUG GGU AUA GAC UUG AAC GAU CAA ACG AUC AAU CAA CGC CUG GCU CAA CAA GGU AGC CGU GAU GGG UCU UUG GCG ACG AUA GAC UUA UCG UCU GCU UCU GAC UCC AUC AGC GAC CGC CUA GUG UGG AGU UUU CUC CCA CCU GAG CUA UAU UCA UAU CUC GAC AUG AUU CGA AGC CAC UAC GGU UAC GUA --- AAU GGC AAG AUG AUU CGU UGG GAA CUA UUU UCG ACG AUG GGU AAU GGG UUC ACC UUU GAA CUA GAG UCC AUG AUU UUC UGG GCU AUA GUC AGG GCU ACU CAG AUC CAU UUU CGU --- AAC ACC GGA ACC AUU GGC AUC UAU GGG GAC GAU AUU AUA UGC CCC ACA GAG AUU GCA CCU CGC GUG CUG GAA GCA CUG AGC UUC UAC GGU UUC AAA CCG AAU CUA CGA AAG ACG --- UUC ACG UCC GGC UCU UUU CGC GAG AGC UGC GGC GCG CAC UAU UUC CGU GGU GUC GAU GUU AAA CCA UUU UAU AUC AAG AAA CCA AUC ACU GAC CUA UUC UCC CUA AUG CUU AUA CUU AAC CGU AUA CGC GGA UGG GGG GUA GUC AAC GGA AUA GCA GAC CCA CGC CUC 11 | MS2 GGG AAC GGA --- GUG UUU ACA GUU CCG AAG AAU AAU AAA AUA GAU CGG GCU GCC UGU AAG GAG CCU GAU AUG AAU AUG UAC CUC CAG AAA GGG GUC GGU GCU UUC AUC AGA CGC CGG CUC AAA UCC GUU GGU AUA GAC CUG AAU GAU CAA UCG AUC AAC CAG CGU CUG GCU CAG CAG GGC AGCGUAGAUGGUUCGCUUGCGACGAUAGACUUAUCGUCUGCAUCCGAUUCCAUCUCCGAUCGCCUGGUGUGGAGUUUUCUCCCACCUGAGCUAUAUUCAUAUCUCGAUCGUAUCCGCUCACACUACGGA---GUA---GAUGGCGAGACGAUACGAUGGGAACUAUUUUCCACAAUGGGAAAUGGGUUCACAUUUGAGCUAGAGUCCAUGAUAUUCUGGGCAAUAGUCAAAGCGACCCAAAUCCAUUUUGGU---AACGCCGGAACCAUAGGCAUCUACGGGGACGAUAUUAUAUGUCCCAGUGAGAUUGCACCCCGUGUGCUAGAGGCACUUGCCUACUACGGUUUUAAACCGAAUCUUCGUAAAACG---UUCGUGUCCGGGCUCUUUCGCGAGAGCUGCGGCGCGCACUUUUACCGUGGUGUCGAUGUCAAACCGUUUUACAUCAAGAAACCUGUUGACAAUCUCUUCGCCCUGAUGCUGAUAUUAAAUCGGCUACGGGGUUGGGGAGUUGUCGGAGGUAUGUCAGAUCCACGCCUC 12 | GA GGC AAC GGU --- UUG UUU UCU GUU CCG AAG AAC AAU AAA AUA GAU CGG GCU GCC UGU AAG GAG CCU GAU AUG AAU AUG UAC CUU CAG AAG GGG GCG GGA UCU UUU AUA AGA AAA CGC CUU CGC UCC GUC GGU AUA GAU CUU AAC GAU CAG ACG CGC AAU CAG GAA UUA GCC CGA CUU GGC AGCAUUGAUGGUUCGCUCGCUACUAUUGAUCUUAGUAGCGCUAGCGAUUCCAUCUCUGACCGUCUUGUCUGGGAUCUACUUCCGCCGCACGUUUAUUCAUACCUCGCUCGUAUCCGAACAUCGUUCACUAUGAUC---GAUGGGCGUUUACAUAAGUGGGGUCUAUUUUCUACCAUGGGUAAUGGCUUCACGUUCGAACUCGAGUCCAUGAUCUUUUGGGCUUUAAGCAAGAGCAUUAUGCUGUCCAUGGGUGUU---ACUGGCUCAUUAGGCAUCUACGGUGAUGAUAUAAUCGUCCCCGUUGAGUGUCGUCCAACUCUCCUUAAGGUACUAUCCGCUGUAAACUUUCUUCCUAAUGAGGAGAAAACA---UUUACAACGGGUUACUUUCGUGAAAGUUGUGGUGCCCACUUCUUCAAAGAUGCCGACAUGAAACCUUUUUACUGCAAGCGGCCAAUGGAAACCCUUCCCGAUGUCAUGUUGCUAUGCAACAGGAUAAGAGGUUGGCAGACCGUUGGUGGAAUGUCAGAUCCGCGACUC 13 | SP UCA --- AAU AAA GCA GUC ACU GUU CCA AAG AAC AGU AAA ACU GAU CGC UGU AUU GCU AUC GAG CCC GGC UGG AAU AUG UUU UUC CAG UUA GGC GUC GGU GCA GUG CUA CGC GAU AGG UUG CGU UUA UGG AAG AUU GAU CUU AAU GAC CAA UCG ACC AAU CAA CGC CUC GCG CGU GAU GGG UCUCUGCUAAAUCAUUUAGCUACCAUAGACUUAUCUGCAGCCAGCGAUUCAAUCAGCCUUAAGCUUGUUGAGUUGCUCAUGCCCCCUGAAUGGUAUGACCUUCUAACGGAUCUCCGAUCCGAUGAAGGAAUACUGCCUGACGGGCGAGUUGUGACCUAUGAGAAAAUAUCCUCCAUGGGUAAUGGCUACACUUUCGAACUCGAGUCGCUUAUUUUUGCGGCUAUCGCUCGAAGUGUGUGCGAGUUACUGGAAAUUGACCAAUCUACUGUUAGCGUGUACGGGGAUGAUAUAAUCAUCGAUACCCGUGCCGCAGCUCCAUUAAUGGAUGUCUUUGAGUACGUCGGGUUCACUCCUAACAGAAAGAAAACG---UUCUGCGAUGGACCCUUCCGCGAAUCGUGCGGUAAGCACUGGUUCCAAGGGGUAGAUGUAACGCCCUUUUACAUACGACGACCAAUACGUUGCCUAGCCGAUAUGAUACUUGUAUUAAAUAGUAUCUAUAGGUGGGGCACUGUUGAUGGCAUAUGGGAUCCUAGAGCA 14 | NL95 UCG --- AAU AAA GCA GUC ACU GUU CCA AAG AAC AGU AAA ACU GAU CGC UGC AUU GCU AUC GAG CCC GGC UGG AAU AUG UUU UUC CAG UUA GGC GUC GGU GCU GUG CUC CGU GAU CGG UUG CGC CUU UGG CAU AUU GAU CUC AAU GAU CAA UCU GUU AAU CAG CGC CUC GCA CGU GAU GCA UCGCAGUUGGACCAUUUGGCCACUGUCGAUUUAUCAGCAGCAAGCGAUUCGAUAAGCUUACGGCUUGUUGAACUGCUAAUGCCGCCUGCUUGGUUUGAUCUCCUGACCGAUCUCCGAUCGGACCAGGGAAUCCUGCCUGACGGGCGUGUCGUUACUUACGAGAAAAUAUCCUCCAUGGGUAAUGGCUACACUUUUGAGCUAGAGUCGUUAAUUUUCGCGGCUCUCGCCAGAAGUGUGUGCGAGUUAUUGGACCUUGACCAGUCAACUGUCAGCGUGUACGGUGAUGAUAUAAUCAUCGAUUCACGUGCCGCUGAUGUCCUUAUGGCGGUUUUCGAGUAUGUUGGGUUUACGCCUAAUCGAAAGAAAACU---UUCAUUAAGGGCCCCUUUAGAGAGUCGUGCGGAAAGCACUGGCACUCCGGGGUUGACGUAACGCCCUUUUACAUACGCCGCCCAAUCCGCUGCCUAGCCGACAUGAUACUUGUAUUGAACAGUAUCUACCGGUGGGGUACGAUUGACGGUGUGUGGGAUCCUAGGGUA 15 | M11 CCU UUC AAU AAA GCA GUU ACU GUA CCA AAG AAC AGU AAA ACU GAU CGC UGU AUA GCC AUC GAA CCU GGC UGG AAU AUG UUU UUC CAG CUA GGU AUC GGU GGU GUU AUA CGC GAA AAG UUG CGU UUG UGG GGC AUC GAU CUG AAU GAU CAG ACG AUU AAC CAA ACG CGC GCA UAU UUA GGC AGCCGUGAUGAUAAUCUCGCCACGGUGGAUCUCUCAAGAGCUAGCGAUACUAUUUCGCUUGCCCUUGUUGAGCUCCUUAUGCCUCCUGAGUGGUUUAAGGUCCUGUUGGCCUUAAGAUCACCCAAGGGCAUCUUGCCAGAUGGUACCGUCAUUACUUAUGAGAAAAUAUCCUCAAUGGGUAAUGGCUAUACCUUCGAGCUUGAGUCGCUUAUAUUUGCGGCUCUUGCUCGGUCUUUAUGCGAAUUACUGGGCUUACGACCGUCAGAUGUUACGGUCUAUGGCGAUGACAUAAUAUUGCCAUCAGACGCGUGCAGUCCUCUAGUUGAAGUUUUCUCCUAUGUUGGUUUUCGUACCAACAAGAAGAAAACG---UUUUCUAGUGGACCGUUCCGAGAGUCGUGCGGAAAGCACUACUUUUUGGGCGUUGACGUCACACCUUUCUACAUACGUCGCCGUAUAGUGAGUCCCUCCGAUCUCAUACUGGUUUUGAACCAGAUGUAUCGUUGGGCCACAAUUGACGGCGUAUGGGAUCCUAGGGUA 16 | MX1 CCU UUC AAU AAA GCA GUU ACU GUA CCA AAG AAC AGU AAA ACU GAU CGC UGC AUC GCU AUC GAG CCA GGC UGG AAU AUG UUU UUC CAG UUG GGC AUU GGU GGC GUA AUU CGC GAA AAG UUG CAC UUG UGG AAU AUC GAC CUG AAU GAU CAG ACG AUU AAC CAG GUG CGC GCA UAU UCA GGC AGCUGUAGCAAUGAACUUGCUACAGUGGAUCUCUCGAGCGCGAGUGAUACUAUUUCGCUUGCGCUCGUUGAGCUCCUGCUACCCCCUGCGUGGUUUAAAGUCCUUACGGACCUUAGGUCACGAAGGGGUAUGUUGCCAGACGGUAGAAUCAUUACCUAUGAGAAAAUUUCCUCAAUGGGUAACGGUUUCACCUUCGAGCUCGAGUCGCUUAUAUUUGCAGCUCUUGCUCGGUCUUUAUGCGAGUUACUGAACUUACAACCGUCGAGUGUCACGGUCUAUGGCGAUGAUAUUAUAUUGCCAUCAGACGCGUGCAGCUCGUUGAUUGAAGUUUUCUCCUACGUAGGUUUUAGAACCAACGAGAAGAAGACC---UUUUUCGACGGGCCGUUCCGAGAGUCGUGCGGAAAGCACUACUUUAUGGGCGUUGACGUCACACCUUUCUACAUACGCCACCGUAUAGUGAGUCCCUCUGAUCUCAUACUGGUUUUGAACCAGAUGUAUCGUUGGGCCACGAUUGAUGGCGUAUGGGAUCCUAGGGUA 17 | QB CCU UUU AAU AAA GCA GUU ACU GUA CCU AAG AAC AGU AAG ACA GAU CGU UGU AUU GCU AUC GAA CCU GGU UGG AAU AUG UUU UUC CAA CUG GGU AUC GGU GGC AUU CUA CGC GAU CGG UUG CGU UGC UGG GGU AUC GAU CUG AAU GAU CAG ACG AUA AAU CAG CGC CGC GCU CAC GAA GGC UCCGUUACUAAUAACUUAGCAACGGUUGAUCUCUCAGCGGCAAGCGAUUCUAUAUCUCUUGCCCUCUGUGAGCUCUUAUUGCCCCUAGGCUGGUUUGAGGUUCUUAUGGACCUCAGAUCACCUAAGGGGCGAUUGCCUGACGGUAGUGUUGUUACCUACGAGAAGAUUUCUUCUAUGGGUAACGGUUACACAUUCGAGCUCGAGUCGCUUAUUUUUGCUUCUCUCGCUCGUUCCGUUUGUGAGAUACUGGACUUAGACUCGUCUGAGGUCACUGUUUACGGAGACGAUAUUAUUUUACCGUCCUGUGCAGUCCCUGCCCUCCGGGAAGUUUUUAAGUAUGUUGGUUUUACGACCAAUACUAAAAAGACU---UUUUCCGAGGGGCCGUUCAGAGAGUCGUGCGGCAAGCACUACUAUUCUGGCGUAGAUGUUACUCCCUUUUACAUACGUCACCGUAUAGUGAGUCCUGCCGAUUUAAUACUGGUUUUGAAUAACCUAUAUCGGUGGGCCACAAUUGACGGCGUAUGGGAUCCUAGGGCC 18 | PP7 GAC AGC --- CGG UUC GAU UUU GUC GCU AAG ACC GCG AAG GCG GUU CGC UUC AUC GCU AUG GAG CCA GAA CUU AAC AUG CUG CUG CAG AAA UCU GUA GGA GAC ACG AUA AGG GCU GCU CUG CGG AAA GCG GGU AUC GAU CUC AAU ACC CAG CGA CUA AAU CAA GAU CUU GCG UAC CAC GGA UCCGUUUUUCGGAAUCUCGGUACGAUAGAUCUGUCUAGCGCUUCCGAUACGUUAAGCAUUGAACUCGUGCGGCAGUACCUGCCGAAGCGGUUUCUCCGCUAUGUAUUGGAUCUCCGAACCCCCUACACGAGUGUA---GGUGGUAAGAAGCACAGGCUCGAGAAGGUCGCUUCGAUGGGCAACGGGUUCAUUUUUGAACUCCAGAGCCUCAUCUACGCAGCCUUCGCGCAUGCCAUGACGCUAGUAGUAGGAGGAAGAGAAUGCGACAUAGCCAUUUACGGCGAUGAUAUCAUCGUCAGUGAAUGCGUAGUAGAGCCUCUGAUGCAGUUCCUCGAAUGGCAUGGGUUCUGCCCCAAUCUCGAUAAGAGUUAUUGGGGAGGGGAUCCAUUCCGCGAGUCCUGCGGGAAGCACUACUUCGCUGGUCGCGACGUUACCCCUGUCUACGUGAAGGGGGCCCUGGAUAACCUACCUGCCCUUUUCCGUCUCUUCAACUCGUUGAAGCGAUGGGAGGAGCAAACAGGUAUCCGGAUCCCUGACACG 19 | ; 20 | end; 21 | 22 | -------------------------------------------------------------------------------- /autotools/missing: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Common wrapper for a few potentially missing GNU programs. 3 | 4 | scriptversion=2013-10-28.13; # UTC 5 | 6 | # Copyright (C) 1996-2014 Free Software Foundation, Inc. 7 | # Originally written by Fran,cois Pinard , 1996. 8 | 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2, or (at your option) 12 | # any later version. 13 | 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program. If not, see . 21 | 22 | # As a special exception to the GNU General Public License, if you 23 | # distribute this file as part of a program that contains a 24 | # configuration script generated by Autoconf, you may include it under 25 | # the same distribution terms that you use for the rest of that program. 26 | 27 | if test $# -eq 0; then 28 | echo 1>&2 "Try '$0 --help' for more information" 29 | exit 1 30 | fi 31 | 32 | case $1 in 33 | 34 | --is-lightweight) 35 | # Used by our autoconf macros to check whether the available missing 36 | # script is modern enough. 37 | exit 0 38 | ;; 39 | 40 | --run) 41 | # Back-compat with the calling convention used by older automake. 42 | shift 43 | ;; 44 | 45 | -h|--h|--he|--hel|--help) 46 | echo "\ 47 | $0 [OPTION]... PROGRAM [ARGUMENT]... 48 | 49 | Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due 50 | to PROGRAM being missing or too old. 51 | 52 | Options: 53 | -h, --help display this help and exit 54 | -v, --version output version information and exit 55 | 56 | Supported PROGRAM values: 57 | aclocal autoconf autoheader autom4te automake makeinfo 58 | bison yacc flex lex help2man 59 | 60 | Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 61 | 'g' are ignored when checking the name. 62 | 63 | Send bug reports to ." 64 | exit $? 65 | ;; 66 | 67 | -v|--v|--ve|--ver|--vers|--versi|--versio|--version) 68 | echo "missing $scriptversion (GNU Automake)" 69 | exit $? 70 | ;; 71 | 72 | -*) 73 | echo 1>&2 "$0: unknown '$1' option" 74 | echo 1>&2 "Try '$0 --help' for more information" 75 | exit 1 76 | ;; 77 | 78 | esac 79 | 80 | # Run the given program, remember its exit status. 81 | "$@"; st=$? 82 | 83 | # If it succeeded, we are done. 84 | test $st -eq 0 && exit 0 85 | 86 | # Also exit now if we it failed (or wasn't found), and '--version' was 87 | # passed; such an option is passed most likely to detect whether the 88 | # program is present and works. 89 | case $2 in --version|--help) exit $st;; esac 90 | 91 | # Exit code 63 means version mismatch. This often happens when the user 92 | # tries to use an ancient version of a tool on a file that requires a 93 | # minimum version. 94 | if test $st -eq 63; then 95 | msg="probably too old" 96 | elif test $st -eq 127; then 97 | # Program was missing. 98 | msg="missing on your system" 99 | else 100 | # Program was found and executed, but failed. Give up. 101 | exit $st 102 | fi 103 | 104 | perl_URL=http://www.perl.org/ 105 | flex_URL=http://flex.sourceforge.net/ 106 | gnu_software_URL=http://www.gnu.org/software 107 | 108 | program_details () 109 | { 110 | case $1 in 111 | aclocal|automake) 112 | echo "The '$1' program is part of the GNU Automake package:" 113 | echo "<$gnu_software_URL/automake>" 114 | echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" 115 | echo "<$gnu_software_URL/autoconf>" 116 | echo "<$gnu_software_URL/m4/>" 117 | echo "<$perl_URL>" 118 | ;; 119 | autoconf|autom4te|autoheader) 120 | echo "The '$1' program is part of the GNU Autoconf package:" 121 | echo "<$gnu_software_URL/autoconf/>" 122 | echo "It also requires GNU m4 and Perl in order to run:" 123 | echo "<$gnu_software_URL/m4/>" 124 | echo "<$perl_URL>" 125 | ;; 126 | esac 127 | } 128 | 129 | give_advice () 130 | { 131 | # Normalize program name to check for. 132 | normalized_program=`echo "$1" | sed ' 133 | s/^gnu-//; t 134 | s/^gnu//; t 135 | s/^g//; t'` 136 | 137 | printf '%s\n' "'$1' is $msg." 138 | 139 | configure_deps="'configure.ac' or m4 files included by 'configure.ac'" 140 | case $normalized_program in 141 | autoconf*) 142 | echo "You should only need it if you modified 'configure.ac'," 143 | echo "or m4 files included by it." 144 | program_details 'autoconf' 145 | ;; 146 | autoheader*) 147 | echo "You should only need it if you modified 'acconfig.h' or" 148 | echo "$configure_deps." 149 | program_details 'autoheader' 150 | ;; 151 | automake*) 152 | echo "You should only need it if you modified 'Makefile.am' or" 153 | echo "$configure_deps." 154 | program_details 'automake' 155 | ;; 156 | aclocal*) 157 | echo "You should only need it if you modified 'acinclude.m4' or" 158 | echo "$configure_deps." 159 | program_details 'aclocal' 160 | ;; 161 | autom4te*) 162 | echo "You might have modified some maintainer files that require" 163 | echo "the 'autom4te' program to be rebuilt." 164 | program_details 'autom4te' 165 | ;; 166 | bison*|yacc*) 167 | echo "You should only need it if you modified a '.y' file." 168 | echo "You may want to install the GNU Bison package:" 169 | echo "<$gnu_software_URL/bison/>" 170 | ;; 171 | lex*|flex*) 172 | echo "You should only need it if you modified a '.l' file." 173 | echo "You may want to install the Fast Lexical Analyzer package:" 174 | echo "<$flex_URL>" 175 | ;; 176 | help2man*) 177 | echo "You should only need it if you modified a dependency" \ 178 | "of a man page." 179 | echo "You may want to install the GNU Help2man package:" 180 | echo "<$gnu_software_URL/help2man/>" 181 | ;; 182 | makeinfo*) 183 | echo "You should only need it if you modified a '.texi' file, or" 184 | echo "any other file indirectly affecting the aspect of the manual." 185 | echo "You might want to install the Texinfo package:" 186 | echo "<$gnu_software_URL/texinfo/>" 187 | echo "The spurious makeinfo call might also be the consequence of" 188 | echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" 189 | echo "want to install GNU make:" 190 | echo "<$gnu_software_URL/make/>" 191 | ;; 192 | *) 193 | echo "You might have modified some files without having the proper" 194 | echo "tools for further handling them. Check the 'README' file, it" 195 | echo "often tells you about the needed prerequisites for installing" 196 | echo "this package. You may also peek at any GNU archive site, in" 197 | echo "case some other package contains this missing '$1' program." 198 | ;; 199 | esac 200 | } 201 | 202 | give_advice "$1" | sed -e '1s/^/WARNING: /' \ 203 | -e '2,$s/^/ /' >&2 204 | 205 | # Propagate the correct exit status (expected to be 127 for a program 206 | # not found, 63 for a program that failed due to version mismatch). 207 | exit $st 208 | 209 | # Local variables: 210 | # eval: (add-hook 'write-file-hooks 'time-stamp) 211 | # time-stamp-start: "scriptversion=" 212 | # time-stamp-format: "%:y-%02m-%02d.%02H" 213 | # time-stamp-time-zone: "UTC" 214 | # time-stamp-end: "; # UTC" 215 | # End: 216 | -------------------------------------------------------------------------------- /autotools/install-sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # $NetBSD: install-sh.in,v 1.6 2012/01/11 13:07:31 hans Exp $ 4 | # This script now also installs multiple files, but might choke on installing 5 | # multiple files with spaces in the file names. 6 | # 7 | # install - install a program, script, or datafile 8 | # This comes from X11R5 (mit/util/scripts/install.sh). 9 | # 10 | # Copyright 1991 by the Massachusetts Institute of Technology 11 | # 12 | # Permission to use, copy, modify, distribute, and sell this software and its 13 | # documentation for any purpose is hereby granted without fee, provided that 14 | # the above copyright notice appear in all copies and that both that 15 | # copyright notice and this permission notice appear in supporting 16 | # documentation, and that the name of M.I.T. not be used in advertising or 17 | # publicity pertaining to distribution of the software without specific, 18 | # written prior permission. M.I.T. makes no representations about the 19 | # suitability of this software for any purpose. It is provided "as is" 20 | # without express or implied warranty. 21 | # 22 | # Calling this script install-sh is preferred over install.sh, to prevent 23 | # `make' implicit rules from creating a file called install from it 24 | # when there is no Makefile. 25 | # 26 | # This script is compatible with the BSD install script, but was written 27 | # from scratch. 28 | 29 | # set DOITPROG to echo to test this script 30 | 31 | # Don't use :- since 4.3BSD and earlier shells don't like it. 32 | doit="${DOITPROG-}" 33 | 34 | 35 | # put in absolute paths if you don't have them in your path; or use env. vars. 36 | 37 | awkprog="${AWKPROG-awk}" 38 | mvprog="${MVPROG-mv}" 39 | cpprog="${CPPROG-cp}" 40 | chmodprog="${CHMODPROG-chmod}" 41 | chownprog="${CHOWNPROG-chown}" 42 | chgrpprog="${CHGRPPROG-chgrp}" 43 | stripprog="${STRIPPROG-strip}" 44 | rmprog="${RMPROG-rm}" 45 | mkdirprog="${MKDIRPROG-mkdir}" 46 | 47 | instcmd="$cpprog" 48 | instflags="" 49 | pathcompchmodcmd="$chmodprog 755" 50 | chmodcmd="$chmodprog 755" 51 | chowncmd="" 52 | chgrpcmd="" 53 | stripcmd="" 54 | stripflags="" 55 | rmcmd="$rmprog -f" 56 | mvcmd="$mvprog" 57 | src="" 58 | msrc="" 59 | dst="" 60 | dir_arg="" 61 | suffix="" 62 | suffixfmt="" 63 | 64 | while [ x"$1" != x ]; do 65 | case $1 in 66 | -b) suffix=".old" 67 | shift 68 | continue;; 69 | 70 | -B) suffixfmt="$2" 71 | shift 72 | shift 73 | continue;; 74 | 75 | -c) instcmd="$cpprog" 76 | shift 77 | continue;; 78 | 79 | -d) dir_arg=true 80 | shift 81 | continue;; 82 | 83 | -m) chmodcmd="$chmodprog $2" 84 | shift 85 | shift 86 | continue;; 87 | 88 | -m*) 89 | chmodcmd="$chmodprog ${1#-m}" 90 | shift 91 | continue;; 92 | 93 | -o) chowncmd="$chownprog $2" 94 | shift 95 | shift 96 | continue;; 97 | 98 | -g) chgrpcmd="$chgrpprog $2" 99 | shift 100 | shift 101 | continue;; 102 | 103 | -s) stripcmd="$stripprog" 104 | shift 105 | continue;; 106 | 107 | -S) stripcmd="$stripprog" 108 | stripflags="-S $2 $stripflags" 109 | shift 110 | shift 111 | continue;; 112 | 113 | -p) instflags="-p" 114 | shift 115 | continue;; 116 | 117 | *) if [ x"$msrc" = x ] 118 | then 119 | msrc="$dst" 120 | else 121 | msrc="$msrc $dst" 122 | fi 123 | src="$dst" 124 | dst="$1" 125 | shift 126 | continue;; 127 | esac 128 | done 129 | 130 | if [ x"$dir_arg" = x ] 131 | then 132 | dstisfile="" 133 | if [ ! -d "$dst" ] 134 | then 135 | if [ x"$msrc" = x"$src" ] 136 | then 137 | dstisfile=true 138 | else 139 | echo "install: destination is not a directory" 140 | exit 1 141 | fi 142 | fi 143 | else 144 | msrc="$msrc $dst" 145 | fi 146 | 147 | if [ x"$msrc" = x ] 148 | then 149 | echo "install: no destination specified" 150 | exit 1 151 | fi 152 | 153 | for srcarg in $msrc; do 154 | 155 | if [ x"$dir_arg" != x ]; then 156 | 157 | dstarg="$srcarg" 158 | else 159 | dstarg="$dst" 160 | 161 | # Waiting for this to be detected by the "$instcmd $srcarg $dsttmp" command 162 | # might cause directories to be created, which would be especially bad 163 | # if $src (and thus $dsttmp) contains '*'. 164 | 165 | if [ -f "$srcarg" ] 166 | then 167 | doinst="$instcmd $instflags" 168 | elif [ -d "$srcarg" ] 169 | then 170 | echo "install: $srcarg: not a regular file" 171 | exit 1 172 | elif [ "$srcarg" = "/dev/null" ] 173 | then 174 | doinst="$cpprog" 175 | else 176 | echo "install: $srcarg does not exist" 177 | exit 1 178 | fi 179 | 180 | # If destination is a directory, append the input filename; if your system 181 | # does not like double slashes in filenames, you may need to add some logic 182 | 183 | if [ -d "$dstarg" ] 184 | then 185 | dstarg="$dstarg"/`basename "$srcarg"` 186 | fi 187 | fi 188 | 189 | ## this sed command emulates the dirname command 190 | dstdir=`echo "$dstarg" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` 191 | 192 | # Make sure that the destination directory exists. 193 | # this part is taken from Noah Friedman's mkinstalldirs script 194 | 195 | # Skip lots of stat calls in the usual case. 196 | if [ ! -d "$dstdir" ]; then 197 | defaultIFS=' 198 | ' 199 | IFS="${IFS-${defaultIFS}}" 200 | 201 | oIFS="${IFS}" 202 | # Some sh's can't handle IFS=/ for some reason. 203 | IFS='%' 204 | set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` 205 | IFS="${oIFS}" 206 | 207 | pathcomp='' 208 | 209 | while [ $# -ne 0 ] ; do 210 | pathcomp="${pathcomp}${1}" 211 | shift 212 | 213 | if [ ! -d "${pathcomp}" ] ; 214 | then 215 | $doit $mkdirprog "${pathcomp}" 216 | if [ x"$chowncmd" != x ]; then $doit $chowncmd "${pathcomp}"; else true ; fi && 217 | if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "${pathcomp}"; else true ; fi && 218 | if [ x"$pathcompchmodcmd" != x ]; then $doit $pathcompchmodcmd "${pathcomp}"; else true ; fi 219 | 220 | else 221 | true 222 | fi 223 | 224 | pathcomp="${pathcomp}/" 225 | done 226 | fi 227 | 228 | if [ x"$dir_arg" != x ] 229 | then 230 | if [ -d "$dstarg" ]; then 231 | true 232 | else 233 | $doit $mkdirprog "$dstarg" && 234 | 235 | if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dstarg"; else true ; fi && 236 | if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dstarg"; else true ; fi && 237 | if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dstarg"; else true ; fi 238 | fi 239 | else 240 | 241 | if [ x"$dstisfile" = x ] 242 | then 243 | file=$srcarg 244 | else 245 | file=$dst 246 | fi 247 | 248 | dstfile=`basename "$file"` 249 | dstfinal="$dstdir/$dstfile" 250 | 251 | # Make a temp file name in the proper directory. 252 | 253 | dsttmp=$dstdir/#inst.$$# 254 | 255 | # Make a backup file name in the proper directory. 256 | case x$suffixfmt in 257 | *%*) suffix=`echo x | 258 | $awkprog -v bname="$dstfinal" -v fmt="$suffixfmt" ' 259 | { cnt = 0; 260 | do { 261 | sfx = sprintf(fmt, cnt++); 262 | name = bname sfx; 263 | } while (system("test -f " name) == 0); 264 | print sfx; }' -`;; 265 | x) ;; 266 | *) suffix="$suffixfmt";; 267 | esac 268 | dstbackup="$dstfinal$suffix" 269 | 270 | # Move or copy the file name to the temp name 271 | 272 | $doit $doinst $srcarg "$dsttmp" && 273 | 274 | trap "rm -f ${dsttmp}" 0 && 275 | 276 | # and set any options; do chmod last to preserve setuid bits 277 | 278 | # If any of these fail, we abort the whole thing. If we want to 279 | # ignore errors from any of these, just make sure not to ignore 280 | # errors from the above "$doit $instcmd $src $dsttmp" command. 281 | 282 | if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else true;fi && 283 | if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else true;fi && 284 | if [ x"$stripcmd" != x ]; then $doit $stripcmd $stripflags "$dsttmp"; else true;fi && 285 | if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else true;fi && 286 | 287 | # Now rename the file to the real destination. 288 | 289 | if [ x"$suffix" != x ] && [ -f "$dstfinal" ] 290 | then 291 | $doit $mvcmd "$dstfinal" "$dstbackup" 292 | else 293 | $doit $rmcmd -f "$dstfinal" 294 | fi && 295 | $doit $mvcmd "$dsttmp" "$dstfinal" 296 | fi 297 | 298 | done && 299 | 300 | 301 | exit 0 302 | -------------------------------------------------------------------------------- /src/likelihood.h: -------------------------------------------------------------------------------- 1 | #ifndef LIKELIHOOD_H_ 2 | #define LIKELIHOOD_H_ 3 | 4 | //#define TIMING_ANALIZ 5 | #if defined (TIMING_ANALIZ) 6 | static clock_t CPUCondLikeDown; 7 | static clock_t CPUScalers; 8 | static clock_t CPUScalersRemove; 9 | static clock_t CPUCondLikeRoot; 10 | static clock_t CPULilklihood; 11 | 12 | #define TIME(X1,CPUtime)\ 13 | {CPUTimeStart = clock();\ 14 | X1;\ 15 | CPUtime += (clock()-CPUTimeStart);} 16 | #else 17 | #define TIME(X1,CPUtime)\ 18 | X1; 19 | #endif 20 | 21 | #define A 0 22 | #define C 1 23 | #define G 2 24 | #define T 3 25 | #define AA 0 26 | #define AC 1 27 | #define AG 2 28 | #define AT 3 29 | #define CA 4 30 | #define CC 5 31 | #define CG 6 32 | #define CT 7 33 | #define GA 8 34 | #define GC 9 35 | #define GG 10 36 | #define GT 11 37 | #define TA 12 38 | #define TC 13 39 | #define TG 14 40 | #define TT 15 41 | 42 | 43 | void CopySiteScalers (ModelInfo *m, int chain); 44 | void ResetSiteScalers (ModelInfo *m, int chain); 45 | void FlipCijkSpace (ModelInfo *m, int chain); 46 | void FlipCondLikeSpace (ModelInfo *m, int chain, int nodeIndex); 47 | void FlipNodeScalerSpace (ModelInfo *m, int chain, int nodeIndex); 48 | void FlipSiteScalerSpace (ModelInfo *m, int chain); 49 | void FlipTiProbsSpace (ModelInfo *m, int chain, int nodeIndex); 50 | 51 | int CondLikeDown_Bin (TreeNode *p, int division, int chain); 52 | #if defined (SSE_ENABLED) 53 | int CondLikeDown_Bin_SSE (TreeNode *p, int division, int chain); 54 | #endif 55 | int CondLikeDown_Gen (TreeNode *p, int division, int chain); 56 | #if defined (SSE_ENABLED) 57 | int CondLikeDown_Gen_SSE (TreeNode *p, int division, int chain); 58 | #endif 59 | int CondLikeDown_Gen_GibbsGamma (TreeNode *p, int division, int chain); 60 | int CondLikeDown_NUC4 (TreeNode *p, int division, int chain); 61 | #if defined (FMA_ENABLED) 62 | int CondLikeDown_NUC4_FMA (TreeNode *p, int division, int chain); 63 | #endif 64 | #if defined (AVX_ENABLED) 65 | int CondLikeDown_NUC4_AVX (TreeNode *p, int division, int chain); 66 | #endif 67 | #if defined (SSE_ENABLED) 68 | int CondLikeDown_NUC4_SSE (TreeNode *p, int division, int chain); 69 | #endif 70 | int CondLikeDown_NUC4_GibbsGamma (TreeNode *p, int division, int chain); 71 | int CondLikeDown_NY98 (TreeNode *p, int division, int chain); 72 | #if defined (SSE_ENABLED) 73 | int CondLikeDown_NY98_SSE (TreeNode *p, int division, int chain); 74 | #endif 75 | int CondLikeDown_Std (TreeNode *p, int division, int chain); 76 | int CondLikeRoot_Bin (TreeNode *p, int division, int chain); 77 | #if defined (SSE_ENABLED) 78 | int CondLikeRoot_Bin_SSE (TreeNode *p, int division, int chain); 79 | #endif 80 | int CondLikeRoot_Gen (TreeNode *p, int division, int chain); 81 | #if defined (SSE_ENABLED) 82 | int CondLikeRoot_Gen_SSE (TreeNode *p, int division, int chain); 83 | #endif 84 | int CondLikeRoot_Gen_GibbsGamma (TreeNode *p, int division, int chain); 85 | int CondLikeRoot_NUC4 (TreeNode *p, int division, int chain); 86 | #if defined (FMA_ENABLED) 87 | int CondLikeRoot_NUC4_FMA (TreeNode *p, int division, int chain); 88 | #endif 89 | #if defined (AVX_ENABLED) 90 | int CondLikeRoot_NUC4_AVX (TreeNode *p, int division, int chain); 91 | #endif 92 | #if defined (SSE_ENABLED) 93 | int CondLikeRoot_NUC4_SSE (TreeNode *p, int division, int chain); 94 | #endif 95 | int CondLikeRoot_NUC4_GibbsGamma (TreeNode *p, int division, int chain); 96 | int CondLikeRoot_NY98 (TreeNode *p, int division, int chain); 97 | #if defined (SSE_ENABLED) 98 | int CondLikeRoot_NY98_SSE (TreeNode *p, int division, int chain); 99 | #endif 100 | int CondLikeRoot_Std (TreeNode *p, int division, int chain); 101 | int CondLikeScaler_Gen (TreeNode *p, int division, int chain); 102 | #if defined (SSE_ENABLED) 103 | int CondLikeScaler_Gen_SSE (TreeNode *p, int division, int chain); 104 | #endif 105 | int CondLikeScaler_Gen_GibbsGamma (TreeNode *p, int division, int chain); 106 | int CondLikeScaler_NUC4 (TreeNode *p, int division, int chain); 107 | #if defined (AVX_ENABLED) 108 | int CondLikeScaler_NUC4_AVX (TreeNode *p, int division, int chain); 109 | #endif 110 | #if defined (SSE_ENABLED) 111 | int CondLikeScaler_NUC4_SSE (TreeNode *p, int division, int chain); 112 | #endif 113 | int CondLikeScaler_NUC4_GibbsGamma (TreeNode *p, int division, int chain); 114 | int CondLikeScaler_NY98 (TreeNode *p, int division, int chain); 115 | #if defined (SSE_ENABLED) 116 | int CondLikeScaler_NY98_SSE (TreeNode *p, int division, int chain); 117 | #endif 118 | int CondLikeScaler_Std (TreeNode *p, int division, int chain); 119 | int CondLikeUp_Bin (TreeNode *p, int division, int chain); 120 | int CondLikeUp_Gen (TreeNode *p, int division, int chain); 121 | int CondLikeUp_NUC4 (TreeNode *p, int division, int chain); 122 | int CondLikeUp_Std (TreeNode *p, int division, int chain); 123 | #if defined(BEAGLE_V3_ENABLED) 124 | void LaunchLogLikeForBeagleMultiPartition(int chain, MrBFlt* lnL); 125 | #endif 126 | void LaunchLogLikeForDivision (int chain, int d, MrBFlt* lnL); 127 | int Likelihood_Adgamma (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 128 | int Likelihood_Gen (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 129 | #if defined (SSE_ENABLED) 130 | int Likelihood_Gen_SSE (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 131 | #endif 132 | int Likelihood_Gen_GibbsGamma (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 133 | int Likelihood_NUC4 (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 134 | #if defined (FMA_ENABLED) 135 | int Likelihood_NUC4_FMA (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 136 | #endif 137 | #if defined (AVX_ENABLED) 138 | int Likelihood_NUC4_AVX (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 139 | #endif 140 | #if defined (SSE_ENABLED) 141 | int Likelihood_NUC4_SSE (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 142 | #endif 143 | int Likelihood_NUC4_GibbsGamma (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 144 | int Likelihood_NY98 (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 145 | #if defined (SSE_ENABLED) 146 | int Likelihood_NY98_SSE (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 147 | #endif 148 | int Likelihood_Pars (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 149 | int Likelihood_ParsStd (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 150 | int Likelihood_Res (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 151 | #if defined (SSE_ENABLED) 152 | int Likelihood_Res_SSE (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 153 | #endif 154 | int Likelihood_Std (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 155 | int Likelihood_Cont (TreeNode *p, int division, int chain, MrBFlt *lnL, int whichSitePats); 156 | int TiProbs_Fels (TreeNode *p, int division, int chain); 157 | int TiProbs_Gen (TreeNode *p, int division, int chain); 158 | int TiProbs_GenCov (TreeNode *p, int division, int chain); 159 | int TiProbs_Hky (TreeNode *p, int division, int chain); 160 | int TiProbs_JukesCantor (TreeNode *p, int division, int chain); 161 | int TiProbs_Std (TreeNode *p, int division, int chain); 162 | int TiProbs_Res (TreeNode *p, int division, int chain); 163 | 164 | #endif /* LIKELIHOOD_H_ */ 165 | -------------------------------------------------------------------------------- /autotools/compile: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Wrapper for compilers which do not understand '-c -o'. 3 | 4 | scriptversion=2012-10-14.11; # UTC 5 | 6 | # Copyright (C) 1999-2014 Free Software Foundation, Inc. 7 | # Written by Tom Tromey . 8 | # 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2, or (at your option) 12 | # any later version. 13 | # 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program. If not, see . 21 | 22 | # As a special exception to the GNU General Public License, if you 23 | # distribute this file as part of a program that contains a 24 | # configuration script generated by Autoconf, you may include it under 25 | # the same distribution terms that you use for the rest of that program. 26 | 27 | # This file is maintained in Automake, please report 28 | # bugs to or send patches to 29 | # . 30 | 31 | nl=' 32 | ' 33 | 34 | # We need space, tab and new line, in precisely that order. Quoting is 35 | # there to prevent tools from complaining about whitespace usage. 36 | IFS=" "" $nl" 37 | 38 | file_conv= 39 | 40 | # func_file_conv build_file lazy 41 | # Convert a $build file to $host form and store it in $file 42 | # Currently only supports Windows hosts. If the determined conversion 43 | # type is listed in (the comma separated) LAZY, no conversion will 44 | # take place. 45 | func_file_conv () 46 | { 47 | file=$1 48 | case $file in 49 | / | /[!/]*) # absolute file, and not a UNC file 50 | if test -z "$file_conv"; then 51 | # lazily determine how to convert abs files 52 | case `uname -s` in 53 | MINGW*) 54 | file_conv=mingw 55 | ;; 56 | CYGWIN*) 57 | file_conv=cygwin 58 | ;; 59 | *) 60 | file_conv=wine 61 | ;; 62 | esac 63 | fi 64 | case $file_conv/,$2, in 65 | *,$file_conv,*) 66 | ;; 67 | mingw/*) 68 | file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` 69 | ;; 70 | cygwin/*) 71 | file=`cygpath -m "$file" || echo "$file"` 72 | ;; 73 | wine/*) 74 | file=`winepath -w "$file" || echo "$file"` 75 | ;; 76 | esac 77 | ;; 78 | esac 79 | } 80 | 81 | # func_cl_dashL linkdir 82 | # Make cl look for libraries in LINKDIR 83 | func_cl_dashL () 84 | { 85 | func_file_conv "$1" 86 | if test -z "$lib_path"; then 87 | lib_path=$file 88 | else 89 | lib_path="$lib_path;$file" 90 | fi 91 | linker_opts="$linker_opts -LIBPATH:$file" 92 | } 93 | 94 | # func_cl_dashl library 95 | # Do a library search-path lookup for cl 96 | func_cl_dashl () 97 | { 98 | lib=$1 99 | found=no 100 | save_IFS=$IFS 101 | IFS=';' 102 | for dir in $lib_path $LIB 103 | do 104 | IFS=$save_IFS 105 | if $shared && test -f "$dir/$lib.dll.lib"; then 106 | found=yes 107 | lib=$dir/$lib.dll.lib 108 | break 109 | fi 110 | if test -f "$dir/$lib.lib"; then 111 | found=yes 112 | lib=$dir/$lib.lib 113 | break 114 | fi 115 | if test -f "$dir/lib$lib.a"; then 116 | found=yes 117 | lib=$dir/lib$lib.a 118 | break 119 | fi 120 | done 121 | IFS=$save_IFS 122 | 123 | if test "$found" != yes; then 124 | lib=$lib.lib 125 | fi 126 | } 127 | 128 | # func_cl_wrapper cl arg... 129 | # Adjust compile command to suit cl 130 | func_cl_wrapper () 131 | { 132 | # Assume a capable shell 133 | lib_path= 134 | shared=: 135 | linker_opts= 136 | for arg 137 | do 138 | if test -n "$eat"; then 139 | eat= 140 | else 141 | case $1 in 142 | -o) 143 | # configure might choose to run compile as 'compile cc -o foo foo.c'. 144 | eat=1 145 | case $2 in 146 | *.o | *.[oO][bB][jJ]) 147 | func_file_conv "$2" 148 | set x "$@" -Fo"$file" 149 | shift 150 | ;; 151 | *) 152 | func_file_conv "$2" 153 | set x "$@" -Fe"$file" 154 | shift 155 | ;; 156 | esac 157 | ;; 158 | -I) 159 | eat=1 160 | func_file_conv "$2" mingw 161 | set x "$@" -I"$file" 162 | shift 163 | ;; 164 | -I*) 165 | func_file_conv "${1#-I}" mingw 166 | set x "$@" -I"$file" 167 | shift 168 | ;; 169 | -l) 170 | eat=1 171 | func_cl_dashl "$2" 172 | set x "$@" "$lib" 173 | shift 174 | ;; 175 | -l*) 176 | func_cl_dashl "${1#-l}" 177 | set x "$@" "$lib" 178 | shift 179 | ;; 180 | -L) 181 | eat=1 182 | func_cl_dashL "$2" 183 | ;; 184 | -L*) 185 | func_cl_dashL "${1#-L}" 186 | ;; 187 | -static) 188 | shared=false 189 | ;; 190 | -Wl,*) 191 | arg=${1#-Wl,} 192 | save_ifs="$IFS"; IFS=',' 193 | for flag in $arg; do 194 | IFS="$save_ifs" 195 | linker_opts="$linker_opts $flag" 196 | done 197 | IFS="$save_ifs" 198 | ;; 199 | -Xlinker) 200 | eat=1 201 | linker_opts="$linker_opts $2" 202 | ;; 203 | -*) 204 | set x "$@" "$1" 205 | shift 206 | ;; 207 | *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) 208 | func_file_conv "$1" 209 | set x "$@" -Tp"$file" 210 | shift 211 | ;; 212 | *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) 213 | func_file_conv "$1" mingw 214 | set x "$@" "$file" 215 | shift 216 | ;; 217 | *) 218 | set x "$@" "$1" 219 | shift 220 | ;; 221 | esac 222 | fi 223 | shift 224 | done 225 | if test -n "$linker_opts"; then 226 | linker_opts="-link$linker_opts" 227 | fi 228 | exec "$@" $linker_opts 229 | exit 1 230 | } 231 | 232 | eat= 233 | 234 | case $1 in 235 | '') 236 | echo "$0: No command. Try '$0 --help' for more information." 1>&2 237 | exit 1; 238 | ;; 239 | -h | --h*) 240 | cat <<\EOF 241 | Usage: compile [--help] [--version] PROGRAM [ARGS] 242 | 243 | Wrapper for compilers which do not understand '-c -o'. 244 | Remove '-o dest.o' from ARGS, run PROGRAM with the remaining 245 | arguments, and rename the output as expected. 246 | 247 | If you are trying to build a whole package this is not the 248 | right script to run: please start by reading the file 'INSTALL'. 249 | 250 | Report bugs to . 251 | EOF 252 | exit $? 253 | ;; 254 | -v | --v*) 255 | echo "compile $scriptversion" 256 | exit $? 257 | ;; 258 | cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) 259 | func_cl_wrapper "$@" # Doesn't return... 260 | ;; 261 | esac 262 | 263 | ofile= 264 | cfile= 265 | 266 | for arg 267 | do 268 | if test -n "$eat"; then 269 | eat= 270 | else 271 | case $1 in 272 | -o) 273 | # configure might choose to run compile as 'compile cc -o foo foo.c'. 274 | # So we strip '-o arg' only if arg is an object. 275 | eat=1 276 | case $2 in 277 | *.o | *.obj) 278 | ofile=$2 279 | ;; 280 | *) 281 | set x "$@" -o "$2" 282 | shift 283 | ;; 284 | esac 285 | ;; 286 | *.c) 287 | cfile=$1 288 | set x "$@" "$1" 289 | shift 290 | ;; 291 | *) 292 | set x "$@" "$1" 293 | shift 294 | ;; 295 | esac 296 | fi 297 | shift 298 | done 299 | 300 | if test -z "$ofile" || test -z "$cfile"; then 301 | # If no '-o' option was seen then we might have been invoked from a 302 | # pattern rule where we don't need one. That is ok -- this is a 303 | # normal compilation that the losing compiler can handle. If no 304 | # '.c' file was seen then we are probably linking. That is also 305 | # ok. 306 | exec "$@" 307 | fi 308 | 309 | # Name of file we expect compiler to create. 310 | cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` 311 | 312 | # Create the lock directory. 313 | # Note: use '[/\\:.-]' here to ensure that we don't use the same name 314 | # that we are using for the .o file. Also, base the name on the expected 315 | # object file name, since that is what matters with a parallel build. 316 | lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d 317 | while true; do 318 | if mkdir "$lockdir" >/dev/null 2>&1; then 319 | break 320 | fi 321 | sleep 1 322 | done 323 | # FIXME: race condition here if user kills between mkdir and trap. 324 | trap "rmdir '$lockdir'; exit 1" 1 2 15 325 | 326 | # Run the compile. 327 | "$@" 328 | ret=$? 329 | 330 | if test -f "$cofile"; then 331 | test "$cofile" = "$ofile" || mv "$cofile" "$ofile" 332 | elif test -f "${cofile}bj"; then 333 | test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" 334 | fi 335 | 336 | rmdir "$lockdir" 337 | exit $ret 338 | 339 | # Local Variables: 340 | # mode: shell-script 341 | # sh-indentation: 2 342 | # eval: (add-hook 'write-file-hooks 'time-stamp) 343 | # time-stamp-start: "scriptversion=" 344 | # time-stamp-format: "%:y-%02m-%02d.%02H" 345 | # time-stamp-time-zone: "UTC" 346 | # time-stamp-end: "; # UTC" 347 | # End: 348 | -------------------------------------------------------------------------------- /examples/primates.nex: -------------------------------------------------------------------------------- 1 | #NEXUS 2 | 3 | [ Data from: Hayasaka, K., T. Gojobori, and S. Horai. 1988. Molecular phylogeny and evolution of primate mitochondrial DNA. Mol. Biol. Evol. 5:626-644. ] 4 | 5 | begin data; 6 | dimensions ntax=12 nchar=898; 7 | format datatype=dna interleave=no gap=-; 8 | matrix 9 | Tarsius_syrichta AAGTTTCATTGGAGCCACCACTCTTATAATTGCCCATGGCCTCACCTCCTCCCTATTATTTTGCCTAGCAAATACAAACTACGAACGAGTCCACAGTCGAACAATAGCACTAGCCCGTGGCCTTCAAACCCTATTACCTCTTGCAGCAACATGATGACTCCTCGCCAGCTTAACCAACCTGGCCCTTCCCCCAACAATTAATTTAATCGGTGAACTGTCCGTAATAATAGCAGCATTTTCATGGTCACACCTAACTATTATCTTAGTAGGCCTTAACACCCTTATCACCGCCCTATATTCCCTATATATACTAATCATAACTCAACGAGGAAAATACACATATCATATCAACAATATCATGCCCCCTTTCACCCGAGAAAATACATTAATAATCATACACCTATTTCCCTTAATCCTACTATCTACCAACCCCAAAGTAATTATAGGAACCATGTACTGTAAATATAGTTTAAACAAAACATTAGATTGTGAGTCTAATAATAGAAGCCCAAAGATTTCTTATTTACCAAGAAAGTA-TGCAAGAACTGCTAACTCATGCCTCCATATATAACAATGTGGCTTTCTT-ACTTTTAAAGGATAGAAGTAATCCATCGGTCTTAGGAACCGAAAA-ATTGGTGCAACTCCAAATAAAAGTAATAAATTTATTTTCATCCTCCATTTTACTATCACTTACACTCTTAATTACCCCATTTATTATTACAACAACTAAAAAATATGAAACACATGCATACCCTTACTACGTAAAAAACTCTATCGCCTGCGCATTTATAACAAGCCTAGTCCCAATGCTCATATTTCTATACACAAATCAAGAAATAATCATTTCCAACTGACATTGAATAACGATTCATACTATCAAATTATGCCTAAGCTT 10 | Lemur_catta AAGCTTCATAGGAGCAACCATTCTAATAATCGCACATGGCCTTACATCATCCATATTATTCTGTCTAGCCAACTCTAACTACGAACGAATCCATAGCCGTACAATACTACTAGCACGAGGGATCCAAACCATTCTCCCTCTTATAGCCACCTGATGACTACTCGCCAGCCTAACTAACCTAGCCCTACCCACCTCTATCAATTTAATTGGCGAACTATTCGTCACTATAGCATCCTTCTCATGATCAAACATTACAATTATCTTAATAGGCTTAAATATGCTCATCACCGCTCTCTATTCCCTCTATATATTAACTACTACACAACGAGGAAAACTCACATATCATTCGCACAACCTAAACCCATCCTTTACACGAGAAAACACCCTTATATCCATACACATACTCCCCCTTCTCCTATTTACCTTAAACCCCAAAATTATTCTAGGACCCACGTACTGTAAATATAGTTTAAA-AAAACACTAGATTGTGAATCCAGAAATAGAAGCTCAAAC-CTTCTTATTTACCGAGAAAGTAATGTATGAACTGCTAACTCTGCACTCCGTATATAAAAATACGGCTATCTCAACTTTTAAAGGATAGAAGTAATCCATTGGCCTTAGGAGCCAAAAA-ATTGGTGCAACTCCAAATAAAAGTAATAAATCTATTATCCTCTTTCACCCTTGTCACACTGATTATCCTAACTTTACCTATCATTATAAACGTTACAAACATATACAAAAACTACCCCTATGCACCATACGTAAAATCTTCTATTGCATGTGCCTTCATCACTAGCCTCATCCCAACTATATTATTTATCTCCTCAGGACAAGAAACAATCATTTCCAACTGACATTGAATAACAATCCAAACCCTAAAACTATCTATTAGCTT 11 | Homo_sapiens AAGCTTCACCGGCGCAGTCATTCTCATAATCGCCCACGGGCTTACATCCTCATTACTATTCTGCCTAGCAAACTCAAACTACGAACGCACTCACAGTCGCATCATAATCCTCTCTCAAGGACTTCAAACTCTACTCCCACTAATAGCTTTTTGATGACTTCTAGCAAGCCTCGCTAACCTCGCCTTACCCCCCACTATTAACCTACTGGGAGAACTCTCTGTGCTAGTAACCACGTTCTCCTGATCAAATATCACTCTCCTACTTACAGGACTCAACATACTAGTCACAGCCCTATACTCCCTCTACATATTTACCACAACACAATGGGGCTCACTCACCCACCACATTAACAACATAAAACCCTCATTCACACGAGAAAACACCCTCATGTTCATACACCTATCCCCCATTCTCCTCCTATCCCTCAACCCCGACATCATTACCGGGTTTTCCTCTTGTAAATATAGTTTAACCAAAACATCAGATTGTGAATCTGACAACAGAGGCTTA-CGACCCCTTATTTACCGAGAAAGCT-CACAAGAACTGCTAACTCATGCCCCCATGTCTAACAACATGGCTTTCTCAACTTTTAAAGGATAACAGCTATCCATTGGTCTTAGGCCCCAAAAATTTTGGTGCAACTCCAAATAAAAGTAATAACCATGCACACTACTATAACCACCCTAACCCTGACTTCCCTAATTCCCCCCATCCTTACCACCCTCGTTAACCCTAACAAAAAAAACTCATACCCCCATTATGTAAAATCCATTGTCGCATCCACCTTTATTATCAGTCTCTTCCCCACAACAATATTCATGTGCCTAGACCAAGAAGTTATTATCTCGAACTGACACTGAGCCACAACCCAAACAACCCAGCTCTCCCTAAGCTT 12 | Pan AAGCTTCACCGGCGCAATTATCCTCATAATCGCCCACGGACTTACATCCTCATTATTATTCTGCCTAGCAAACTCAAATTATGAACGCACCCACAGTCGCATCATAATTCTCTCCCAAGGACTTCAAACTCTACTCCCACTAATAGCCTTTTGATGACTCCTAGCAAGCCTCGCTAACCTCGCCCTACCCCCTACCATTAATCTCCTAGGGGAACTCTCCGTGCTAGTAACCTCATTCTCCTGATCAAATACCACTCTCCTACTCACAGGATTCAACATACTAATCACAGCCCTGTACTCCCTCTACATGTTTACCACAACACAATGAGGCTCACTCACCCACCACATTAATAACATAAAGCCCTCATTCACACGAGAAAATACTCTCATATTTTTACACCTATCCCCCATCCTCCTTCTATCCCTCAATCCTGATATCATCACTGGATTCACCTCCTGTAAATATAGTTTAACCAAAACATCAGATTGTGAATCTGACAACAGAGGCTCA-CGACCCCTTATTTACCGAGAAAGCT-TATAAGAACTGCTAATTCATATCCCCATGCCTGACAACATGGCTTTCTCAACTTTTAAAGGATAACAGCCATCCGTTGGTCTTAGGCCCCAAAAATTTTGGTGCAACTCCAAATAAAAGTAATAACCATGTATACTACCATAACCACCTTAACCCTAACTCCCTTAATTCTCCCCATCCTCACCACCCTCATTAACCCTAACAAAAAAAACTCATATCCCCATTATGTGAAATCCATTATCGCGTCCACCTTTATCATTAGCCTTTTCCCCACAACAATATTCATATGCCTAGACCAAGAAGCTATTATCTCAAACTGGCACTGAGCAACAACCCAAACAACCCAGCTCTCCCTAAGCTT 13 | Gorilla AAGCTTCACCGGCGCAGTTGTTCTTATAATTGCCCACGGACTTACATCATCATTATTATTCTGCCTAGCAAACTCAAACTACGAACGAACCCACAGCCGCATCATAATTCTCTCTCAAGGACTCCAAACCCTACTCCCACTAATAGCCCTTTGATGACTTCTGGCAAGCCTCGCCAACCTCGCCTTACCCCCCACCATTAACCTACTAGGAGAGCTCTCCGTACTAGTAACCACATTCTCCTGATCAAACACCACCCTTTTACTTACAGGATCTAACATACTAATTACAGCCCTGTACTCCCTTTATATATTTACCACAACACAATGAGGCCCACTCACACACCACATCACCAACATAAAACCCTCATTTACACGAGAAAACATCCTCATATTCATGCACCTATCCCCCATCCTCCTCCTATCCCTCAACCCCGATATTATCACCGGGTTCACCTCCTGTAAATATAGTTTAACCAAAACATCAGATTGTGAATCTGATAACAGAGGCTCA-CAACCCCTTATTTACCGAGAAAGCT-CGTAAGAGCTGCTAACTCATACCCCCGTGCTTGACAACATGGCTTTCTCAACTTTTAAAGGATAACAGCTATCCATTGGTCTTAGGACCCAAAAATTTTGGTGCAACTCCAAATAAAAGTAATAACTATGTACGCTACCATAACCACCTTAGCCCTAACTTCCTTAATTCCCCCTATCCTTACCACCTTCATCAATCCTAACAAAAAAAGCTCATACCCCCATTACGTAAAATCTATCGTCGCATCCACCTTTATCATCAGCCTCTTCCCCACAACAATATTTCTATGCCTAGACCAAGAAGCTATTATCTCAAGCTGACACTGAGCAACAACCCAAACAATTCAACTCTCCCTAAGCTT 14 | Pongo AAGCTTCACCGGCGCAACCACCCTCATGATTGCCCATGGACTCACATCCTCCCTACTGTTCTGCCTAGCAAACTCAAACTACGAACGAACCCACAGCCGCATCATAATCCTCTCTCAAGGCCTTCAAACTCTACTCCCCCTAATAGCCCTCTGATGACTTCTAGCAAGCCTCACTAACCTTGCCCTACCACCCACCATCAACCTTCTAGGAGAACTCTCCGTACTAATAGCCATATTCTCTTGATCTAACATCACCATCCTACTAACAGGACTCAACATACTAATCACAACCCTATACTCTCTCTATATATTCACCACAACACAACGAGGTACACCCACACACCACATCAACAACATAAAACCTTCTTTCACACGCGAAAATACCCTCATGCTCATACACCTATCCCCCATCCTCCTCTTATCCCTCAACCCCAGCATCATCGCTGGGTTCGCCTACTGTAAATATAGTTTAACCAAAACATTAGATTGTGAATCTAATAATAGGGCCCCA-CAACCCCTTATTTACCGAGAAAGCT-CACAAGAACTGCTAACTCTCACT-CCATGTGTGACAACATGGCTTTCTCAGCTTTTAAAGGATAACAGCTATCCCTTGGTCTTAGGATCCAAAAATTTTGGTGCAACTCCAAATAAAAGTAACAGCCATGTTTACCACCATAACTGCCCTCACCTTAACTTCCCTAATCCCCCCCATTACCGCTACCCTCATTAACCCCAACAAAAAAAACCCATACCCCCACTATGTAAAAACGGCCATCGCATCCGCCTTTACTATCAGCCTTATCCCAACAACAATATTTATCTGCCTAGGACAAGAAACCATCGTCACAAACTGATGCTGAACAACCACCCAGACACTACAACTCTCACTAAGCTT 15 | Hylobates AAGCTTTACAGGTGCAACCGTCCTCATAATCGCCCACGGACTAACCTCTTCCCTGCTATTCTGCCTTGCAAACTCAAACTACGAACGAACTCACAGCCGCATCATAATCCTATCTCGAGGGCTCCAAGCCTTACTCCCACTGATAGCCTTCTGATGACTCGCAGCAAGCCTCGCTAACCTCGCCCTACCCCCCACTATTAACCTCCTAGGTGAACTCTTCGTACTAATGGCCTCCTTCTCCTGGGCAAACACTACTATTACACTCACCGGGCTCAACGTACTAATCACGGCCCTATACTCCCTTTACATATTTATCATAACACAACGAGGCACACTTACACACCACATTAAAAACATAAAACCCTCACTCACACGAGAAAACATATTAATACTTATGCACCTCTTCCCCCTCCTCCTCCTAACCCTCAACCCTAACATCATTACTGGCTTTACTCCCTGTAAACATAGTTTAATCAAAACATTAGATTGTGAATCTAACAATAGAGGCTCG-AAACCTCTTGCTTACCGAGAAAGCC-CACAAGAACTGCTAACTCACTATCCCATGTATGACAACATGGCTTTCTCAACTTTTAAAGGATAACAGCTATCCATTGGTCTTAGGACCCAAAAATTTTGGTGCAACTCCAAATAAAAGTAATAGCAATGTACACCACCATAGCCATTCTAACGCTAACCTCCCTAATTCCCCCCATTACAGCCACCCTTATTAACCCCAATAAAAAGAACTTATACCCGCACTACGTAAAAATGACCATTGCCTCTACCTTTATAATCAGCCTATTTCCCACAATAATATTCATGTGCACAGACCAAGAAACCATTATTTCAAACTGACACTGAACTGCAACCCAAACGCTAGAACTCTCCCTAAGCTT 16 | Macaca_fuscata AAGCTTTTCCGGCGCAACCATCCTTATGATCGCTCACGGACTCACCTCTTCCATATATTTCTGCCTAGCCAATTCAAACTATGAACGCACTCACAACCGTACCATACTACTGTCCCGAGGACTTCAAATCCTACTTCCACTAACAGCCTTTTGATGATTAACAGCAAGCCTTACTAACCTTGCCCTACCCCCCACTATCAATCTACTAGGTGAACTCTTTGTAATCGCAACCTCATTCTCCTGATCCCATATCACCATTATGCTAACAGGACTTAACATATTAATTACGGCCCTCTACTCTCTCCACATATTCACTACAACACAACGAGGAACACTCACACATCACATAATCAACATAAAGCCCCCCTTCACACGAGAAAACACATTAATATTCATACACCTCGCTCCAATTATCCTTCTATCCCTCAACCCCAACATCATCCTGGGGTTTACCTCCTGTAGATATAGTTTAACTAAAACACTAGATTGTGAATCTAACCATAGAGACTCA-CCACCTCTTATTTACCGAGAAAACT-CGCAAGGACTGCTAACCCATGTACCCGTACCTAAAATTACGGTTTTCTCAACTTTTAAAGGATAACAGCTATCCATTGACCTTAGGAGTCAAAAACATTGGTGCAACTCCAAATAAAAGTAATAATCATGCACACCCCCATCATTATAACAACCCTTATCTCCCTAACTCTCCCAATTTTTGCCACCCTCATCAACCCTTACAAAAAACGTCCATACCCAGATTACGTAAAAACAACCGTAATATATGCTTTCATCATCAGCCTCCCCTCAACAACTTTATTCATCTTCTCAAACCAAGAAACAACCATTTGGAGCTGACATTGAATAATGACCCAAACACTAGACCTAACGCTAAGCTT 17 | M_mulatta AAGCTTTTCTGGCGCAACCATCCTCATGATTGCTCACGGACTCACCTCTTCCATATATTTCTGCCTAGCCAATTCAAACTATGAACGCACTCACAACCGTACCATACTACTGTCCCGGGGACTTCAAATCCTACTTCCACTAACAGCTTTCTGATGATTAACAGCAAGCCTTACTAACCTTGCCCTACCCCCCACTATCAACCTACTAGGTGAACTCTTTGTAATCGCGACCTCATTCTCCTGGTCCCATATCACCATTATATTAACAGGATTTAACATACTAATTACGGCCCTCTACTCCCTCCACATATTCACCACAACACAACGAGGAGCACTCACACATCACATAATCAACATAAAACCCCCCTTCACACGAGAAAACATATTAATATTCATACACCTCGCTCCAATCATCCTCCTATCTCTCAACCCCAACATCATCCTGGGGTTTACTTCCTGTAGATATAGTTTAACTAAAACATTAGATTGTGAATCTAACCATAGAGACTTA-CCACCTCTTATTTACCGAGAAAACT-CGCGAGGACTGCTAACCCATGTATCCGTACCTAAAATTACGGTTTTCTCAACTTTTAAAGGATAACAGCTATCCATTGACCTTAGGAGTCAAAAATATTGGTGCAACTCCAAATAAAAGTAATAATCATGCACACCCCTATCATAATAACAACCCTTATCTCCCTAACTCTCCCAATTTTTGCCACCCTCATCAACCCTTACAAAAAACGTCCATACCCAGATTACGTAAAAACAACCGTAATATATGCTTTCATCATCAGCCTCCCCTCAACAACTTTATTCATCTTCTCAAACCAAGAAACAACCATTTGAAGCTGACATTGAATAATAACCCAAACACTAGACCTAACACTAAGCTT 18 | M_fascicularis AAGCTTCTCCGGCGCAACCACCCTTATAATCGCCCACGGGCTCACCTCTTCCATGTATTTCTGCTTGGCCAATTCAAACTATGAGCGCACTCATAACCGTACCATACTACTATCCCGAGGACTTCAAATTCTACTTCCATTGACAGCCTTCTGATGACTCACAGCAAGCCTTACTAACCTTGCCCTACCCCCCACTATTAATCTACTAGGCGAACTCTTTGTAATCACAACTTCATTTTCCTGATCCCATATCACCATTGTGTTAACGGGCCTTAATATACTAATCACAGCCCTCTACTCTCTCCACATGTTCATTACAGTACAACGAGGAACACTCACACACCACATAATCAATATAAAACCCCCCTTCACACGAGAAAACATATTAATATTCATACACCTCGCTCCAATTATCCTTCTATCTCTCAACCCCAACATCATCCTGGGGTTTACCTCCTGTAAATATAGTTTAACTAAAACATTAGATTGTGAATCTAACTATAGAGGCCTA-CCACTTCTTATTTACCGAGAAAACT-CGCAAGGACTGCTAATCCATGCCTCCGTACTTAAAACTACGGTTTCCTCAACTTTTAAAGGATAACAGCTATCCATTGACCTTAGGAGTCAAAAACATTGGTGCAACTCCAAATAAAAGTAATAATCATGCACACCCCCATCATAATAACAACCCTCATCTCCCTGACCCTTCCAATTTTTGCCACCCTCACCAACCCCTATAAAAAACGTTCATACCCAGACTACGTAAAAACAACCGTAATATATGCTTTTATTACCAGTCTCCCCTCAACAACCCTATTCATCCTCTCAAACCAAGAAACAACCATTTGGAGTTGACATTGAATAACAACCCAAACATTAGACCTAACACTAAGCTT 19 | M_sylvanus AAGCTTCTCCGGTGCAACTATCCTTATAGTTGCCCATGGACTCACCTCTTCCATATACTTCTGCTTGGCCAACTCAAACTACGAACGCACCCACAGCCGCATCATACTACTATCCCGAGGACTCCAAATCCTACTCCCACTAACAGCCTTCTGATGATTCACAGCAAGCCTTACTAATCTTGCTCTACCCTCCACTATTAATCTACTGGGCGAACTCTTCGTAATCGCAACCTCATTTTCCTGATCCCACATCACCATCATACTAACAGGACTGAACATACTAATTACAGCCCTCTACTCTCTTCACATATTCACCACAACACAACGAGGAGCGCTCACACACCACATAATTAACATAAAACCACCTTTCACACGAGAAAACATATTAATACTCATACACCTCGCTCCAATTATTCTTCTATCTCTTAACCCCAACATCATTCTAGGATTTACTTCCTGTAAATATAGTTTAATTAAAACATTAGACTGTGAATCTAACTATAGAAGCTTA-CCACTTCTTATTTACCGAGAAAACT-TGCAAGGACCGCTAATCCACACCTCCGTACTTAAAACTACGGTTTTCTCAACTTTTAAAGGATAACAGCTATCCATTGGCCTTAGGAGTCAAAAATATTGGTGCAACTCCAAATAAAAGTAATAATCATGTATACCCCCATCATAATAACAACTCTCATCTCCCTAACTCTTCCAATTTTCGCTACCCTTATCAACCCCAACAAAAAACACCTATATCCAAACTACGTAAAAACAGCCGTAATATATGCTTTCATTACCAGCCTCTCTTCAACAACTTTATATATATTCTTAAACCAAGAAACAATCATCTGAAGCTGGCACTGAATAATAACCCAAACACTAAGCCTAACATTAAGCTT 20 | Saimiri_sciureus AAGCTTCACCGGCGCAATGATCCTAATAATCGCTCACGGGTTTACTTCGTCTATGCTATTCTGCCTAGCAAACTCAAATTACGAACGAATTCACAGCCGAACAATAACATTTACTCGAGGGCTCCAAACACTATTCCCGCTTATAGGCCTCTGATGACTCCTAGCAAATCTCGCTAACCTCGCCCTACCCACAGCTATTAATCTAGTAGGAGAATTACTCACAATCGTATCTTCCTTCTCTTGATCCAACTTTACTATTATATTCACAGGACTTAATATACTAATTACAGCACTCTACTCACTTCATATGTATGCCTCTACACAGCGAGGTCCACTTACATACAGCACCAGCAATATAAAACCAATATTTACACGAGAAAATACGCTAATATTTATACATATAACACCAATCCTCCTCCTTACCTTGAGCCCCAAGGTAATTATAGGACCCTCACCTTGTAATTATAGTTTAGCTAAAACATTAGATTGTGAATCTAATAATAGAAGAATA-TAACTTCTTAATTACCGAGAAAGTG-CGCAAGAACTGCTAATTCATGCTCCCAAGACTAACAACTTGGCTTCCTCAACTTTTAAAGGATAGTAGTTATCCATTGGTCTTAGGAGCCAAAAACATTGGTGCAACTCCAAATAAAAGTAATA---ATACACTTCTCCATCACTCTAATAACACTAATTAGCCTACTAGCGCCAATCCTAGCTACCCTCATTAACCCTAACAAAAGCACACTATACCCGTACTACGTAAAACTAGCCATCATCTACGCCCTCATTACCAGTACCTTATCTATAATATTCTTTATCCTTACAGGCCAAGAATCAATAATTTCAAACTGACACTGAATAACTATCCAAACCATCAAACTATCCCTAAGCTT 21 | ; 22 | end; 23 | 24 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | # -*- Autoconf -*- 2 | # Process this file with autoconf to produce a configure script. 3 | 4 | AC_PREREQ([2.69]) 5 | AC_INIT([MrBayes],[3.2.7a]) 6 | 7 | AC_CONFIG_AUX_DIR([autotools]) 8 | AC_CONFIG_MACRO_DIRS([autotools]) 9 | 10 | AC_REQUIRE_AUX_FILE([tap-driver.sh]) 11 | 12 | AM_INIT_AUTOMAKE([foreign]) 13 | AM_MAINTAINER_MODE 14 | 15 | AC_CONFIG_SRCDIR([src/bayes.c]) 16 | AC_CONFIG_HEADERS([src/config.h]) 17 | 18 | AC_CANONICAL_HOST 19 | AC_DEFINE_UNQUOTED([HOST_TYPE], ["$host"], [Host triplet]) 20 | AC_DEFINE_UNQUOTED([HOST_CPU], ["$host_cpu"], [Host CPU type]) 21 | 22 | # NB: DEFAULT CFLAGS: 23 | # Using --enable-debug sets CFLAGS to "-g" ($debug_cflags) 24 | # Not using --enable-debug sets CFLAGS to "-O3 -DNDEBUG" ($release_cflags) 25 | # "-std=c99 -pedantic" will always be added ($default_cflags) 26 | # 27 | # (warning flags are added by the AX_CFLAGS_WARN_ALL macro further down) 28 | 29 | debug_cflags="-g" 30 | release_cflags="-O3 -DNDEBUG" 31 | default_cflags="-std=c99 -pedantic" 32 | 33 | # Optional feature: debug 34 | 35 | AC_ARG_ENABLE([debug], 36 | [AS_HELP_STRING([--enable-debug], 37 | [Enable debugging @<:@default=no@:>@])], 38 | [enable_debug=$enableval], 39 | [enable_debug=no]) 40 | 41 | # Handle CFLAGS at once, before AX_PROG_CC_MPI further down. 42 | 43 | AS_IF([test "x$enable_debug" = "xyes"], 44 | [our_cflags="$debug_cflags"], 45 | [our_cflags="$release_cflags"]) 46 | 47 | # Use our_cflags, the default_cflags, 48 | # plus any CFLAGS given to us by the user. 49 | CFLAGS="$our_cflags $default_cflags $CFLAGS" 50 | 51 | # Optional features: SSE, AVX, FMA 52 | 53 | AC_ARG_ENABLE([sse], 54 | [AS_HELP_STRING([--enable-sse], 55 | [Enable use of code written using SSE (Streaming SIMD Extensions) 56 | @<:@default=yes@:>@ (if supported)])], 57 | [enable_sse=$enableval], 58 | [enable_sse=yes]) 59 | 60 | AC_ARG_ENABLE([avx], 61 | [AS_HELP_STRING([--enable-avx], 62 | [Enable use of code written using AVX (Advanced Vector Extensions) 63 | @<:@default=yes@:>@ (if supported)])], 64 | [enable_avx=$enableval], 65 | [enable_avx=yes]) 66 | 67 | AC_ARG_ENABLE([fma], 68 | [AS_HELP_STRING([--enable-fma], 69 | [Enable use of code written using FMA (Fused multiply-add SIMD Extensions) 70 | @<:@default=yes@:>@ (if supported)])], 71 | [enable_fma=$enableval], 72 | [enable_fma=yes]) 73 | 74 | # Optional feature: Enable/disable building of documentation under doc/ 75 | # (enabled by default) 76 | 77 | AC_ARG_ENABLE([doc], 78 | [AS_HELP_STRING([--enable-doc], 79 | [Enable building supplied documentation from sources in doc/ 80 | @<:@default=yes@:>@])], 81 | [enable_doc=$enableval], 82 | [enable_doc=yes]) 83 | 84 | # Optional external libraries: MPI, Readline, Beagle 85 | 86 | AC_ARG_WITH([mpi], 87 | [AS_HELP_STRING([--with-mpi], 88 | [Build with MPI parallelization support @<:@default=no@:>@])], 89 | [], 90 | [with_mpi=no]) 91 | 92 | AC_ARG_WITH([readline], 93 | [AS_HELP_STRING([--with-readline], 94 | [Build with the Readline library @<:@default=check@:>@])], 95 | [], 96 | [with_readline=check]) 97 | 98 | AC_ARG_WITH([beagle], 99 | [AS_HELP_STRING([--with-beagle[[=PATH]]], 100 | [Build with the Beagle library @<:@default=no@:>@. 101 | The PATH argument should be the prefix path where Beagle 102 | was installed, e.g. @S|@HOME/local, /opt/local etc. 103 | The paths /usr/local and /usr are checked if no path is specified.])], 104 | [], 105 | [with_beagle=no]) 106 | 107 | # Checks for programs. 108 | 109 | AC_PROG_INSTALL 110 | PKG_PROG_PKG_CONFIG 111 | 112 | AM_CONDITIONAL([BUILD_DOC], [test "$enable_doc" = "yes"]) 113 | AM_COND_IF([BUILD_DOC], [ 114 | 115 | # Test whether we can rebuild the documentation. 116 | # This does not affect the pre-built PDF documents unless these are deleted. 117 | AC_PATH_PROG(PDFLATEX, [pdflatex]) 118 | AC_PATH_PROG(BIBTEX, [bibtex]) 119 | AC_PATH_PROG(LATEXMK, [latexmk]) 120 | 121 | ]) dnl AM_COND_IF([BUILD_DOC]) 122 | 123 | AM_CONDITIONAL([HAVE_LATEX], [test -n "$PDFLATEX" && test -n "$BIBTEX"]) 124 | AM_COND_IF([BUILD_DOC], [ 125 | AM_COND_IF([HAVE_LATEX], [], 126 | [AC_MSG_WARN([pdflatex and/or bibtex is missing, documentation will not be rebuilt])]) 127 | ]) 128 | AM_CONDITIONAL([HAVE_LATEXMK], [test -n "$LATEXMK"]) 129 | 130 | # Determine if we can (and want) to use an MPI C compiler. 131 | AX_PROG_CC_MPI([test "x$with_mpi" != "xno"], 132 | [use_mpi=yes 133 | AC_DEFINE([MPI_ENABLED], [1], [Define if you want to enable MPI])], 134 | [use_mpi=no 135 | AS_IF([test "x$with_mpi" = "xyes"], 136 | [AC_MSG_ERROR([--with-mpi was given, but test for MPI failed]) 137 | ]) dnl AS_IF 138 | ]) dnl AX_PROG_CC_MPI 139 | TESTS_USE_MPI=$use_mpi 140 | AC_SUBST([TESTS_USE_MPI]) 141 | 142 | # Checks for libraries. 143 | AC_CHECK_LIB([m], [sqrt]) 144 | 145 | # Check for the Beagle library. 146 | 147 | # Strategy: Use AC_CHECK_LIB + AC_CHECK_HEADER to look for the library 148 | # and headers with the given prefix, or in /usr/local followed by /usr 149 | # if no prefix path was given, and if that fails use PKG_CHECK_MODULES 150 | # (and trust its result). 151 | 152 | # Note: We assume that Beagle's top-level include directory is located under 153 | # include/libhmsbeagle-1 and nowhere else. 154 | 155 | AS_IF([test "x$with_beagle" != "xno"], [ 156 | old_cppflags="$CPPFLAGS" 157 | old_ldflags="$LDFLAGS" 158 | old_ldlibs="$LDLIBS" 159 | 160 | beagle_pkg_name="hmsbeagle-1" 161 | beagle_subinc="include/lib$beagle_pkg_name" 162 | beagle_sublib="lib" 163 | 164 | AS_IF([test -n "$BEAGLE_CFLAGS" || test -n "$BEAGLE_LIBS"], 165 | [AC_MSG_NOTICE([Using the supplied values of BEAGLE_CFLAGS and BEAGLE_LIBS]) 166 | beagle_found="yes"], 167 | [AS_IF([test -d "$with_beagle"], 168 | [beagle_prefix_list="$with_beagle"], 169 | [beagle_prefix_list="/usr/local /usr"])]) 170 | 171 | for beagle_prefix in $beagle_prefix_list; do 172 | 173 | AC_MSG_NOTICE([Trying to locate Beagle ($beagle_pkg_name) in '$beagle_prefix']) 174 | 175 | CPPFLAGS="-I$beagle_prefix/$beagle_subinc" 176 | LDFLAGS="-L$beagle_prefix/$beagle_sublib -Wl,-rpath,$beagle_prefix/$beagle_sublib" 177 | LDLIBS="-lhmsbeagle" 178 | 179 | AC_CHECK_HEADER([libhmsbeagle/beagle.h], 180 | [AC_SUBST([BEAGLE_CFLAGS], [$CPPFLAGS])], []) 181 | AC_CHECK_LIB(hmsbeagle, beagleCreateInstance, 182 | [AC_SUBST([BEAGLE_LIBS], ["$LDFLAGS $LDLIBS"])], []) 183 | 184 | CPPFLAGS="$old_cppflags" 185 | LDFLAGS="$old_ldflags" 186 | LDLIBS="$old_ldlibs" 187 | 188 | AS_IF([test -n "$BEAGLE_CFLAGS" && test -n "$BEAGLE_LIBS"], 189 | [AC_MSG_NOTICE([Found Beagle in '$beagle_prefix']) 190 | beagle_found="yes"]) 191 | 192 | AS_IF([test "x$beagle_found" = "xyes"], [break], 193 | [AS_UNSET(BEAGLE_LIBS) 194 | AS_UNSET(BEAGLE_CFLAGS) 195 | AX_RESET_HEADERS_CACHE([libhmsbeagle_beagle_h])]) 196 | done 197 | 198 | AS_IF([test "x$beagle_found" != "xyes"], [ 199 | AC_MSG_WARN([Failed to locate Beagle, falling back on pkg-config]) 200 | 201 | PKG_CHECK_MODULES([BEAGLE], [$beagle_pkg_name], 202 | [AC_MSG_NOTICE([Found Beagle with pkg-config]) 203 | beagle_found="yes" 204 | # Augument the BEAGLE_LIBS value with -Wl,-rpath,... 205 | BEAGLE_LIBS="-Wl,-rpath,$(pkg-config --libs-only-L $beagle_pkg_name | sed 's/-L//') $BEAGLE_LIBS"], 206 | [beagle_found="no"]) 207 | ]) dnl AS_IF 208 | 209 | AS_IF([test "x$beagle_found" != "xyes"], 210 | [AS_IF([test "x$with_beagle" != "xcheck"], 211 | [AC_MSG_ERROR( 212 | [--with-beagle was given, but test for Beagle failed])] 213 | )], dnl AS_IF - ELSE 214 | [ 215 | AC_DEFINE([BEAGLE_ENABLED], [1], 216 | [Define if you want to enable Beagle]) 217 | # Test whether we should enable Beagle3 support. 218 | old_ldflags=$LDFLAGS 219 | LDFLAGS="$BEAGLE_LIBS" 220 | AC_CHECK_LIB(hmsbeagle, beagleSetCPUThreadCount, 221 | [AC_DEFINE([BEAGLE_V3_ENABLED], [1], 222 | [Define to enable Beagle v3.1 extensions]) 223 | BEAGLE_CFLAGS="$BEAGLE_CFLAGS -pthread"]) 224 | LDFLAGS=$old_ldflags 225 | AS_UNSET(old_ldflags) 226 | AC_MSG_NOTICE([Using BEAGLE_CFLAGS="$BEAGLE_CFLAGS"]) 227 | AC_MSG_NOTICE([Using BEAGLE_LIBS="$BEAGLE_LIBS"]) 228 | ]) 229 | ]) dnl AS_IF 230 | 231 | # Check for readline, but only if we don't have MPI, because apparently 232 | # it won't work. 233 | 234 | AS_IF([test "x$use_mpi" = "xno"], 235 | [AS_IF([test "x$with_readline" != "xno"], [AX_LIB_READLINE])], 236 | [AS_IF([test "x$with_readline" = "xyes"], 237 | [AC_MSG_WARN( 238 | [--with-readline was given, but MPI support requires 239 | readline to be disabled. Retry with --without-mpi if you 240 | *really* need readline support]) 241 | ]) dnl AS_IF 242 | ]) dnl AS_IF 243 | 244 | # Checks for header files. 245 | AC_CHECK_HEADERS([float.h limits.h memory.h stdlib.h string.h]) 246 | 247 | # Checks for typedefs, structures, and compiler characteristics. 248 | AC_CHECK_TYPE([long long]) 249 | AC_TYPE_SIZE_T 250 | AC_CHECK_HEADER_STDBOOL 251 | 252 | # Get compiler's vendor and version 253 | AX_COMPILER_VENDOR 254 | AX_COMPILER_VERSION 255 | 256 | AC_DEFINE_UNQUOTED([COMPILER_VENDOR], 257 | ["$ax_cv_c_compiler_vendor"], [Compiler vendor]) 258 | AC_DEFINE_UNQUOTED([COMPILER_VERSION], 259 | ["$ax_cv_c_compiler_version"], [Compiler version]) 260 | 261 | # Add warning flags to compile command line. 262 | AX_CFLAGS_WARN_ALL 263 | 264 | # Check for SIMD (etc.) extensions supported by hardware and compiler. 265 | AX_EXT 266 | 267 | # Act on the above tests (which sets the "ax_cv_support_*_ext" 268 | # variables), and add appropriate flags to CFLAGS, or define 269 | # DISABLE_SSE, DISABLE_AVX, DISABLE_FMA if the extensions are not 270 | # supported or disabled by the user. 271 | AS_IF([test "x$enable_sse" = "xno" || test "x$ax_cv_support_sse2_ext" != "xyes"], 272 | [AC_DEFINE([DISABLE_SSE], [1], [SSE code path should not be compiled.])], 273 | [CFLAGS="$CFLAGS -msse"]) 274 | AS_IF([test "x$enable_avx" = "xno" || test "x$ax_cv_support_avx_ext" != "xyes"], 275 | [AC_DEFINE([DISABLE_AVX], [1], [AVX code path should not be compiled.])], 276 | [CFLAGS="$CFLAGS -mavx"]) 277 | AS_IF([test "x$enable_fma" = "xno" || test "x$ax_cv_support_fma3_ext" != "xyes"], 278 | [AC_DEFINE([DISABLE_FMA], [1], [FMA code path should not be compiled.])], 279 | [CFLAGS="$CFLAGS -mfma"]) 280 | 281 | # Checks for library functions. 282 | AC_CHECK_FUNCS([floor memset pow sqrt strchr]) 283 | 284 | AC_CONFIG_FILES([Makefile 285 | doc/Makefile 286 | doc/SMME_paper/Makefile 287 | doc/manual/Makefile 288 | examples/Makefile 289 | src/Makefile 290 | testing/Makefile 291 | ]) 292 | AC_CONFIG_FILES([testing/runtests.sh], [chmod +x testing/runtests.sh]) 293 | AC_OUTPUT 294 | -------------------------------------------------------------------------------- /src/proposal.h: -------------------------------------------------------------------------------- 1 | #ifndef PROPOSAL_H_ 2 | #define PROPOSAL_H_ 3 | 4 | int Move_Aamodel (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 5 | int Move_AddBranch (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 6 | int Move_Adgamma (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 7 | int Move_AddDeleteCPPEvent (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 8 | int Move_Beta (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 9 | int Move_Beta_M (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 10 | int Move_BrLen (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 11 | int Move_BMcorr (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 12 | int Move_BMsigma (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 13 | int Move_ClockRate_M (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 14 | int Move_CPPEventPosition (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 15 | int Move_CPPRate (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 16 | int Move_CPPRateMultiplier_M (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 17 | int Move_CPPRateMultiplierRnd (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 18 | int Move_DelBranch (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 19 | int Move_Extinction (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 20 | int Move_ExtSPR (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 21 | int Move_ExtSPR1 (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 22 | int Move_ExtSPRClock (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 23 | int Move_ExtSPRClock_Fossil (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 24 | int Move_ExtSS (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 25 | int Move_ExtSSClock (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 26 | int Move_ExtTBR (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 27 | int Move_Fossilization (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 28 | int Move_GeneRate_Dir (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 29 | int Move_Growth_M (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 30 | int Move_IgrVar (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 31 | int Move_IgrBranchRate (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 32 | int Move_IlnVar (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 33 | int Move_IlnBranchRate (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 34 | int Move_Local (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 35 | int Move_LocalClock (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 36 | int Move_MixedVar (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 37 | int Move_MixedBranchRate (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 38 | int Move_MixtureRates (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 39 | int Move_MixtureRates_Slider (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 40 | int Move_NNI (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 41 | int Move_NNIClock (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 42 | int Move_NNI_Hetero (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 43 | int Move_NodeSlider (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 44 | int Move_NodeSliderClock (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 45 | int Move_Nu (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 46 | int Move_Omega (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 47 | int Move_Omega_M (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 48 | int Move_OmegaBeta_M (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 49 | int Move_OmegaCat (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 50 | int Move_OmegaGamma_M (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 51 | int Move_OmegaM3 (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 52 | int Move_OmegaNeu (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 53 | int Move_OmegaPos (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 54 | int Move_OmegaPur (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 55 | int Move_ParsEraser1 (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 56 | int Move_ParsSPR (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 57 | int Move_ParsSPR1 (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 58 | int Move_ParsSPR2 (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 59 | int Move_ParsSPRClock (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 60 | int Move_ParsSPRClock_Fossil (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 61 | int Move_ParsTBR1 (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 62 | int Move_ParsTBR2 (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 63 | int Move_PopSize (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 64 | int Move_PosRealLognormal (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 65 | int Move_PosRealMultiplier (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 66 | int Move_PopSize_M (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 67 | int Move_Pinvar (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 68 | int Move_RateMult_Dir (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 69 | int Move_RateMult_Slider (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 70 | int Move_RateShape_M (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 71 | int Move_RealNormal (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 72 | int Move_RealSlider (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 73 | int Move_RelaxedClockModel (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 74 | int Move_Revmat_Dir (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 75 | int Move_Revmat_DirMix (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 76 | int Move_Revmat_Slider (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 77 | int Move_Revmat_SplitMerge1 (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 78 | int Move_Revmat_SplitMerge2 (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 79 | int Move_Speciation (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 80 | int Move_Speciation_M (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 81 | int Move_Statefreqs (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 82 | int Move_Statefreqs_Slider (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 83 | int Move_StatefreqsRoot (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 84 | int Move_StatefreqsRoot_Slider (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 85 | int Move_Statefreqs_SplitMerge (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 86 | int Move_StatefreqsSymDirMultistate (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 87 | int Move_SwitchRate (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 88 | int Move_SwitchRate_M (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 89 | int Move_TK02BranchRate (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 90 | int Move_Tratio_Dir (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 91 | int Move_TreeStretch (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 92 | int Move_TreeLen (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 93 | int Move_WNVar (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 94 | int Move_WNBranchRate (Param *param, int chain, RandLong *seed, MrBFlt *lnPriorRatio, MrBFlt *lnProposalRatio, MrBFlt *mvp); 95 | 96 | #endif /* PROPOSAL_H_ */ 97 | -------------------------------------------------------------------------------- /examples/avian_ovomucoids.nex: -------------------------------------------------------------------------------- 1 | #NEXUS 2 | 3 | [ Data from: Laskowski, M., Jr., and W.M. Fitch. 1989. Evolution of avian ovomucoids and of birds. 4 | Pp. 371-387 in B. Fernholm, K. Bremer, and H. Jornvall (eds.), The Hierarchy of Life. Elsevier Press, Amsterdam. ] 5 | 6 | begin data; 7 | dimensions ntax=89 nchar=88; 8 | format datatype=protein missing=? gap=- matchchar=.; 9 | 10 | matrix 11 | [ 10 20 30 40 50 60 70 80 ] 12 | [ . . . . . . . . ] 13 | Struthio_camelus VKYPNTNEEGKEVVLPKILSPIGSDGVYSNELANIEYTNVSK??????FAT--VDDYKPVPLDYMLDSKTSNKNNVVESSGTLRHFGK 14 | Rhea_americana .............L..E..N.V.T................?.D?????...--...H...S.E..........D.....N...S.... 15 | Pterocnemia_pennata .............L..E..N.V.A..................DHD?EV...--...H...S.E..........D.....N...S.... 16 | Casuarius_casuarius ........D....L.....N.........DD......A....DHDKEV...--..E....SPE.......N..DS....N...G.... 17 | Dromaius_novaehollandiae ........D....L.....N..........D......A..??D?????...--.......S.E.......N..D.....N...G.... 18 | Nothoprocta_cinerascens .....A.D.....P...TP...A.NA.FGS....V....I..DHDK?????T-..G...AT.E.F..NQ.A..A....KNV....L.. 19 | Eudromia_elegans .R.....D.....P...TP..V.AN....S....V....I?.?????????S-I.G...AT.EFF..NQ....A.A..KNV..N.I.E 20 | Pygoscelis_adeliae_f .TF..........LVT.......T..................DHDKEVI..--.......S.E..............D.N...S.... 21 | Pygoscelis_adeliae_y .T...........LVT.......T..................DHDKEVI..--.......S.E..............D.N...S.... 22 | Spheniscus_humboldti .T.S.........LIT.......T..................D?DKEVI..--I......S.E..............D.N.I.S.... 23 | Phalacrocorax_sulcirostris .S.SK.......ALVT.......T..............KI..DHDKEVI..--.......S.E.............AD.N...S.... 24 | Anhinga_novaehollandeae .L.S.........LVT.......T................T.DHDKEVI.S--.......S.E..............D.N...S.... 25 | Nycticorax_nycticorax .T.S.A....R..LVT.......A..........M....I..DHDGEVIV.--.......SPEN.V.......D..AD.N...S.... 26 | Chauna_chavaria .R...........L.T.T.....T..................DRDKEAV..--......AT.E....NQ....S...D.N...S.... 27 | Anseranas_semipalmata .R...S.......L.T.D...................A....DHDKEAV..--..E...AT.E....NQ........D.N...S.... 28 | Dendrocygna_arcuata .RF..........L.T.E...V.................I..D?DKEAV..--......AT.E....N..G......D.N...S.... 29 | Dendrocygna_autumnalis .RF..........L.T.D.....................I..DHDKEAV..--......AT.E....N..G......D.N...S.... 30 | Dendrocygna_eytoni_d .RF..........L.T.DVI.V............L....I..DHDKEAV..--....R.DT.E....N..G......D.N...S.... 31 | Dendrocygna_eytoni_e .RF..........L.T.DVI.V............L....I..DHDKEAV..--..E.R.DT.E....N..G......D.N...S.... 32 | Dendrocygna_viduata .RFS.........L.T.E...V.................I..D?D?EAV..--......AT.E....N..G.R....D.N...S.... 33 | Coscoroba_coscoroba ..F..........L.T.D.I...T...............I..DHDKEAV..--..G...ATME....N..G......D.N...S.... 34 | Cygnus_atratus .RF..........L.T.D.....T...............I..DHDKEAV..--......ATME....N..G......D.N...S.... 35 | Goose .RF..........L.T.D.....T...............I..DHDKEAV..--......ATVE....N..D......D.N...S.... 36 | Anser_indicus .RF..........L.T.D.A...T...............I..DHDKEAV..--......ATVE....N..D......D.N...S.... 37 | Branta_canadensis .RF.......R..L.T.D.....T...............I..DHD???V..--......ATVE....N..G......D.N...S.... 38 | Cereopsis_novaehollandiae ..F..........L...DVI.T.T...............I..D?D??AV..--......ARME....N..G......D.N...S.... 39 | Chloephaga_picta .RF..........L.T.E.....T...............I..D??KEAV..--..G...ATME....N..G......D.N...S...E 40 | Duck .RF..........L.T.E...V.T...............I..DHDKEAV..--..G...ATME....N..G......D.N...S...E 41 | Anas_platyrhynchos .RF........D.L.T.E...V.T...............I..DHDKEAV..--..G...ATME....N..G......D.N...S...E 42 | Megapodius_freycinet .R...........LVTQDV?...T....?....G...??I????????LV.--......ST.EDK..NQ....S...D.N...S.... 43 | Leipoa_ocellata IRH..........LVTEDS....T...............I..E?DK??VV.--..G.THAT.ELK..NQ....G..AQ.N...S.... 44 | Ortalis_vetula ...........D.LA.EDPNL.......T-.......???????????..PN-...H..ALQEQKI.N..D..S...D.N...S.... 45 | Penelope_jacquacu ...........D.LA.EDP.........T-.........I..ERDKEA..PN-...H..ALQEQK..N..D..S...D.N...S.... 46 | Penelope_superciliaris ...........D.LVAEDP....................I..E?DKEA..PN-...H..ALQEQK..N..D..S...D.N...S.... 47 | Bonasa_umbellus .RF........V.LV.EDPR...T.A.....M.......I..EHD???L.AS-..E...ATME.R..N..G........N.N.S...T 48 | Tympanuchus_cupido .RF........D.LVTED.H...T...............I..EHD???L.AS-..E...ATME.R..N..G........N...S.... 49 | Oreortyx_pictus .RF........D.LAT.E.H...T........S......I..EHDTEA..AS-..E...AT.E.R.....A........N...S.... 50 | Callipepla_squamata_n .RF........D.LAT.E.H...T........Y......I..EHD??A..AS-..E...DT.E.R..N..A........N...S.... 51 | Callipepla_squamata_s .RF........D.LAT.E.H...T........Y......I..EHD??A..AS-..E...DT.E.R..N..AS.......N...S.... 52 | Lophortyx_californicus .RF........D.LVT.E.Q...T........Y......I..EHD?EA..AS-..E...AT.E.R..N..A........N...S.... 53 | Colinus_virginianus .RF........D.LATEE.H...T....MS.MF......T..EHDTEA..AS-..E...AMSE.R..N..V........N...S.... 54 | Cyrtonyx_montezumae_l .RF........D.LVTEEV....T........S..A.?.I.?E?D???..AS-..E...AT.E.VI.N..G........N...S.... 55 | Cyrtonyx_montezumae_s .RF........D.LVTEEV....T........S..A.?.I.?E?D???..AS-..E...ATSE.VI.N..G........N...S.... 56 | Alectoris_chukar ARF..A.....D..VTED.R...T....T-.........I..EHDGETL.A--..E...AT.E.R.....G........N...S.... 57 | Alectoris_rufa ARF..A.....D..VTED.H...T....T-.........I..EHD???L.A--..E...AT.E.R.....G........N...S.... 58 | Francolinus_afer .RF..A....RD..VSEN.R...TH........SM....I..EHDREAP.AS-..E...ATME.RV.NI.G......K.N...S.... 59 | Francolinus_erckelii .RF..A.....D.AVSEN.R...T...N-.....M....I??EHD?EAP.AS-..E...ATME.RV.NI.G......K.N...S.K.. 60 | Francolinus_coqui_v .RF..A....RD..VSEN.R...T.........SMN...I..E?D?EA???S-..E...GTME.RV.NI.G......K.N...S.... 61 | Francolinus_coqui_a .RF..A....RD.AVSEN.R...T.........SMN...I..E?D?EA???S-..E...GTME.RV.NI.G......K.N...S.... 62 | Francolinus_francolinus_a ARF........V.LDS.D.I...T..LHDS..S...H.KIK.EHDRE????S-..G...ETAEET..N..R........N........ 63 | Francolinus_francolinus_v .RF........V.LDS.D.I...T..LHDS..S...H.KIK.EHDRE????S-..G...ETAEET..N..R........N........ 64 | Francolinus_pondicerianus ARFS.A.....D.LVIDDPR.M.T....DS..F.M....I..EHD???LPAS-..E...DTTEER..N..G........N...S.... 65 | Perdix_perdix .RF........D.LVTED.Q...T...............I..EHT???L.AS-..E...ATME.R..N..G..D.....N...N.... 66 | Coturnix_delegorguei .RF........DE.V.DE.RF..T....NH.MF.K....I..EQDGET???S-..E...A.K..RV.N..G........N...NR... 67 | Coturnix_coturnix_japonica_1 .RF........DE.V.DE.RL..T....NH.MF.K....I..EQDGETL.AS-..E...A.K..RV.N...........N...N.... 68 | Coturnix_coturnix_japonica_2 .RF........DE.V.DE.RL..T....NH.MF.K....I..EQDGETL.AS-..E...A.K..RV.N..G........N...N.... 69 | Arborophilia_torqueola .RF..S.....V..VKEDPR...T.........H..T??I?.?????????S-....M.ATME.RV.N..G........N...S.... 70 | Bambusicola_thoracica ARF..A.....V.LDTQE.R...T.......MS......I.IK?DKE?L.AS-..E...ETAEERI.N..G........N....N... 71 | Tragopan_satyra .RF........D.LVTED.H...T...............I..GHDREAL.AS-..E...ATME.R..N..G........N...S.... 72 | Tragopan_temmincki .RF........D.LVTED.R...T...............I..GHD???L.AS-..E...ATME.R..N..G........N...S.... 73 | Lophophorus_impejanus .RF..A.....D.LVTED.R...T...............I..EHDREAL.AS-..E...ATME.R..N..G........N...S.... 74 | Crossoptilon_auritum .RF........D.LVAED.R...T...............I..ERDGEAL.AS-..E...ATME.R..N..G........N...S.... 75 | Lophura_edwardsi .RF........D.LVAED.R...T.......M.......I..ERDGEAL.AS-..E...ATME.R..N..G........N...S.... 76 | Lophura_ignita .RF........D.LVGEDIR...T.......M.......N..ERDGEAL.AS-..E...ATME.R..N.SD........N...S.... 77 | Gallus_gallus ARF..ADK...D.LVN.D.R...T....T.D..S..F..I..EHDKETL.AS-..E...DTAEDR..N..G........N...S.... 78 | Grey_jungle_fowl ARF..ADK...D.LVN.D.R...T....T.D..S..F..I..EHDKETL.AS-..E...DTVEDR..N..G........N...S.... 79 | Phasianus_colchicus .RF..........LVAED.R.V.T.....S.........I..EHEGEAL.AS-..E...ATME.R..N..G........N...NR..Q 80 | Syrmaticus_ellioti .RF..K.....D.LVAED.H...T...............I..ER?G??L.AS-..E...ATME.R..N..G........N...S.... 81 | Syrmaticus_reevesii .RF..K.......LVAED.H...T.....S.........I..ERNGEAL.AS-..E...ATME.R..N..G........N...SR..E 82 | Chrysolophus_amherstiae .RFL.....S.D-LVAED.H...T...............I..EHDG?AL.AS-..E...ATME.R..N..G........N...N.... 83 | Polyplectron_bicalcaratum .RF....K...D.LA.EEVR...T.....D.S..RD...I..EHDR?????S-..E.Q.TTTEHRVNNE.G......K.N..VS.... 84 | Argusianus_argus_argus .RF........D.LVSEDRH...T.....H..T......I..EHD?EAL.A--..EH..AT.EDR..N.I...D..L..N...S.... 85 | Pavo_cristatus .RF..A.....D.LVSED.H...T.....H.........I..EHDREAL.AS-..E...AT.EHR..N..G........N...S.... 86 | Afropavo_congensis .RF........D.SAS.D.R...T.....H.........I..EHDGEAL.AS-..E...ATMEQR..N..G........N...S.... 87 | Numida_meleagris .RF..A.....D.LVTED.R...T......D........I.?????EAL.A--..E...ATME.R..N..D........N...S.... 88 | Acryllium_vulturinum .RF..A.....D.LVIED.R...T......D........I..EHD???L.A--..E...ATME.R..N..D........N...S.... 89 | Meleagris_gallopavo .RF........D.LVTED.R...T...H.-.........I..EHDREAL.AS-..E...AT.E.R..N..G........N...S.... 90 | Grus_carunculatus .T...........LVT.......T..................DHDKEAT..--......AT.E..F...........D.N...S.... 91 | Anthropoides_virgo .T...........LVT.......T..................DHDKEVT..--......AT.E..F...........D.N...S.... 92 | Grus_vipio IT...........LVT.......T..................DHDKEAT..--......AT.E..F...........D.N...S.... 93 | Fulica_atra .T...........LVT.....V.TN......S..........DYDKEVT..--..G.Q.AS.E.VF.N.....D..AD.N...S.... 94 | Vanellus_spinosus .T...........LVT.......T..........L.......DYDKEVI..--......AS................D.N...S..E. 95 | Larus_rudibundus .T...........LAT.A...V....................DYDKEDI..--......AS................D.N...S..E. 96 | Turnix_sylvatica .RF........DT.AD.D.P.........-.M.......I..EHD??T???S-..E...GMMERL..N..ND.......N...N...E 97 | Gallirallus_australis .T.........V.LVT.NI..V.TN...T..S.I...S....DYD???T..??..G.QSA.Q..VF.N........AD.N...S.... 98 | Geococcyx_californianus .A...A......ALVTTARLH..T....G.....L.H..I..DYNKEVI.S--.N.....S.L....N..G.....AD.N...S.... 99 | Dacelo_novaeguineae .......D.....LVTE......T.R................EHDKEAI..-Q..EH..AT...RI.......D..MD.N...S.... 100 | Carpococcyx_renauldi .R...S......GLATT.R....T....G.....L....I..DYD???I..--.......T.ED...NI.H..Y..AH.N..FS.... 101 | Podargus_strigoides .T.......S...LVDEV.....T..........L.-..I..DRDK??I..--....Q..MG...............D.N...N.... 102 | ; 103 | end; 104 | 105 | [ 106 | begin mrbayes; 107 | [The following line will let the mcmc chain integrate 108 | over the ten fixed amino-acid rate matrices. You can also fix 109 | the rates to those in one of the rate matrices.] 110 | prset aamodelpr=mixed; 111 | end; 112 | ] 113 | 114 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | MrBayes 3.2.7a 2 | 3 | This document describes how to install the most recent release of 4 | MrBayes using Homebrew on macOS, Linux, or on Window subsystem for 5 | Linux (WSL). It also describes how to build the development sources of 6 | MrBayes from the GitHub repository sources. 7 | 8 | 9 | ======================================================================== 10 | Installing MrBayes on macOS using Homebrew 11 | ------------------------------------------------------------------------ 12 | 13 | MrBayes is available for macOS through the Homebrew package manager. 14 | See https://brew.sh/ for general information about Homebrew and for 15 | Homebrew installation instructions. 16 | 17 | On a macOS system with Homebrew, MrBayes may be installed through the 18 | following two commands in a terminal: 19 | 20 | brew tap brewsci/bio 21 | brew install mrbayes 22 | 23 | The first command adds the "brewsci/bio" repository to your Homebrew 24 | system. This is a Homebrew repository that contains various software 25 | related to bioinformatics. Once the repository is available, you install 26 | MrBayes with the second command above. 27 | 28 | This will install MrBayes with support for the Beagle library. If you 29 | need additional MPI support, use 30 | 31 | brew install mrbayes --with-open-mpi 32 | 33 | This will likely download the neccesary Homebrew packages for building 34 | MrBayes with MPI support and then proceed to automatically build and 35 | install it on your macOS system (this may take a bit of time). 36 | 37 | 38 | ======================================================================== 39 | Installing MrBayes on Linux or WSL using Homebrew ("Linuxbrew") 40 | ------------------------------------------------------------------------ 41 | 42 | The instructions for installing MrBayes on Linux systems are identical 43 | to those for installing MrBayes on macOS. It relies on Homebrow 44 | being available on the Linux system where it's being installed. 45 | Installing Homebrew on Linux is a matter of following the instructions 46 | at https://docs.brew.sh/Homebrew-on-Linux 47 | 48 | We have found that the pre-compiled binaries may not work on all systems 49 | and that you may get an "Illegal instruction (core dumped)" error when 50 | you try starting MrBayes. In that case, install the MrBayes package 51 | from sources instead. This can still be done through Homebrew like 52 | this: 53 | 54 | brew reinstall -s mrbayes 55 | 56 | Likewise, you may possibly want to compile the Beagle library locally, 57 | 58 | brew reinstall -s beagle 59 | 60 | 61 | ======================================================================== 62 | Installing MrBayes from the GitHub sources on Unix 63 | ------------------------------------------------------------------------ 64 | 65 | Make a shallow clone of the MrBayes repository: 66 | 67 | git clone --depth=1 https://github.com/NBISweden/MrBayes.git 68 | 69 | (a shallow clone requires about 27 MB of disk space, a full clone 70 | requires about 77 MB) 71 | 72 | 73 | Building MrBayes using the supplied "configure" script: 74 | ------------------------------------------------------------------------ 75 | 76 | To build MrBayes, you will need a C compiler (gcc or clang works well), 77 | the "make" utility, and optionally the "pkg-config" utility. MrBayes 78 | may also be compiled with support for the Beagle library and for 79 | parallelization using MPI. 80 | 81 | The code in the MrBayes Git repository comes with a standard GNU 82 | "configure" script. On any Unix system, these are the steps required to 83 | compile and optionally install MrBayes: 84 | 85 | * Run "configure" in the top-level directory to create "Makefile" (see 86 | "./configure --help" for info about enabling and disabling features of 87 | MrBayes, or how to install in non-standard locations etc., and also 88 | read further down in this document): 89 | 90 | ./configure 91 | 92 | * Make (i.e. compile) the project: 93 | 94 | make 95 | 96 | Note that if "pdflatex" or "bibtex" could not be found by the 97 | "configure" script, the PDF documentation in doc/manual will not 98 | be rebuilt, even if the PDF documents are outdated or missing. 99 | 100 | * Install it on the system (optional). This will install 101 | the executable "mb" in /usr/local/bin, the documentation 102 | in /usr/local/share/doc/mrbayes, and the example files in 103 | /usr/local/share/examples/mrbayes unless the default installation 104 | prefix ("/usr/local") is changed with the "--prefix" option when 105 | running "configure". 106 | 107 | make install 108 | 109 | * We also support configuring and building the project away from the 110 | checked out source repository. This avoids littering the source 111 | repository checkout with temporary files. This is done through the 112 | following steps: 113 | 114 | 1. Create and enter a build directory somewhere (its name and location 115 | is arbitrary) 116 | 117 | mkdir build 118 | cd build 119 | 120 | 2. Call the "configure" script 121 | 122 | location-of-MrBayes-checkout/configure 123 | 124 | 3. Build and optionally install the project 125 | 126 | make 127 | make install 128 | 129 | 130 | Building MrBayes using the GNU autotools (Autoconf and Automake): 131 | ------------------------------------------------------------------------ 132 | 133 | MrBayes uses the GNU autotools, i.e. Automake and Autoconf, for its 134 | configuration and build system. If you tinker with "configure.ac" 135 | and/or any of the "Makefile.am" files and then want to regenerate the 136 | "configure" script and associated files, there are some prerequisites 137 | that need to be in place: 138 | 139 | * Make sure Automake 1.15 (http://www.gnu.org/software/automake/) 140 | is installed. 141 | 142 | * Make sure Autoconf 2.69 (http://www.gnu.org/software/autoconf/) 143 | is installed. 144 | 145 | The "configure.ac" script uses the "pkg-config" tool for detection 146 | of external libraries (Beagle) and also uses m4 macros from the 147 | autoconf-archive collection for detection of MPI, Readline, and some 148 | architecture-dependent compiler flags. Therefore, 149 | 150 | * Make sure pkg-config (https://www.freedesktop.org/wiki/Software/pkg-config/) 151 | is installed. 152 | 153 | * Make sure autoconf-archive 2016.03.20 (or later) 154 | (http://www.gnu.org/software/autoconf-archive/) is installed. 155 | 156 | * On some systems that uses metaauto for wrapping multiple versions of 157 | the GNU autotools (OpenBSD for example): 158 | 159 | export AUTOCONF_VERSION=2.69 160 | export AUTOMAKE_VERSION=1.15 161 | 162 | * On Ubuntu Linux, installing the following packages installs all of the 163 | above prerequisites: 164 | 165 | 1. automake 166 | 2. autoconf 167 | 3. pkg-config 168 | 4. autoconf-archive 169 | 170 | These may be installed through 171 | 172 | sudo apt install automake autoconf pkg-config autoconf-archive 173 | 174 | When all the prerequisites are in place: 175 | 176 | * Run "autoreconf" to generate the "configure" script: 177 | 178 | autoreconf -i 179 | 180 | * Then continue as outlined earlier in this document. 181 | 182 | 183 | Disabling the SSE, AVX and FMA code paths 184 | ------------------------------------------------------------------------ 185 | 186 | MrBayes will use SSE, AVX and FMA instructions to speed up computations 187 | on CPUs that support these instruction sets, if the compiler and build 188 | architecture supports it. These code paths are however optional, and 189 | if you suspect a bug in part of this code, you may use "--disable-sse", 190 | "--disable-avx" and/or "--disable-fma" to disable it when running the 191 | "configure" script. 192 | 193 | Note that disabling SSE will also disable AVX and FMA, and disabling AVX 194 | will also disable FMA. 195 | 196 | 197 | Picking up the Beagle library: 198 | ------------------------------------------------------------------------ 199 | 200 | If configured using "--with-beagle", MrBayes uses the Beagle library 201 | (https://github.com/beagle-dev/beagle-lib) if it is available. It will 202 | make use of release 3.1.2 of Beagle but should also work with release 203 | 2.1.3 of the library. 204 | 205 | If Beagle is installed in a non-default location, there are three ways 206 | of telling the "configure" script how to find it: 207 | 208 | * Use the flag "--with-beagle=PATH" where "PATH" is the prefix path 209 | where the Beagle headers and libraries may be found. For example 210 | "$HOME/local", "/opt" etc. The paths "/usr/local" and "/usr" are 211 | tested if no path is specified. 212 | 213 | * Point the "PKG_CONFIG_PATH" environment variable to the "pkgconfig" 214 | directory that Beagle installed its "hmsbeagle-1.pc" file into. This 215 | file is installed if Beagle was compiled from sources, and may be 216 | found in the installation's "lib" directory. The detection of Beagle 217 | will fall back on using "pkg-config" which picks up this file. 218 | 219 | * As a last resort, it's also possible to set the "BEAGLE_CFLAGS" and 220 | "BEAGLE_LIBS" environment variables prior to running "configure" (the 221 | example shows how to use these variables when Beagle was installed 222 | under the path "$HOME/local"): 223 | 224 | env BEAGLE_CFLAGS="-I$HOME/local/include/hmsbeagle-1" \ 225 | BEAGLE_LIBS="-L$HOME/local/lib -Wl,-rpath=$HOME/local/lib -lhmsbeagle" \ 226 | ./configure 227 | 228 | 229 | Building the Beagle library for MrBayes 230 | ------------------------------------------------------------------------ 231 | 232 | Ideally, you would use a pre-built distribution of the Beagle library, 233 | as setting up the required prerequisites for things like OpenCL etc. is 234 | a bit cumbersome to say the least. 235 | 236 | If you none the less want to try building and installing it, this is the 237 | executive summary for how to do this on a Unix system, not including 238 | installation of prerequisites (since these will differ between systems). 239 | It's assumed that the Beagle library is being installed in the default 240 | location, under "/usr/local". Note that the Beagle Java library is not 241 | needed by MrBayes. 242 | 243 | git clone --branch=v3.1.2 --depth=1 \ 244 | 'https://github.com/beagle-dev/beagle-lib.git' 245 | cd beagle-lib 246 | 247 | ./autogen.sh 248 | ./configure --without-jdk LDFLAGS=-Wl,-rpath=/usr/local/lib 249 | 250 | make 251 | sudo make install 252 | 253 | See also the "INSTALL" document supplied with the Beagle library's 254 | source distribution. 255 | 256 | 257 | Picking up and using MPI: 258 | ------------------------------------------------------------------------ 259 | 260 | The "configure" script will find any available MPI C compiler or 261 | compiler wrapper and use it (for example the one provided by OpenMPI 262 | (https://www.open-mpi.org/) or MPICH (https://www.mpich.org/)) if 263 | the "--with-mpi" flag is used. If this flag is not used, or if 264 | "--without-mpi" is used, MrBayes will be compiled without support for 265 | MPI parallelization. 266 | 267 | You may set the "MPICC" environment variable to the name or path of a 268 | specific MPI C compiler, if you have many to choose from: 269 | 270 | env MPICC="/usr/local/bin/mpicc" ./configure --with-mpi 271 | 272 | 273 | About support for the GNU Readline library: 274 | ------------------------------------------------------------------------ 275 | 276 | MrBayes will be compiled with support for the GNU Readline Library 277 | (https://cnswww.cns.cwru.edu/php/chet/readline/rltop.html) (which allows 278 | for command line history within an interactive session, and command 279 | completion through pressing the "tab" key) if the Readline library 280 | and its associated header files are available. However, it seems as 281 | if the Readline library doesn't work well together with common MPI 282 | implementations, such as OpenMPI (https://www.open-mpi.org/) and MPICH 283 | (https://www.mpich.org/), so if MrBayes is configured with support for 284 | MPI parallelization, Readline support will be automatically disabled. 285 | 286 | A possible workaround is to use a "Readline wrapper", such as "rlwrap" 287 | (https://github.com/hanslub42/rlwrap), which gives you persistent 288 | command line history between sessions, but no command tab-completion. 289 | To use rlwrap with an MPI-enabled MrBayes, simply start MrBayes like 290 | this: 291 | 292 | rlwrap mb 293 | 294 | 295 | # vim: filetype=text 296 | -------------------------------------------------------------------------------- /doc/SMME_paper/src/Huelsenbeck_Ronquist_SMME_2005.bib: -------------------------------------------------------------------------------- 1 | %% LaTeX2e file `Huelsenbeck_Ronquist_SMME_2005.bib' 2 | %% generated by the `filecontents' environment 3 | %% from source `Huelsenbeck_Ronquist_SMME_2005' on 2019/07/26. 4 | %% 5 | % # Citations used in `Huelsenbeck_Ronquist_SMME_2005.tex` (in order) 6 | % 1. Jukes and Cantor (1969) 7 | @InProceedings{jukes69, 8 | author = {T. H. Jukes and C. R. Cantor}, 9 | editor = {H. N. Munro}, 10 | title = {Evolution of protein molecules}, 11 | booktitle = {Mammalian {P}rotein {M}etabolism}, 12 | publisher = {Academic Press}, 13 | year = 1969, 14 | pages = {21--123} 15 | } 16 | % 2. (Kimura, 1980; 17 | @Article{kimura80, 18 | author = {M. Kimura}, 19 | title = {A simple method for estimating evolutionary rates of base substitutions through comparative studies of nucleotide sequences}, 20 | journal = {Journal of Molecular Evolution}, 21 | year = 1980, 22 | volume = 16, 23 | pages = {111--120} 24 | } 25 | % 3. Hasegawa et al., 1985) 26 | @Article{hasegawa85, 27 | author = {M. Hasegawa and H. Kishino and T. Yano}, 28 | title = {Dating the human-ape splitting by a molecular clock of mitochondrial {DNA}}, 29 | journal = {Journal of Molecular Evolution}, 30 | year = 1985, 31 | volume = 22, 32 | pages = {160--174} 33 | } 34 | % 4. (Yang, 1993) 35 | @Article{yang93, 36 | author = {Z. Yang}, 37 | title = {Maximum likelihood estimation of phylogeny from {DNA} sequences when substitution rates differ over sites}, 38 | journal = {Molecular Biology and Evolution}, 39 | year = 1993, 40 | volume = 10, 41 | pages = {1396--1401} 42 | } 43 | % 5. Goldman and Yang, 1994; 44 | @Article{goldman94, 45 | author = {N. Goldman and Z. Yang}, 46 | title = {A codon-based model of nucleotide substitution for protein-coding {DNA} sequences}, 47 | journal = {Molecular Biology and Evolution}, 48 | year = 1994, 49 | volume = 11, 50 | pages = {725--736} 51 | } 52 | % 6. Muse and Gaut, 1994 53 | @Article{muse94, 54 | author = {S. V. Muse and B. S. Gaut}, 55 | title = {A likelihood approach for comparing synonymous and nonsynonymous nucleotide substitution rates with application to the chloroplast genome}, 56 | journal = {Molecular Biology and Evolution}, 57 | year = 1994, 58 | volume = 11, 59 | pages = {715--724} 60 | } 61 | % 7. Tuffley and Steel, 1997 62 | @Article{tuffley97, 63 | author = {C. Tuffley and M. Steel}, 64 | title = {Links between maximum likelihood and maximum parsimony under a simple model of site substitution}, 65 | journal = {Bulletin of Mathematical Biology}, 66 | year = 1997, 67 | volume = 59, 68 | pages = {581--607} 69 | } 70 | % 8. Huelsenbeck and Ronquist, [YEAR]; (MrBayes) 71 | @Article{huelsenbeck01c, 72 | author = {J. P. Huelsenbeck and F. Ronquist}, 73 | title = {{MRBAYES}: {B}ayesian inference of phylogenetic trees}, 74 | journal = {Bioinformatics}, 75 | year = 2001, 76 | volume = 17, 77 | pages = {754--755} 78 | } 79 | % 9. Ronquist and Huelsenbeck, [YEAR]) (MrBayes) 80 | @Article{ronquist03, 81 | author = {F. Ronquist and J. P. Huelsenbeck}, 82 | title = {MrBayes 3: {B}ayesian phylogenetic inference under mixed models}, 83 | journal = {Bioinformatics}, 84 | year = 2003, 85 | volume = 19, 86 | pages = {1572--1574} 87 | } 88 | % 10. (Felsenstein, 1981) 89 | @Article{felsenstein81, 90 | author = {J. Felsenstein}, 91 | title = {Evolutionary trees from {DNA} sequences: {A} maximum likelihood approach}, 92 | journal = {Journal of Molecular Evolution}, 93 | year = 1981, 94 | volume = 17, 95 | pages = {368--376} 96 | } 97 | % 11. Nielsen and Yang (1998) 98 | @Article{nielsen98, 99 | author = {R. Nielsen and Z. Yang}, 100 | title = {Likelihood models for detecting positively selected amino acid sites and applications to the {HIV-1} envelope gene}, 101 | journal = {Genetics}, 102 | year = 1998, 103 | volume = 148, 104 | pages = {929--93} 105 | } 106 | % 12. Hasegawa et al. (1984; HKY 107 | @Article{hasegawa84, 108 | author = {M. Hasegawa and T. Yano and H. Kishino}, 109 | title = {A new molecular clock of mitochondrial {DNA} and the evolution of {H}ominoids}, 110 | journal = {Proc. Japan Acad. Ser. B}, 111 | year = 1984, 112 | volume = 60, 113 | pages = {95--98} 114 | } 115 | % 13. Hasegawa et al. (1985; HKY 116 | % 14. Felsenstein's (1981) 117 | % 15. Swofford, 2002 118 | @Book{swofford02, 119 | author = {D. L. Swofford}, 120 | title = {{PAUP*}: {P}hylogenetic {A}nalysis {U}sing {P}arsimony and {O}ther {M}ethods}, 121 | publisher = {Sinauer Associates, Inc.}, 122 | year = 2002, 123 | address = {Sunderland, Massachusetts} 124 | } 125 | % 16. The program MrBayes (Huelsenbeck and Ronquist, [year]; 126 | % 17. Ronquist and Huelsenbeck, [year]) 127 | % 18. Chapter [NUMBER] (Larget, [YEAR]) 128 | %%%%%%% MISSING 129 | % 19. Indeed, it has been known for at least a decade now that the interpretation of nonparametric bootstrap values on phylogenetic trees is problematic, for a variety of reasons summarized in [REFS] 130 | %%%%%%% MISSING 131 | % 20. Huelsenbeck and Rannala (In Press) 132 | %%%%%%% MISSING 133 | % 21. Suzuki and Nei ([YEAR]) 134 | %%%%%%% MISSING 135 | % 22. Huelsenbeck and Rannala (In Press) 136 | % 23. simulation studies that examine the performance of phylogenetic methods (see [REFS]) 137 | %%%%%%% MISSING 138 | % 24. Foster ([YEAR]) has relaxed the assumption that nucleotide frequencies are constant over time and 139 | %%%%%%% MISSING 140 | % 25. [PEOPLE] ([YEAR]) relaxed the assumption that the GC content is a constant over a phylogenetic tree 141 | %%%%%%% MISSING 142 | % 26. Cox test ([REF]) 143 | %%%%%%% MISSING 144 | % 27. Jeffreys (1961) 145 | % 28. Bayes factors can be used to choose among substitution models (Huelsenbeck et al., In Press) 146 | %%%%%%% MISSING 147 | % 29. Jukes-Cantor (1969) or 148 | % 30. Felsenstein (1981) model 149 | % 31. Kimura (1980), 150 | % 32. Hasegawa et al.\ (1984,), 151 | % 33. Hasegawa et al.\ 1985), 152 | % 34. Felsenstein (1984) 153 | %%%%%%% MISSING 154 | % 35. Larget (Chapter [NUMBER]) 155 | %%%%%%% 156 | % 36. (Jeffreys, 1961) 157 | @Book{jeffreys61, 158 | author = {H. Jeffreys}, 159 | title = {Theory of {P}robability}, 160 | publisher = {Oxford University Press}, 161 | year = 1961, 162 | address = {Oxford} 163 | } 164 | % 37. Tamura and Nei, 1993 165 | @Article{tamura93, 166 | author = {K. Tamura and M. Nei}, 167 | title = {Estimation of the number of nucleotide substitutions in the control region of mitochondrial DNA in humans and chimpanzees}, 168 | journal = {Molecular Biology and Evolution}, 169 | year = 1993, 170 | volume = 10, 171 | pages = {512--526} 172 | } 173 | % 38. Huelsenbeck et al. (In Press) 174 | %%%%%%% 175 | % 39. Kimura (1980) 176 | % 40. Modeltest (Posada and Crandall, [YEAR]) 177 | @article{posada98, 178 | author = {David Posada}, 179 | title = {Model{T}est: testing the model of {DNA} substitution}, 180 | journal = {Bioinformatics}, 181 | year = {1998}, 182 | volume = {14}, 183 | pages = {817--818} 184 | } 185 | % 41. Kim et al. (2003) 186 | %%%%%%% 187 | % 42. Lewis, (YEAR) (Mk) 188 | @Article{lewis01, 189 | author = {P. O. Lewis}, 190 | title = {A likelihood approach to estimating phylogeny from discrete morphological character data}, 191 | journal = {Systematic Biology}, 192 | year = 2001, 193 | volume = 50, 194 | pages = {913--925} 195 | } 196 | % 43. Kim et al. (2003) 197 | @Article{kim03, 198 | author = {S. Kim and K. M. Kjer and C. N. Duckett}, 199 | year = {2003}, 200 | title = {Comparison between molecular and morphological-based phylogenies of galerucine/alticine leaf beetles ({C}oleoptera: {C}hrysomelidae)}, 201 | journal = {Insect Systematics and Evolution}, 202 | volume = {34}, 203 | pages = {53--64}, 204 | } 205 | % 44. Kim et al. (2003) 206 | % 45. Kim et al. (2003) 207 | % 46. Kim et al. (2003) 208 | % 47. Sch\"oniger and von Haeseler (1994) 209 | @Article{schoniger94, 210 | author = {M. Sch{\"o}niger and A. von Haeseler}, 211 | title = {A stochastic model and the evolution of autocorrelated DNA sequences}, 212 | journal = {Molecular Phylogenetics and Evolution}, 213 | year = 1994, 214 | volume = 3, 215 | pages = {240--247} 216 | } 217 | % 48. Sch\"oniger and von Haeseler (1994) 218 | % 49. Goldman and Yang, 1994; 219 | % 50. Muse and Gaut, 1994 220 | % 51. Goldman and Yang 1994; 221 | % 52. Muse and Gaut 1994 222 | % 53. Nielsen and Yang (1998) 223 | % 54. program PAML (Yang, [YEAR]) 224 | %%%%%%% 225 | % 55. Huelsenbeck and Dyer, In Press 226 | @Article{huelsenbeck04c, 227 | author = {J. P. Huelsenbeck and K. Dyer}, 228 | title = {Bayesian estimation of positively selected sites}, 229 | journal = {Journal of Molecular Evolution}, 230 | year = 2004, 231 | volume = 58, 232 | pages = {661--672} 233 | } 234 | % 56. Poisson (Bishop and Friday, 1987), 235 | @Article{bishop85, 236 | author = {M. J. Bishop and A. E. Friday}, 237 | title = {Evolutionary trees form nucleic acid and protein sequences}, 238 | journal = {Proceedings of the Royal Society of London, B}, 239 | year = 1985, 240 | volume = 226, 241 | pages = {271--302} 242 | } 243 | % 57. Jones (Jones et al., 1992), 244 | @Article{jones92, 245 | author = {D. T. Jones and W. R. Taylor and J. M. Thornton}, 246 | title = {The rapid generation of mutation data matrices from protein sequences}, 247 | journal = {Computer Applications in the Biosciences (CABIOS)}, 248 | year = 1992, 249 | volume = 8, 250 | pages = {275--282} 251 | } 252 | % 58. Dayhoff (Dayhoff et al., 1978), 253 | @InProceedings{dayhoff78, 254 | author = {M. O. Dayhoff and R. M. Schwartz and B. C. Orcutt}, 255 | title = {A model of evolutionary change in proteins}, 256 | booktitle = {Atlas of protein sequence and structure, Volume 5, Supplement 3}, 257 | publisher = {National Biomedical Research Foundation}, 258 | year = 1978, 259 | pages = {345--352} 260 | } 261 | % 59. Mtrev (Adachi and Hasegawa. 1996), 262 | @Article{adachi96, 263 | author = {J. Adachi and M. Hasegawa}, 264 | title = {{MOLPHY Version 2.3}: {P}rograms for molecular phylogenetics based on maximum likelihood}, 265 | journal = {Computer Science Monographs}, 266 | year = 1996, 267 | volume = 28, 268 | pages = {1--150} 269 | } 270 | % 60. Mtmam (Cao et al., 1998), 271 | @Article{cao98, 272 | author = {Y. Cao and A. Janke and P. J. Waddell and M. Westerman and O. Takenaka and S. Murata and N. Okada and S. P\"a\"abo and M. Hasegawa}, 273 | title = {Conflict amongst individual mitochondrial proteins in resolving the phylogeny of eutherian orders}, 274 | journal = {Journal of Molecular Evoluton}, 275 | year = 1998, 276 | volume = 47, 277 | pages = {307--322} 278 | } 279 | % 61. WAG (Whelan and Goldman, 2001), 280 | @Article{whelan01, 281 | author = {S. Whelan and N. Goldman}, 282 | title = {A general empirical model of protein evolution derived from multiple protein familes using a maximum likelihood approach}, 283 | journal = {Molecular Biology and Evolution}, 284 | year = 2001, 285 | volume = 18, 286 | pages = {691--699} 287 | } 288 | % 62. Rtrev (Dimmic et al., 2002), 289 | @Article{dimmic02, 290 | author = {M. W. Dimmic and J. S. Rest and D. P. Mindell and D. Goldstein}, 291 | title = {{RA}rt{REV}: {A}n amino acid substitution matrix for inference of retrovirus and reverse transcriptase phylogeny}, 292 | journal = {Journal of Molecular Evolution}, 293 | year = 2002, 294 | volume = 55, 295 | pages = {65--73} 296 | } 297 | % 63. Cprev (Adachi et al., 2000), 298 | @Article{adachi00, 299 | author = {J. Adachi and P. Waddell and W. Martin and M. Hasegawa}, 300 | title = {Plastid genome phylogeny and a model of amino acid substitution for proteins encoded by chloroplast {DNA}}, 301 | journal = {Journal of Molecular Evolution}, 302 | year = 2000, 303 | volume = 50, 304 | pages = {348--358} 305 | } 306 | % 64. Blossum (Henikoff and Henikoff, 1992), and 307 | @Article{henikoff92, 308 | author = {S. Henikoff and J. G. Henikoff}, 309 | title = {Amino acid substitution matrices from protein blocks}, 310 | journal = {Proceedings of the National Academy of Science, U.S.A.}, 311 | year = 1992, 312 | volume = 89, 313 | pages = {10915--10919} 314 | } 315 | % 65. Vt (Muller and Vingron. 2000). 316 | @Article{muller00, 317 | author = {T. Muller and M. Vingron}, 318 | title = {Modeling amino acid replacement}, 319 | journal = {Journal of Computational Biology}, 320 | year = 2000, 321 | volume = 7, 322 | pages = {761--776} 323 | } 324 | % 66. The molecular clock hypothesis states that substitutions accumulate at roughly the same rate along different lineages of a phylogenetic tree ([REF]). 325 | %%%%%%% MISSING 326 | % 67. To date, two different models have been proposed for allowing rates to vary across the tree ([REFS]), 327 | %%%%%%% MISSING 328 | % 68. To date, two different models have been proposed for allowing rates to vary across the tree ([REFS]), 329 | % 69. Arnason} {\it et al}.\ 1997) 330 | %%%%%%% MISSING 331 | % 70. Nei et al. (2001) 332 | %%%%%%% MISSING 333 | % 71. Nei et al. (2001) 334 | % 72. Nei et al. (2001) 335 | % 73. Jones et al. (1992) 336 | % 74. Dayhoff et al., 1978; 337 | % 75. Whelan and Goldman, 2001 338 | % 76. Nei et al. (2001) 339 | % 77. Lee (1999) 340 | %%%%%%% MISSING 341 | % 78. Huelsenbeck and Ronquist, 2001; 342 | % 79. Ronquist and Huelsenbeck, 2003 343 | % 80. Kim et al. (2003) 344 | % 81. Nei et al. (2001) 345 | 346 | 347 | 348 | -------------------------------------------------------------------------------- /examples/hym.nex: -------------------------------------------------------------------------------- 1 | #NEXUS 2 | 3 | [ Truncated data from: Ronquist F, Klopfstein S, Vilhelmsen L, Schulmeister S, Murray DL, Rasnitsyn AP. 2012. A total-evidence approach to dating with fossils, applied to the early radiation of the Hymenoptera. Systematic Biology 61:973-999. ] 4 | [ Used in Zhang, C. 2017. Molecular Clock Dating using MrBayes. arXiv:1603.05707] 5 | [ Version: fre 3 jul 2020 14:59:27 Sign: JN] 6 | 7 | Begin data; 8 | Dimensions ntax=20 nchar=510; 9 | Format datatype=mixed(standard:1-200,DNA:201-510) interleave=yes gap=- missing=?; 10 | 11 | Matrix 12 | [Morphology, Vilhelmsen, 200 chars] 13 | Raphidioptera 0000000000 000011?001 ?000?00000 01-210?100 000000-000 10000-0??1 011000???1 -2-00?100? 00--000000 -0-0?1-000 ?2?0000??? 0-00?0--00 001?010100 0000100031 01001010?0 ???0011100 000000???? 011--100?? ??01000000 010-02000- 14 | Xyela 0010000100 0010000-00 0010111010 0001010000 0000010110 0001100010 0200000000 0100010000 0100011000 0000000100 0002100000 1000010000 00?0010000 0100100000 0000000100 0011100010 0000000000 1000000000 0000010200 001010000- 15 | Runaria 0010000010 0100000-00 002-001000 00010?0010 1110020110 1100100020 0210100100 110001000? 0???0??0?3 2102110??? 000?1??110 101?11?010 0000000000 1100000021 110?1??210 100110?120 1-11001000 1100000100 0000010210 00????0010 16 | Diprion 00100???0? ?010000-?0 ?100001??? ?00?00?010 110002?2?? ?100100030 0?102001?? 001000000? 010001?003 ?101?1100? ?0??1????? 10111121?? ?00?000000 ??00?0?000 ?1001012?? ?????11121 0-1101-000 1100000100 00000101?0 ?010?0100- 17 | Phylacteophaga 0010000000 0000000-00 0000001000 000110?010 1200021211 10001111-0 0210200111 100000000? 00--1?0003 2102110001 221210011? 1211112111 00?1000010 120010103- 1110101210 0110111021 0-0101-000 4101010100 10000101?0 0010101010 18 | Onycholyda 00110???0? ??110100?2 0000?22??? ?00101?100 010002?2?? ??01111011 021000?0?? 0100010000 0???0????3 ?100?10100 ?00?1????? 1?0??10000 ??0?01?000 ??00100000 ???0010??? ????100000 0001000000 1001000000 0000011200 0010111?1? 19 | Cephus 0011010020 0110011000 1000?01000 0001020000 0000120210 1001111010 0210021100 1101110000 0100010113 1100000110 1001100000 101100--00 0001110100 0200100011 1100120100 1011100021 0001100000 1101000100 00001101?0 0010100010 20 | Sirex 0111110020 0110010100 0000?01000 0003120111 00000202?1 1101110020 0200021100 110001101? 0???0??110 ?10001?120 0102100??? 1000010020 0001000100 0100110000 1000102100 0111100101 0101000000 1100010100 00000101?0 0021100011 21 | Orussus 1111110001 1110110112 1000101000 0012101110 2100120210 10111101-0 0201021100 1101221220 1---1?2022 021201-121 1002110111 1000010001 0011010010 0201100101 1111101210 0111101121 0-11200011 3101101111 10000101?1 202110000- 22 | Vespidae 00111100?1 011011?112 1000101102 ?011001110 2102121211 1011111011 0210221110 1101211221 0101132123 220011?121 2212110111 100000--01 0011011-10 120211013- 1111101211 1110112121 0101200000 4101010110 10012101?0 000-000011 23 | 24 | Asioxyela ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????10??? ?????????? ?????????? ?????????? ????????00 0000000000 1????????? ?????????? ?????????? 25 | Nigrimonticola 0????????? ????0????? ??10?1???? ????????00 ?????????? ?????????? ?????????? ??????000? ????????0? ?????00??? ????10???? 1????????? ?????????0 ?????????? ?????????? ????????0? 00?0?00000 ?????????0 ????01?2?? ?010???00? 26 | Xyelotoma 0????????? ????0????? ??10?0???? ????????10 ?????????? ?????????? ????2????? ??????000? ?????????? ?????01??? ?????????? ?2???1???? ?????????? ?????????? ?????????? ???????100 0-0?00???? 1?????0100 ??0?0????? ?????????? 27 | Undatoma ?????????? ?????????? ?????????? ????????10 ??100??2?? ?00?11001? ?????????? 01000?000? ??????0?0? ?????1-??? ?????????? 1????11??? ????????00 ?????????? ?????????? ????????21 1001001000 1?????01?0 0???0?0200 ?0???0???? 28 | Dahuratoma 0?1??????? ????0????? ??10?????? ????????00 ?????????? ?????????? ?????????? ??????000? ??????0??? ?????????? ?????????? ?0???11??? ?????????? ?????????? ?????????? ????????00 1-01001000 1?010?0100 000?0??100 ?0???????? 29 | Cleistogaster 0????????? ????0????? ??000????? ????????10 ?????????? ?????1???? ?????????? 1101??022? ??????2??? ?????01??? ?????????? 1????0--?? ???????011 ???2????3? ?????????? ????????21 0101200000 3?????1101 100?2?02-1 ?02?10?0?? 30 | Ghilarella 0????????? ?????????? ?????0???? ????????00 ?????????? ?????????? ?????????? ??????100? ?????????? ?????01??? ?????????? ?????1???? ????????00 ?????????? ?????????? ????????21 000100-100 1????????? 000?(0,1)?0??? ?0???????? 31 | Mesorussus 11???????? ?????1???? ??020(0,1)???? ?????????? 21???????? ?????1???? ?????????? ?????????? ?????????? ?????????? ?????????? 1????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? 32 | Prosyntexis 00???????? ?????????? ??00?????? ????????00 ???00????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? 1????????? ????????00 ?????????? ?????????? ????????21 000110-100 1?????11?? ?00?1??2-0 ?0??1????? 33 | Pseudoxyelocerus ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ?????????? ????????10 1001001000 1????????? ?????????? ?????????? 34 | 35 | [16S, 100 sites] 36 | Raphidioptera ATAATCATTTGTTTCTTAATTAGGGACTAGTATGAAGGATTGGACGAGATATTTTCTGTCTCAAATTTTATTTTTTAGTAAAAAAGCT-AAAATTTATTT 37 | Xyela ATAATCATTAGTCTTTTAATTGAGGGCTGGAATGAATGATTGAACGAAGTATTAACTGTCTCGAATTTAATTTTTGAGTTAAAAAGCT-TAAATTTTATT 38 | Runaria ATAATCATTAGTCTTTTAATTGAAGACTTGTATGAAGGATTGAATGAAATATATACTGTCTCGAATTTAATTTTTGAGTTAAAAAGCT-TAAATATTATT 39 | Diprion ATAATAATTTGTCCTCTAATTAAGGACTAGAATGAATGATTTGACGAAGTTAAAACTTTCTCGAAATTAATTTTTAAGTTAAAAAGCT-TAAATAATATT 40 | Phylacteophaga ATAATAATTAGTCTATTAATTGTAGGCTGGTATGAAAGATTGAACGAGGTAAATACTGTCTCGAATTTAATTTTTGAGTTAAAAAGCT-TAAATTTTATT 41 | Onycholyda ATAATCATTAGTCTTTTAATTAAGGTCTAGAATGAAGGATTGAACGAAGTAAAATCTGTCTCAAATTTAATATTTAAGTCAAAAAGCT-TAAATAAATTT 42 | Cephus ATAATCATTAGTTTTTTAATTGAAAGCTTGTATGAATGATTGAATAAAATATTTATTGTCTCAAATTTAATTTTTAAATTAAAAAGTT-TAAATTTTATT 43 | Sirex ATAATCAATTGTTTTTTAATTTAAATCTAGAATGAATGGTTTAACGAAATATTAACTGTCTCGAATTTAAATTTTTAGTAAAAATGCTGAAAATATATTT 44 | Orussus ATAATCAATAGTTCTTTAATTGGGAACTTGTATGAAGGATTGAACGAGATAGTAACTTTCTAGAATTTAATTTTTAGATTAAAAAGTC-TAAATTTAATT 45 | Vespidae ATAATCAATAGTTTTTTAATTGGAAACTGGAATGAAGGAGTGGATGAAATATAGATTGTCTCGAATTTAAATTAAAAGTAAAAATGCT-TTTATATAGTT 46 | 47 | Asioxyela ???????????????????????????????????????????????????????????????????????????????????????????????????? 48 | Nigrimonticola ???????????????????????????????????????????????????????????????????????????????????????????????????? 49 | Xyelotoma ???????????????????????????????????????????????????????????????????????????????????????????????????? 50 | Undatoma ???????????????????????????????????????????????????????????????????????????????????????????????????? 51 | Dahuratoma ???????????????????????????????????????????????????????????????????????????????????????????????????? 52 | Cleistogaster ???????????????????????????????????????????????????????????????????????????????????????????????????? 53 | Ghilarella ???????????????????????????????????????????????????????????????????????????????????????????????????? 54 | Mesorussus ???????????????????????????????????????????????????????????????????????????????????????????????????? 55 | Prosyntexis ???????????????????????????????????????????????????????????????????????????????????????????????????? 56 | Pseudoxyelocerus ???????????????????????????????????????????????????????????????????????????????????????????????????? 57 | 58 | [EF1aF2, 210 sites] 59 | Raphidioptera GCTGAGCGTGAGCGTGGTATCACTATAGATATCGCACTGTGGAAATTTGAAACTGCAAAATACTATGTCACTATAATTGATGCTCCGGGCCATCGTGATTTCATTAAGAACATGATTACGGGTACGTCCCAGGCCGATTRTGCTGTCTTGATAGTTGCGGCCGGCACAGGAGAATTCGAAGCTGGTATTTCAAAGAACGGACAAACTCGT 60 | Xyela GCTGAGCGYGARCGTGGTATCACCATCGACATTGCTCTGTGGAAGTTCGAGACCGCCAGGTACTACGTCACCATCATCGACGCCCCTGGCCACAGGGATTTCATCAAGAACATGATCACTGGTACCTCTCAGGCCGATTGCGCCGTACTTATCGTCGCTGCCGGTACTGGAGAATTTGAAGCCGGTATCTCCAAGAACGGACAGACCCGC 61 | Runaria GCCGAGCGTGAGCGTGGTATCACCATCGATATCGCCCTGTGGAAATTCGAGACGGCCAAATACTACGTGACGATCATCGACGCCCCGGGGCACAGAGATTTCATCAAGAACATGATCACCGGAACTTCGCAGGCCGATTGCGCCGTACTGATCGTCGCCGCAGGTACCGGAGAGTTCGAGGCCGGTATCTCCAAGAACGGCCAGACCCGC 62 | Diprion GCTGAGCGTGAACGTGGTATCACAATTGATATCGCACTTTGGAAATTTGAAACTGCCAAGTACTATGTGACTATCATCGATGCGCCGGGACACAGAGATTTCATTAAGAACATGATCACTGGTACGTCTCAGGCCGACTGTGCAGTGTTGATTGTGGCTGCTGGTACGGGAGAATTCGAAGCTGGTATTTCCAAGAACGGTCAGACCCGT 63 | Phylacteophaga GCTGAGCGTGAACGTGGTATCACCATTGACATTGCTCTGTGGAAGTTTGAGACTGCCAAGTACTACGTTACCATCATTGACGCCCCTGGACACAGAGATTTCATTAAGAACATGATCACTGGAACGTCGCAAGCTGATTGTGCTGTGTTGATCGTCGCTGCTGGTACGGGAGAATTCGAGGCTGGTATCTCGAAAAATGGGCAGACTCGT 64 | Onycholyda GCTGAGCGTGANCGTGGTATCACCATCGACATTGCCCTGTGGAAGTTCGAGACCGCCAAGTACTATGTCACCATCATCGACGCCCCCGGTCACAGGGATTTCATCAAGAACATGATCACTGGTACTTCGCAGGCTGATTGTGCTGTGCTGATCGTCGCTGCCGGTACGGGAGAGTTCGAGGCTGGTATCTCGAAGAACGGACAGACCCGC 65 | Cephus GCCGAGCGTGAACGTGGTATCACCATTGACATTGCTCTCTGGAAATTCGAGACGGCCAAATATTACGTGACCATCATCGATGCTCCCGGACACAGAGATTTCATCAAGAACATGATCACGGGAACGAGTCAGGCCGATTGTGCTGTGCTAATTGTGGCAGCTGGTACTGGAGAGTTCGAGGCGGGTATCTCGAAGAACGGACAGACCCGT 66 | Sirex GCTGAGCGCGAACGTGGTATCACCATTGACATTGCCCTGTGGAAATTCGAAACGGCAAAATATTACGTTACTATTATTGATGCTCCCGGACACAGAGATTTCATCAAGAACATGATCACTGGAACTTCGCAAGCCGATTGTGCAGTTCTGATTGTCGCGGCTGGTACCGGAGAATTTGAGGCCGGTATTTCGAAAAATGGACAGACTCGT 67 | Orussus GCTGAGCGYGARCGTGGTATCACTATTGACATTGCCTTGTGGAAGTTTGAAACGGCTAAATACTATGTCACTATTATCGATGCGCCTGGACACAGAGACTTTATTAAAAACATGATTACTGGAACCTCGCAAGCTGACTGCGCTGTACTCATTGTCGCCGCAGGTACCGGCGAGTTTGAAGCCGGTATCTCCAAGAATGGACAGACTCGT 68 | Vespidae GCTGAGCGCGAGCGTGGTATCACCATTGACATTGCTCTTTGGAAATTCGAAACTTCTAAATACTACGTCACAATTATTGACGCACCTGGACACAGAGATTTCATCAAGAACATGATCACTGGAACCTCGCAAGCAGATTGCGCTGTGCTGATCGTAGCTGCTGGTACAGGAGAATTTGAGGCTGGTATTTCTAAGAACGGACAAACGCGT 69 | 70 | Asioxyela ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 71 | Nigrimonticola ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 72 | Xyelotoma ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 73 | Undatoma ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 74 | Dahuratoma ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 75 | Cleistogaster ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 76 | Ghilarella ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 77 | Mesorussus ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 78 | Prosyntexis ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 79 | Pseudoxyelocerus ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 80 | ; 81 | End; 82 | 83 | [ 84 | Begin mrbayes; 85 | 86 | set autoclose=yes nowarnings=yes; 87 | 88 | [3.2 Data partitions] 89 | charset MV = 1-200; 90 | charset 16S = 201-300; 91 | charset Ef1a = 301-510; 92 | charset Ef1a12 = 301-510\3 302-510\3; 93 | charset Ef1a3 = 303-510\3; 94 | partition four = 4: MV, 16S, Ef1a12, Ef1a3; 95 | set partition = four; 96 | 97 | 98 | [3.3 Substitution models] 99 | exclude 7 31 61 83 107 121 122 133 182 183 198; 100 | lset applyto = (1) coding = variable rates = gamma; 101 | ctype ordered: 20 23 27 30 36 41 42 44 46 48 59 65 75 78 79 89 99 112 117 134 146 157 159 171 185 191 193 196; 102 | lset applyto = (2,3,4) nst = 6 rates = gamma; 103 | unlink statefreq = (all) revmat = (all) shape = (all); 104 | prset applyto = (all) ratepr = variable; 105 | 106 | 107 | [3.4 Relaxed clock models] 108 | prset clockratepr = lognorm(-7,0.6); 109 | [prset clockvarpr = tk02;] 110 | [prset tk02varpr = exp(1);] 111 | prset clockvarpr = igr; 112 | prset igrvarpr = exp(10); 113 | outgroup Raphidioptera; 114 | taxset fossils = Asioxyela Nigrimonticola Xyelotoma Undatoma Dahuratoma Cleistogaster Ghilarella Mesorussus Prosyntexis Pseudoxyelocerus; 115 | constraint root = 1-.; 116 | constraint HymenFossil = 2-.; 117 | constraint Hymenoptera = 2-10; 118 | constraint Holometabola = 1-10; 119 | constraint Tenthredinidae = 3-5; 120 | constraint CepSirOruApo = 7-10; 121 | 122 | [ 123 | [3.5 Total-evidence dating] 124 | calibrate Asioxyela = unif(228,242) Nigrimonticola = unif(152,163) Xyelotoma = unif(152,163) Undatoma = unif(145,152) Dahuratoma = fixed(134) Cleistogaster = unif(168,191) Ghilarella = unif(113,125) Mesorussus = unif(94,100) Prosyntexis = unif(80,86) Pseudoxyelocerus = fixed(182); 125 | prset nodeagepr = calibrated; 126 | prset brlenspr = clock:fossilization; 127 | prset samplestrat = diversity; 128 | prset sampleprob = 0.0001; 129 | prset speciationpr = exp(10); 130 | prset extinctionpr = beta(1,1); 131 | prset fossilizationpr = beta(1,1); 132 | prset treeagepr = offsetexp(300,390); 133 | prset topologypr = constraint(HymenFossil); 134 | mcmcp nrun = 2 nchain = 4 ngen = 500000 samplefr = 100; 135 | mcmcp filename = hym.te printfr = 1000 diagnfr = 5000; 136 | mcmc; 137 | sump; 138 | sumt; 139 | delete fossils; 140 | sumt output = hym.rf; 141 | ] 142 | 143 | [ 144 | [3.6 Node dating] 145 | delete fossils; 146 | exclude 24 130 168; 147 | [calibrate root = offsetexp(300,390) Tenthredinidae = offsetgamma(100,150,25) CepSirOruApo = truncatednormal(140,175,25);] 148 | calibrate Tenthredinidae = offsetgamma(100,150,25) CepSirOruApo = truncatednormal(140,175,25); 149 | prset nodeagepr = calibrated; 150 | [prset brlenspr = clock:fossilization;] 151 | [prset fossilizationpr = fixed(0);] 152 | [prset sampleprob = 0.0001;] 153 | [prset samplestrat = diversity;] 154 | prset brlenspr = clock:birthdeath; 155 | prset samplestrat = diversity; 156 | prset sampleprob = 0.0001; 157 | prset speciationpr = exp(10); 158 | prset extinctionpr = beta(1,1); 159 | prset treeagepr = offsetexp(300,390); 160 | prset topologypr = constraint(Hymenoptera,Tenthredinidae,CepSirOruApo); 161 | mcmcp nrun = 2 nchain = 4 ngen = 500000 samplefr = 100; 162 | mcmcp filename = hym.nd printfr = 1000 diagnfr = 5000; 163 | mcmcp startp = reset startt = random; 164 | mcmc; 165 | sump; 166 | sumt; 167 | ] 168 | 169 | [ 170 | [3.7 Non-clock analysis] 171 | delete fossils; 172 | prset brlenspr = uncons:gammadir(1,1,1,1); 173 | prset topologypr = uniform; 174 | mcmcp nrun = 2 nchain = 4 ngen = 500000 samplefr = 100; 175 | mcmcp filename = hym.un printfr = 1000 diagnfr = 5000; 176 | mcmc; 177 | sump; 178 | sumt; 179 | ] 180 | 181 | End; 182 | ] 183 | -------------------------------------------------------------------------------- /examples/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.16.5 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994-2021 Free Software Foundation, Inc. 5 | 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | @SET_MAKE@ 16 | 17 | VPATH = @srcdir@ 18 | am__is_gnu_make = { \ 19 | if test -z '$(MAKELEVEL)'; then \ 20 | false; \ 21 | elif test -n '$(MAKE_HOST)'; then \ 22 | true; \ 23 | elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ 24 | true; \ 25 | else \ 26 | false; \ 27 | fi; \ 28 | } 29 | am__make_running_with_option = \ 30 | case $${target_option-} in \ 31 | ?) ;; \ 32 | *) echo "am__make_running_with_option: internal error: invalid" \ 33 | "target option '$${target_option-}' specified" >&2; \ 34 | exit 1;; \ 35 | esac; \ 36 | has_opt=no; \ 37 | sane_makeflags=$$MAKEFLAGS; \ 38 | if $(am__is_gnu_make); then \ 39 | sane_makeflags=$$MFLAGS; \ 40 | else \ 41 | case $$MAKEFLAGS in \ 42 | *\\[\ \ ]*) \ 43 | bs=\\; \ 44 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ 45 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ 46 | esac; \ 47 | fi; \ 48 | skip_next=no; \ 49 | strip_trailopt () \ 50 | { \ 51 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ 52 | }; \ 53 | for flg in $$sane_makeflags; do \ 54 | test $$skip_next = yes && { skip_next=no; continue; }; \ 55 | case $$flg in \ 56 | *=*|--*) continue;; \ 57 | -*I) strip_trailopt 'I'; skip_next=yes;; \ 58 | -*I?*) strip_trailopt 'I';; \ 59 | -*O) strip_trailopt 'O'; skip_next=yes;; \ 60 | -*O?*) strip_trailopt 'O';; \ 61 | -*l) strip_trailopt 'l'; skip_next=yes;; \ 62 | -*l?*) strip_trailopt 'l';; \ 63 | -[dEDm]) skip_next=yes;; \ 64 | -[JT]) skip_next=yes;; \ 65 | esac; \ 66 | case $$flg in \ 67 | *$$target_option*) has_opt=yes; break;; \ 68 | esac; \ 69 | done; \ 70 | test $$has_opt = yes 71 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) 72 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 73 | pkgdatadir = $(datadir)/@PACKAGE@ 74 | pkgincludedir = $(includedir)/@PACKAGE@ 75 | pkglibdir = $(libdir)/@PACKAGE@ 76 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 77 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 78 | install_sh_DATA = $(install_sh) -c -m 644 79 | install_sh_PROGRAM = $(install_sh) -c 80 | install_sh_SCRIPT = $(install_sh) -c 81 | INSTALL_HEADER = $(INSTALL_DATA) 82 | transform = $(program_transform_name) 83 | NORMAL_INSTALL = : 84 | PRE_INSTALL = : 85 | POST_INSTALL = : 86 | NORMAL_UNINSTALL = : 87 | PRE_UNINSTALL = : 88 | POST_UNINSTALL = : 89 | build_triplet = @build@ 90 | host_triplet = @host@ 91 | subdir = examples 92 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 93 | am__aclocal_m4_deps = \ 94 | $(top_srcdir)/autotools/ax_reset_header_cache.m4 \ 95 | $(top_srcdir)/configure.ac 96 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 97 | $(ACLOCAL_M4) 98 | DIST_COMMON = $(srcdir)/Makefile.am $(dist_examples_DATA) \ 99 | $(am__DIST_COMMON) 100 | mkinstalldirs = $(install_sh) -d 101 | CONFIG_HEADER = $(top_builddir)/src/config.h 102 | CONFIG_CLEAN_FILES = 103 | CONFIG_CLEAN_VPATH_FILES = 104 | AM_V_P = $(am__v_P_@AM_V@) 105 | am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) 106 | am__v_P_0 = false 107 | am__v_P_1 = : 108 | AM_V_GEN = $(am__v_GEN_@AM_V@) 109 | am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) 110 | am__v_GEN_0 = @echo " GEN " $@; 111 | am__v_GEN_1 = 112 | AM_V_at = $(am__v_at_@AM_V@) 113 | am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) 114 | am__v_at_0 = @ 115 | am__v_at_1 = 116 | SOURCES = 117 | DIST_SOURCES = 118 | am__can_run_installinfo = \ 119 | case $$AM_UPDATE_INFO_DIR in \ 120 | n|no|NO) false;; \ 121 | *) (install-info --version) >/dev/null 2>&1;; \ 122 | esac 123 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; 124 | am__vpath_adj = case $$p in \ 125 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ 126 | *) f=$$p;; \ 127 | esac; 128 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; 129 | am__install_max = 40 130 | am__nobase_strip_setup = \ 131 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` 132 | am__nobase_strip = \ 133 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" 134 | am__nobase_list = $(am__nobase_strip_setup); \ 135 | for p in $$list; do echo "$$p $$p"; done | \ 136 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ 137 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ 138 | if (++n[$$2] == $(am__install_max)) \ 139 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ 140 | END { for (dir in files) print dir, files[dir] }' 141 | am__base_list = \ 142 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ 143 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' 144 | am__uninstall_files_from_dir = { \ 145 | test -z "$$files" \ 146 | || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ 147 | || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ 148 | $(am__cd) "$$dir" && rm -f $$files; }; \ 149 | } 150 | am__installdirs = "$(DESTDIR)$(examplesdir)" 151 | DATA = $(dist_examples_DATA) 152 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 153 | am__DIST_COMMON = $(srcdir)/Makefile.in 154 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 155 | ACLOCAL = @ACLOCAL@ 156 | AMTAR = @AMTAR@ 157 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 158 | AUTOCONF = @AUTOCONF@ 159 | AUTOHEADER = @AUTOHEADER@ 160 | AUTOMAKE = @AUTOMAKE@ 161 | AWK = @AWK@ 162 | BEAGLE_CFLAGS = @BEAGLE_CFLAGS@ 163 | BEAGLE_LIBS = @BEAGLE_LIBS@ 164 | BIBTEX = @BIBTEX@ 165 | CC = @CC@ 166 | CCDEPMODE = @CCDEPMODE@ 167 | CFLAGS = @CFLAGS@ 168 | CPP = @CPP@ 169 | CPPFLAGS = @CPPFLAGS@ 170 | CPUEXT_FLAGS = @CPUEXT_FLAGS@ 171 | CSCOPE = @CSCOPE@ 172 | CTAGS = @CTAGS@ 173 | CYGPATH_W = @CYGPATH_W@ 174 | DEFS = @DEFS@ 175 | DEPDIR = @DEPDIR@ 176 | ECHO_C = @ECHO_C@ 177 | ECHO_N = @ECHO_N@ 178 | ECHO_T = @ECHO_T@ 179 | EGREP = @EGREP@ 180 | ETAGS = @ETAGS@ 181 | EXEEXT = @EXEEXT@ 182 | GREP = @GREP@ 183 | INSTALL = @INSTALL@ 184 | INSTALL_DATA = @INSTALL_DATA@ 185 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 186 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 187 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 188 | LATEXMK = @LATEXMK@ 189 | LDFLAGS = @LDFLAGS@ 190 | LIBOBJS = @LIBOBJS@ 191 | LIBS = @LIBS@ 192 | LTLIBOBJS = @LTLIBOBJS@ 193 | MAINT = @MAINT@ 194 | MAKEINFO = @MAKEINFO@ 195 | MKDIR_P = @MKDIR_P@ 196 | MPICC = @MPICC@ 197 | OBJEXT = @OBJEXT@ 198 | PACKAGE = @PACKAGE@ 199 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 200 | PACKAGE_NAME = @PACKAGE_NAME@ 201 | PACKAGE_STRING = @PACKAGE_STRING@ 202 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 203 | PACKAGE_URL = @PACKAGE_URL@ 204 | PACKAGE_VERSION = @PACKAGE_VERSION@ 205 | PATH_SEPARATOR = @PATH_SEPARATOR@ 206 | PDFLATEX = @PDFLATEX@ 207 | PKG_CONFIG = @PKG_CONFIG@ 208 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ 209 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ 210 | SED = @SED@ 211 | SET_MAKE = @SET_MAKE@ 212 | SHELL = @SHELL@ 213 | SIMD_FLAGS = @SIMD_FLAGS@ 214 | STRIP = @STRIP@ 215 | TESTS_USE_MPI = @TESTS_USE_MPI@ 216 | VERSION = @VERSION@ 217 | abs_builddir = @abs_builddir@ 218 | abs_srcdir = @abs_srcdir@ 219 | abs_top_builddir = @abs_top_builddir@ 220 | abs_top_srcdir = @abs_top_srcdir@ 221 | ac_ct_CC = @ac_ct_CC@ 222 | am__include = @am__include@ 223 | am__leading_dot = @am__leading_dot@ 224 | am__quote = @am__quote@ 225 | am__tar = @am__tar@ 226 | am__untar = @am__untar@ 227 | bindir = @bindir@ 228 | build = @build@ 229 | build_alias = @build_alias@ 230 | build_cpu = @build_cpu@ 231 | build_os = @build_os@ 232 | build_vendor = @build_vendor@ 233 | builddir = @builddir@ 234 | datadir = @datadir@ 235 | datarootdir = @datarootdir@ 236 | docdir = @docdir@ 237 | dvidir = @dvidir@ 238 | exec_prefix = @exec_prefix@ 239 | host = @host@ 240 | host_alias = @host_alias@ 241 | host_cpu = @host_cpu@ 242 | host_os = @host_os@ 243 | host_vendor = @host_vendor@ 244 | htmldir = @htmldir@ 245 | includedir = @includedir@ 246 | infodir = @infodir@ 247 | install_sh = @install_sh@ 248 | libdir = @libdir@ 249 | libexecdir = @libexecdir@ 250 | localedir = @localedir@ 251 | localstatedir = @localstatedir@ 252 | mandir = @mandir@ 253 | mkdir_p = @mkdir_p@ 254 | oldincludedir = @oldincludedir@ 255 | pdfdir = @pdfdir@ 256 | prefix = @prefix@ 257 | program_transform_name = @program_transform_name@ 258 | psdir = @psdir@ 259 | runstatedir = @runstatedir@ 260 | sbindir = @sbindir@ 261 | sharedstatedir = @sharedstatedir@ 262 | srcdir = @srcdir@ 263 | sysconfdir = @sysconfdir@ 264 | target_alias = @target_alias@ 265 | top_build_prefix = @top_build_prefix@ 266 | top_builddir = @top_builddir@ 267 | top_srcdir = @top_srcdir@ 268 | examplesdir = ${datarootdir}/examples/${PACKAGE} 269 | dist_examples_DATA = \ 270 | avian_ovomucoids.nex \ 271 | codon.nex \ 272 | cynmix.nex \ 273 | finch.nex \ 274 | hymfossil.nex \ 275 | kim.nex \ 276 | primates.nex \ 277 | replicase.nex 278 | 279 | all: all-am 280 | 281 | .SUFFIXES: 282 | $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) 283 | @for dep in $?; do \ 284 | case '$(am__configure_deps)' in \ 285 | *$$dep*) \ 286 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ 287 | && { if test -f $@; then exit 0; else break; fi; }; \ 288 | exit 1;; \ 289 | esac; \ 290 | done; \ 291 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/Makefile'; \ 292 | $(am__cd) $(top_srcdir) && \ 293 | $(AUTOMAKE) --foreign examples/Makefile 294 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 295 | @case '$?' in \ 296 | *config.status*) \ 297 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ 298 | *) \ 299 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ 300 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ 301 | esac; 302 | 303 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 304 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 305 | 306 | $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 307 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 308 | $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) 309 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 310 | $(am__aclocal_m4_deps): 311 | install-dist_examplesDATA: $(dist_examples_DATA) 312 | @$(NORMAL_INSTALL) 313 | @list='$(dist_examples_DATA)'; test -n "$(examplesdir)" || list=; \ 314 | if test -n "$$list"; then \ 315 | echo " $(MKDIR_P) '$(DESTDIR)$(examplesdir)'"; \ 316 | $(MKDIR_P) "$(DESTDIR)$(examplesdir)" || exit 1; \ 317 | fi; \ 318 | for p in $$list; do \ 319 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ 320 | echo "$$d$$p"; \ 321 | done | $(am__base_list) | \ 322 | while read files; do \ 323 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \ 324 | $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ 325 | done 326 | 327 | uninstall-dist_examplesDATA: 328 | @$(NORMAL_UNINSTALL) 329 | @list='$(dist_examples_DATA)'; test -n "$(examplesdir)" || list=; \ 330 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ 331 | dir='$(DESTDIR)$(examplesdir)'; $(am__uninstall_files_from_dir) 332 | tags TAGS: 333 | 334 | ctags CTAGS: 335 | 336 | cscope cscopelist: 337 | 338 | distdir: $(BUILT_SOURCES) 339 | $(MAKE) $(AM_MAKEFLAGS) distdir-am 340 | 341 | distdir-am: $(DISTFILES) 342 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 343 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 344 | list='$(DISTFILES)'; \ 345 | dist_files=`for file in $$list; do echo $$file; done | \ 346 | sed -e "s|^$$srcdirstrip/||;t" \ 347 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 348 | case $$dist_files in \ 349 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 350 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 351 | sort -u` ;; \ 352 | esac; \ 353 | for file in $$dist_files; do \ 354 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 355 | if test -d $$d/$$file; then \ 356 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 357 | if test -d "$(distdir)/$$file"; then \ 358 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 359 | fi; \ 360 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 361 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 362 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 363 | fi; \ 364 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 365 | else \ 366 | test -f "$(distdir)/$$file" \ 367 | || cp -p $$d/$$file "$(distdir)/$$file" \ 368 | || exit 1; \ 369 | fi; \ 370 | done 371 | check-am: all-am 372 | check: check-am 373 | all-am: Makefile $(DATA) 374 | installdirs: 375 | for dir in "$(DESTDIR)$(examplesdir)"; do \ 376 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 377 | done 378 | install: install-am 379 | install-exec: install-exec-am 380 | install-data: install-data-am 381 | uninstall: uninstall-am 382 | 383 | install-am: all-am 384 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 385 | 386 | installcheck: installcheck-am 387 | install-strip: 388 | if test -z '$(STRIP)'; then \ 389 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 390 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 391 | install; \ 392 | else \ 393 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 394 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 395 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ 396 | fi 397 | mostlyclean-generic: 398 | 399 | clean-generic: 400 | 401 | distclean-generic: 402 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 403 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 404 | 405 | maintainer-clean-generic: 406 | @echo "This command is intended for maintainers to use" 407 | @echo "it deletes files that may require special tools to rebuild." 408 | clean: clean-am 409 | 410 | clean-am: clean-generic mostlyclean-am 411 | 412 | distclean: distclean-am 413 | -rm -f Makefile 414 | distclean-am: clean-am distclean-generic 415 | 416 | dvi: dvi-am 417 | 418 | dvi-am: 419 | 420 | html: html-am 421 | 422 | html-am: 423 | 424 | info: info-am 425 | 426 | info-am: 427 | 428 | install-data-am: install-dist_examplesDATA 429 | 430 | install-dvi: install-dvi-am 431 | 432 | install-dvi-am: 433 | 434 | install-exec-am: 435 | 436 | install-html: install-html-am 437 | 438 | install-html-am: 439 | 440 | install-info: install-info-am 441 | 442 | install-info-am: 443 | 444 | install-man: 445 | 446 | install-pdf: install-pdf-am 447 | 448 | install-pdf-am: 449 | 450 | install-ps: install-ps-am 451 | 452 | install-ps-am: 453 | 454 | installcheck-am: 455 | 456 | maintainer-clean: maintainer-clean-am 457 | -rm -f Makefile 458 | maintainer-clean-am: distclean-am maintainer-clean-generic 459 | 460 | mostlyclean: mostlyclean-am 461 | 462 | mostlyclean-am: mostlyclean-generic 463 | 464 | pdf: pdf-am 465 | 466 | pdf-am: 467 | 468 | ps: ps-am 469 | 470 | ps-am: 471 | 472 | uninstall-am: uninstall-dist_examplesDATA 473 | 474 | .MAKE: install-am install-strip 475 | 476 | .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ 477 | ctags-am distclean distclean-generic distdir dvi dvi-am html \ 478 | html-am info info-am install install-am install-data \ 479 | install-data-am install-dist_examplesDATA install-dvi \ 480 | install-dvi-am install-exec install-exec-am install-html \ 481 | install-html-am install-info install-info-am install-man \ 482 | install-pdf install-pdf-am install-ps install-ps-am \ 483 | install-strip installcheck installcheck-am installdirs \ 484 | maintainer-clean maintainer-clean-generic mostlyclean \ 485 | mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ 486 | uninstall-am uninstall-dist_examplesDATA 487 | 488 | .PRECIOUS: Makefile 489 | 490 | 491 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 492 | # Otherwise a system limit (for SysV at least) may be exceeded. 493 | .NOEXPORT: 494 | -------------------------------------------------------------------------------- /src/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef UTILS_H_ 2 | #define UTILS_H_ 3 | 4 | /* M_PI and M_PI_2 not part of standard C */ 5 | #ifndef M_PI 6 | # define M_PI 3.14159265358979323846264338327950288 7 | #endif 8 | #ifndef M_PI_2 9 | # define M_PI_2 1.57079632679489661923132169163975144 10 | #endif 11 | 12 | struct MrBComplex 13 | { 14 | MrBFlt re; 15 | MrBFlt im; 16 | }; 17 | typedef struct MrBComplex MrBComplex; 18 | 19 | typedef struct 20 | { 21 | MrBFlt mean; 22 | MrBFlt median; 23 | MrBFlt lower; 24 | MrBFlt upper; 25 | MrBFlt var; 26 | MrBFlt PSRF; 27 | MrBFlt avrESS; 28 | MrBFlt minESS; 29 | } 30 | Stat; 31 | 32 | 33 | /* For explanation why the following two macros exists, see 34 | * http://stackoverflow.com/questions/38569628/calling-a-free-wrapper-dereferencing-type-punned-pointer-will-break-strict-al 35 | */ 36 | 37 | #define SAFEFREE(ptr) (ptr = SafeFree(ptr)) 38 | #define ALIGNEDSAFEFREE(ptr) (ptr = AlignedSafeFree(ptr)) 39 | 40 | int AddBitfield (BitsLong ***list, int listLen, int *set, int setLen); 41 | #if defined (SSE_ENABLED) 42 | void *AlignedMalloc (size_t size, size_t alignment); 43 | void *AlignedSafeFree (void *ptr); 44 | #endif 45 | int AreBitfieldsEqual (BitsLong *p, BitsLong *q, int length); 46 | int Bit (int n, BitsLong *p); 47 | void ClearBit (int i, BitsLong *bits); 48 | void ClearBits (BitsLong *bits, int nLongs); 49 | void CopyBits (BitsLong *dest, BitsLong *source, int nLongs); 50 | int CopyResults (FILE *toFile, char *fromFileName, long long lastGen); 51 | int CopyProcessSsFile (FILE *toFile, char *fromFileName, int lastStep, MrBFlt *marginalLnLSS, MrBFlt *splitfreqSS); 52 | int CopyTreeResults (FILE *toFile, char *fromFileName, long long lastGen, int *treeNum); 53 | int FirstTaxonInPartition (BitsLong *partition, int length); 54 | long FirstTree (FILE *fp, char *lineBuf, int longestLine); 55 | int Flip01 (int x); 56 | void FlipBits (BitsLong *partition, int length, BitsLong *mask); 57 | void FlipOneBit (int n, BitsLong *p); 58 | int FromGrowthFxnToIndex (int *growthFxn); 59 | void FromIndexToGrowthFxn (int index, int *growthFxn); 60 | void GetIntSummary (int **vals, int nRows, int *rowCount, Stat *theStats, int HPD); 61 | int GetKFromGrowthFxn (int *growthFxn); 62 | void GetSummary (MrBFlt **vals, int nRows, int *rowCount, Stat *theStats, int HPD); 63 | int HarmonicArithmeticMeanOnLogs (MrBFlt *vals, int nVals, MrBFlt *mean, MrBFlt *harm_mean); 64 | int IsBitSet (int i, BitsLong *bits); 65 | int IsConsistentWith (const char *token, const char *expected); 66 | int IsPartNested (BitsLong *smaller, BitsLong *larger, int length); 67 | int IsPartCompatible (BitsLong *smaller, BitsLong *larger, int length); 68 | int IsSectionEmpty (BitsLong *bitField1, BitsLong *bitField2, int length); 69 | int IsUnionEqThird (BitsLong *bitField1, BitsLong *bitField2, BitsLong *bitField3, int length); 70 | long LastBlock (FILE *fp, char *lineBuf, int longestLine); 71 | int LineTermType (FILE *fp); 72 | MrBFlt LnDirichlet (MrBFlt *alphai, MrBFlt *xi, int lengthi); 73 | int LongestLine (FILE *fp); 74 | void LowerUpperMedian (MrBFlt *vals, int nVals, MrBFlt *lower, MrBFlt *upper, MrBFlt *median); 75 | void LowerUpperMedianHPD (MrBFlt *vals, int nVals, MrBFlt *lower, MrBFlt *upper, MrBFlt *median); 76 | void MeanVariance (MrBFlt *vals, int nVals, MrBFlt *mean, MrBFlt *var); 77 | void MeanVarianceLog (MrBFlt *vals, int nVals, MrBFlt *mean, MrBFlt *var, MrBFlt *varEst); 78 | int NextTaxonInPartition (int currentTaxon, BitsLong *partition, int length); 79 | int NBits (int x); 80 | int NumBits (BitsLong *x, int len); 81 | char *MbPrintNum (MrBFlt num); 82 | void MrBayesPrint (char *format, ...); 83 | void MrBayesPrintf (FILE *f, char *format, ...); 84 | FILE *OpenBinaryFileR (char *name); 85 | FILE *OpenTextFileA (char *name); 86 | FILE *OpenTextFileR (char *name); 87 | FILE *OpenTextFileRQuait (char *name); 88 | FILE *OpenTextFileW (char *name); 89 | MrBFlt PotentialScaleReduction (MrBFlt **vals, int nRows, int *count); 90 | void EstimatedSampleSize (MrBFlt **vals, int nRuns, int *count, MrBFlt *returnESS); 91 | void *SafeCalloc (size_t n, size_t s); 92 | int SafeFclose (FILE **fp); 93 | void *SafeFree (void *ptr); 94 | void *SafeMalloc (size_t s); 95 | void *SafeRealloc (void *ptr, size_t s); 96 | char *SafeStrcat (char **target, const char *source); 97 | char *SafeStrcpy (char **target, const char *source); 98 | void SetBit (int i, BitsLong *bits); 99 | void SortInts (int *item, int *assoc, int count, int descendingOrder); 100 | void SortInts2 (int *item, int *assoc, int left, int right, int descendingOrder); 101 | void SortMrBFlt_Asc (MrBFlt *item, int left, int right); 102 | void SortMrBFlt_Des (MrBFlt *item, int left, int right); 103 | int StrCmpCaseInsensitiveLen (const char *s, const char *t, size_t len); 104 | int StrCmpCaseInsensitive (char *s, char *t); 105 | void StripComments (char *s); 106 | FILE *TestOpenTextFileR (char *name); 107 | void UpdateGrowthFxn (int *growthFxn); 108 | int UpperTriangIndex (int i, int j, int size); 109 | int WantTo (const char *msg); 110 | 111 | /* tree utility functions */ 112 | int AddToTreeList (TreeList *treeList, Tree *tree); 113 | Tree *AllocateTree (int numTaxa); 114 | Tree *AllocateFixedTree (int numTaxa, int isRooted); 115 | int AllocateTreePartitions (Tree *t); 116 | PolyTree *AllocatePolyTree (int numTaxa); 117 | int AllocatePolyTreePartitions (PolyTree *pt); 118 | int AllocatePolyTreeRelClockParams (PolyTree *pt, int nBSets, int nESets); 119 | int AreTopologiesSame (Tree *t1, Tree *t2); 120 | int AreTreesSame (Tree *t1, Tree *t2); 121 | int BuildConstraintTree (Tree *t, PolyTree *pt, char **localTaxonNames); 122 | int BuildRandomRTopology (Tree *t, RandLong *seed); 123 | int BuildRandomUTopology (Tree *t, RandLong *seed); 124 | int CheckConstraints (Tree *t); 125 | int CheckSetConstraints (Tree *t); 126 | void ColorClusters (TreeNode *p, int *index); 127 | void CopySubtreeToTree (Tree *subtree, Tree *t); 128 | int CopyToPolyTreeFromPolyTree (PolyTree *to, PolyTree *from); 129 | int CopyToSpeciesTreeFromPolyTree (Tree *to, PolyTree *from); 130 | int CopyToTreeFromPolyTree (Tree *to, PolyTree *from); 131 | void CopyPolyNodes (PolyNode *p, PolyNode *q, int nLongsNeeded); 132 | int CopyToTreeFromTree (Tree *to, Tree *from); 133 | void CopyTreeNodes (TreeNode *p, TreeNode *q, int nLongsNeeded); 134 | void CopyTreeToSubtree (Tree *t, Tree *subtree); 135 | int Deroot (PolyTree *pt); 136 | void EraseTreeList (TreeList *treeList); 137 | void findAllowedClockrate (Tree *t, MrBFlt *minClockRate, MrBFlt *maxClockRate); 138 | void FreePolyTree (PolyTree *pt); 139 | void FreePolyTreePartitions (PolyTree *pt); 140 | void FreePolyTreePopSizeParams (PolyTree *pt); 141 | void FreePolyTreeRelClockParams (PolyTree *pt); 142 | void FreeTree (Tree *t); 143 | void FreeTreePartitions (Tree *pt); 144 | void GetDatedNodeDepths (TreeNode *p, MrBFlt *nodeDepths); 145 | void GetDatedNodes (TreeNode *p, TreeNode **datedNodes); 146 | void GetDownPass (Tree *t); 147 | void GetNodeDownPass (Tree *t, TreeNode *p, int *i, int *j); 148 | void GetPolyAges (PolyTree *t); 149 | void GetPolyDepths (PolyTree *t); 150 | void GetPolyDownPass (PolyTree *t); 151 | void GetPolyNodeDownPass (PolyTree *t, PolyNode *p, int *i, int *j); 152 | int GetRandomEmbeddedSubtree (Tree *t, int nTerminals, RandLong *seed, int *nEmbeddedTrees); 153 | int GetFromTreeList (TreeList *treeList, Tree *tree); 154 | int InitBrlens (Tree *t, MrBFlt v); 155 | int InitCalibratedBrlens (Tree *t, MrBFlt minLength, RandLong *seed); 156 | int InitClockBrlens (Tree *t); 157 | int IsCalibratedClockSatisfied (Tree *t,MrBFlt *minClockRate,MrBFlt *maxClockRate , MrBFlt tol); 158 | int IsClockSatisfied (Tree *t, MrBFlt tol); 159 | int IsTreeConsistent (Param *param, int chain, int state); 160 | int LabelTree (Tree *t, char **taxonNames); 161 | void Mark (TreeNode *p); 162 | void MarkDistance (TreeNode *p, int YESorNO, int dist, int *n); 163 | void MarkUnconstrained (TreeNode *p); 164 | int MoveCalculationRoot (Tree *t, int outgroup); 165 | int MovePolyCalculationRoot (PolyTree *t, int outgroup); 166 | int NumConstrainedTips (TreeNode *p); 167 | int NumDatedTips (TreeNode *p); 168 | void OrderTips (PolyTree *t); 169 | void PrintNewick (char **s, int *len, Tree *t); 170 | void PrintNodes (Tree *t); 171 | void PrintPolyNodes (PolyTree *pt); 172 | void PrintTranslateBlock (FILE *fp, Tree *t); 173 | int PrunePolyTree (PolyTree *pt); 174 | int RandPerturb (Tree *t, int nPert, RandLong *seed); 175 | int RandResolve (Tree *tt, PolyTree *t, RandLong *seed, int destinationIsRooted); 176 | int ResetBrlensFromTree (Tree *tree, Tree *vTree); 177 | void ResetIntNodeIndices (PolyTree *t); 178 | void ResetPolyTree (PolyTree *t); 179 | void ResetPolyTreePartitions (PolyTree *pt); 180 | void ResetPolyTreeRelClockParams (PolyTree *pt); 181 | int ResetRootHeight (Tree *t, MrBFlt rootHeight); 182 | void ResetTipIndices (PolyTree *pt); 183 | int ResetTopology (Tree *t, char *s); 184 | int ResetTopologyFromTree (Tree *tree, Tree *top); 185 | int ResetTopologyFromPolyTree (Tree *tree, PolyTree *top); 186 | void ResetTreePartitions (Tree *t); 187 | int RetrieveRTopology (Tree *t, int *order); 188 | int RetrieveRTree (Tree *t, int *order, MrBFlt *brlens); 189 | int RetrieveRTreeWithIndices (Tree *t, int *order, MrBFlt *brlens); 190 | int RetrieveUTopology (Tree *t, int *order); 191 | int RetrieveUTree (Tree *t, int *order, MrBFlt *brlens); 192 | void SetDatedNodeAges (Param* param, int chain, int state); 193 | void SetNodeDepths (Tree *t); 194 | int SetTreeNodeAges (Param *param, int chain, int state); 195 | int ShowPolyNodes (PolyTree *pt); 196 | int ShowTree (Tree *t); 197 | int StoreRPolyTopology (PolyTree *t, int *order); 198 | int StoreRPolyTree (PolyTree *t, int *order, MrBFlt *brlens); 199 | int StoreRTopology (Tree *t, int *order); 200 | int StoreRTree (Tree *t, int *order, MrBFlt *brlens); 201 | int StoreRTreeWithIndices (Tree *t, int *order, MrBFlt *brlens); 202 | int StoreUPolyTopology (PolyTree *t, int *order); 203 | int StoreUPolyTree (PolyTree *t, int *order, MrBFlt *brlens); 204 | int StoreUTopology (Tree *t, int *order); 205 | int StoreUTree (Tree *t, int *order, MrBFlt *brlens); 206 | MrBFlt TreeLen (Tree *t); 207 | void Unmark (TreeNode *p); 208 | void UpdateTreeWithClockrate (Tree *t, MrBFlt clockRate); 209 | void WriteEventTree (TreeNode *p, int chain, Param *param); 210 | void WriteEventTreeToPrintString (TreeNode *p, int chain, Param *param, int printAll); 211 | void WriteNoEvtTreeToPrintString (TreeNode *p, int chain, Param *param, int showBrlens, int isRooted); 212 | void WriteEvolTree (TreeNode *p, int chain, Param *param); 213 | void WriteTopologyToFile (FILE *fp, TreeNode *p, int isRooted); 214 | 215 | /* math utility functions */ 216 | MrBComplex **AllocateSquareComplexMatrix (int dim); 217 | MrBFlt **AllocateSquareDoubleMatrix (int dim); 218 | int **AllocateSquareIntegerMatrix (int dim); 219 | int AutodGamma (MrBFlt *M, MrBFlt rho, int K); 220 | void BetaBreaks (MrBFlt alpha, MrBFlt beta, MrBFlt *values, int K); 221 | MrBFlt BetaQuantile (MrBFlt alpha, MrBFlt beta, MrBFlt x); 222 | void CalcCijk (int dim, MrBFlt *c_ijk, MrBFlt **u, MrBFlt **v); 223 | void CopyComplexMatrices (int dim, MrBComplex **from, MrBComplex **to); 224 | void CopyDoubleMatrices (int dim, MrBFlt **from, MrBFlt **to); 225 | void DirichletRandomVariable (MrBFlt *alp, MrBFlt *z, int n, RandLong *seed); 226 | int DiscreteGamma (MrBFlt *rK, MrBFlt alfa, MrBFlt beta, int K, int median); 227 | void FreeSquareComplexMatrix (MrBComplex **m); 228 | void FreeSquareDoubleMatrix (MrBFlt **m); 229 | void FreeSquareIntegerMatrix (int **m); 230 | int GetEigens (int dim, MrBFlt **q, MrBFlt *eigenValues, MrBFlt *eigvalsImag, MrBFlt **eigvecs, MrBFlt **inverseEigvecs, MrBComplex **Ceigvecs, MrBComplex **CinverseEigvecs); 231 | MrBFlt LnFactorial (int value); 232 | MrBFlt LnGamma (MrBFlt alp); 233 | MrBFlt LnPriorProbExponential (MrBFlt val, MrBFlt *params); 234 | MrBFlt LnPriorProbExponential_Param_Mean (MrBFlt val, MrBFlt *params); 235 | MrBFlt LnPriorProbFix (MrBFlt val, MrBFlt *params); 236 | MrBFlt LnPriorProbGamma (MrBFlt val, MrBFlt *params); 237 | MrBFlt LnPriorProbGamma_Param_Mean_Sd (MrBFlt val, MrBFlt *params); 238 | MrBFlt LnPriorProbLognormal (MrBFlt val, MrBFlt *params); 239 | MrBFlt LnPriorProbLognormal_Param_Mean_Sd (MrBFlt val, MrBFlt *params); 240 | MrBFlt LnPriorProbNormal (MrBFlt val, MrBFlt *params); 241 | MrBFlt LnPriorProbOffsetExponential (MrBFlt val, MrBFlt *params); 242 | MrBFlt LnPriorProbOffsetExponential_Param_Offset_Mean (MrBFlt val, MrBFlt *params); 243 | MrBFlt LnPriorProbOffsetGamma (MrBFlt val, MrBFlt *params); 244 | MrBFlt LnPriorProbOffsetGamma_Param_Offset_Mean_Sd (MrBFlt val, MrBFlt *params); 245 | MrBFlt LnPriorProbOffsetLognormal (MrBFlt val, MrBFlt *params); 246 | MrBFlt LnPriorProbOffsetLognormal_Param_Offset_Mean_Sd (MrBFlt val, MrBFlt *params); 247 | MrBFlt LnPriorProbTruncatedNormal (MrBFlt val, MrBFlt *params); 248 | MrBFlt LnPriorProbTruncatedNormal_Param_Trunc_Mean_Sd (MrBFlt val, MrBFlt *params); 249 | MrBFlt LnPriorProbUniform (MrBFlt val, MrBFlt *params); 250 | MrBFlt LnProbRatioExponential (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 251 | MrBFlt LnProbRatioExponential_Param_Mean (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 252 | MrBFlt LnProbRatioFix (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 253 | MrBFlt LnProbRatioGamma (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 254 | MrBFlt LnProbRatioGamma_Param_Mean_Sd (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 255 | MrBFlt LnProbRatioLognormal (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 256 | MrBFlt LnProbRatioLognormal_Param_Mean_Sd (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 257 | MrBFlt LnProbRatioNormal (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 258 | MrBFlt LnProbRatioOffsetExponential (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 259 | MrBFlt LnProbRatioOffsetExponential_Param_Offset_Mean (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 260 | MrBFlt LnProbRatioOffsetGamma (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 261 | MrBFlt LnProbRatioOffsetGamma_Param_Offset_Mean_Sd (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 262 | MrBFlt LnProbRatioOffsetLognormal (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 263 | MrBFlt LnProbRatioOffsetLognormal_Param_Offset_Mean_Sd (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 264 | MrBFlt LnProbRatioTruncatedNormal (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 265 | MrBFlt LnProbRatioTruncatedNormal_Param_Trunc_Mean_Sd (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 266 | MrBFlt LnProbRatioUniform (MrBFlt newX, MrBFlt oldX, MrBFlt *params); 267 | MrBFlt LnProbGamma (MrBFlt alpha, MrBFlt beta, MrBFlt x); 268 | MrBFlt LnProbTruncGamma (MrBFlt alpha, MrBFlt beta, MrBFlt x, MrBFlt min, MrBFlt max); 269 | MrBFlt LnProbLogNormal (MrBFlt mu, MrBFlt sigma, MrBFlt x); 270 | MrBFlt LnProbLogNormal_Mean_LogVar (MrBFlt mean, MrBFlt sigma2, MrBFlt x); 271 | MrBFlt LnProbLogNormal_Mean_Var (MrBFlt mean, MrBFlt var, MrBFlt x); 272 | MrBFlt LnProbNormal (MrBFlt mu, MrBFlt sigma, MrBFlt x); 273 | MrBFlt LnRatioLogNormal (MrBFlt mu, MrBFlt sigma, MrBFlt xNew, MrBFlt xOld); 274 | MrBFlt LogNormalRandomVariable (MrBFlt mean, MrBFlt var, RandLong *seed); 275 | MrBFlt MaximumValue (MrBFlt x, MrBFlt y); 276 | MrBFlt MinimumValue (MrBFlt x, MrBFlt y); 277 | void MultiplyMatrices (int dim, MrBFlt **a, MrBFlt **b, MrBFlt **result); 278 | int MultiplyMatrixNTimes (int dim, MrBFlt **Mat, int power, MrBFlt **Result); 279 | MrBFlt PointNormal (MrBFlt prob); 280 | MrBFlt PsiGammaLnProb (MrBFlt alpha, MrBFlt value); 281 | MrBFlt PsiGammaLnRatio (MrBFlt alpha, MrBFlt numerator, MrBFlt denominator); 282 | MrBFlt PsiGammaRandomVariable (MrBFlt alpha, RandLong *seed); 283 | MrBFlt QuantileGamma (MrBFlt x, MrBFlt alfa, MrBFlt beta); 284 | MrBFlt RandomNumber (RandLong *seed); 285 | MrBFlt QuantileLogNormal (MrBFlt prob, MrBFlt mu, MrBFlt sigma); 286 | int DiscreteLogNormal (MrBFlt *rK, MrBFlt sigma, int K, int median); 287 | MrBFlt LogNormalPoint (MrBFlt x, MrBFlt mu, MrBFlt sigma); 288 | 289 | /* qsort utility function */ 290 | int cmpMrBFlt(const void *a, const void *b); 291 | 292 | #endif /* UTILS_H_ */ 293 | --------------------------------------------------------------------------------