The BP&P program implements a series of Bayesian inference methods under the multispecies coalescent model with and without introgression. The analyses may include estimation of population size (theta’s) and species divergence times (tau’s), species tree estimation, species delimitation, and estimation of cross-species introgression intensity. We suggest that you get bpp version 4 as it contains all the functionalities of version 3.4, but runs much faster and supports multiple threads. Also the multispecies-coalescent-with-introgression (MSci) model is implemented in bpp4 only, and not in bpp3.4. The same control file works for both versions although bpp4.
The source code for the previous BP&P v3.4 is available in the links below:
bpp3.4a.tgzincludes the source code for all platforms, as well as executables for Windows.
.gz, you should change it back to
If you have questions about either bpp3.4 or bpp4, please post them at the google bpp discussion site.
BP&P replaces the old program MCMCcoal, which implements the Bayesian method of Rannala & Yang (2003) and Burgess & Yang (2008). Bo Xu has written a graphics user interface for BP&P, called bppX. The compiled executables are here for Windows, Mac OSX, and linux. You install (unpack and compile) the current version of bpp first, unpack the GUI bppX, and then go to Function-Configuration to specify the folder name for the bpp files. This may not be working with the new versions of bpp, such as 3.4 and 4.
Bruce Rannala has written another BPPgui. The executables are for Windows and Mac OSX. You can use this to prepare the bpp control files, and also read in the species trees in the MCMC sample file, produced by either bpp3.4 or bpp4. Please download from Bruce’s group web site.
Flouri T., Jiao X., Rannala B., Yang Z. (2018) Species Tree Inference with BPP using Genomic Sequences and the Multispecies Coalescent. Molecular Biology and Evolution, 35(10):2585-2593. doi:10.1093/molbev/msy147
Please also cite the following papers depending on the method you use:
If you use the MSci model: Flouri T., Jiao X., Rannala B., Yang Z. (2020) A Bayesian Implementation of the Multispecies Coalescent Model with Introgression for Phylogenomic Analysis. Molecular Biology and Evolution, 37(4):1211-1223. doi:10.1093/molbev/msz296
The program 3s implements likelihood ratio tests to test for gene flow between two closely related species.
The latest release (Dalquen et al. 2017) includes several improvements over previous versions:
The source code is available here
You can use 3s as it is, without any additional libraries installed. Use the following command (adapted to your system) to compile the source code:
gcc -O3 -o 3s 3s.c tools.c lfun3s.c -lm
However, we recommend installing the GNU Scientific library (GSL) as this will speed up computation of P(t) significantly, even if you run the program on a single core. Once GSL is installed, you can compile with something like this:
gcc -O3 -DUSE_GSL -o 3s 3s.c tools.c lfun3s.c -lm -lgsl -lgslcblas
Depending on how your system is set up, you might or might not have to specify the location of GSL using the
gcc -O3 -DUSE_GSL -I/usr/local/include -L/usr/local/lib -o 3s 3s.c tools.c lfun3s.c -lm -lgsl -lgslcblas
Finally, if you want to run 3s on multiple cores, you can compile with OpenMP support:
gcc -O3 -DUSE_GSL -I/usr/local/include -L/usr/local/lib -o 3s -fopenmp 3s.c tools.c lfun3s.c -lm -lgsl -lgslcblas
This should work out-of-the-box on current Linux systems with the GNU tool chain. On Mac OS X and Windows you need a compiler with OpenMP support.
Zhu T, Yang Z. 2012. Maximum likelihood implementation of an isolation-with-migration model with three species for testing speciation with gene flow.Mol. Biol. Evol. 29:3131-3142.
Dalquen D, Zhu T, Yang Z. 2017. Maximum likelihood implementation of an isolation-with-migration model for three species. Syst. Biol. 66:379-398.
PAML is a package of programs for phylogenetic analyses of DNA or protein sequences using maximum likelihood. It is maintained by Ziheng Yang and distributed under the GNU GPL v3. ANSI C source codes are distributed for UNIX/Linux/Mac OSX, and executables are provided for MS Windows. PAML is not good for tree making. It may be used to estimate parameters and test hypotheses to study the evolutionary process, when you have reconstructed trees using other programs such as PAUP*, PHYLIP, MOLPHY, PhyML, RaxML, etc.
paml4.9j.tgzon your local disk. (Make sure the extension of the file did not change with the dowload)
C:\Users\Ziheng. (Please replace this with your own user folder in the following examples.) This is the default user folder for me on Vista or Windows 7. On Windows XP, it is more unwieldly, somthing like
Settings\Ziheng. Use Windows Explorer to create a folder called bin inside your user folder, that is,
C:\Users\Ziheng\bin. Or if you are the boss of your PC, you may prefer the folder
C:\bin. Anyway, this is the folder for holding executable programs.
C:\Bin;or whatever folder you have created. Note that the semicolon separates the folder names. Be careful not to introduce any errors. Click on OK.
chi2.exe, etc.) from the
paml4.9j\bin\folder to the local programs folder
C:\Users\Ziheng\Bin\. After this, you can execute any of these programs from a command prompt whever you are. If you like, you can rename
codeml4.exerespectively, to include the version number. (You will then run the program by the command codeml4 instead of codeml.)
cmdand OK. You can right-click on the title bar and choose Properties to change the size, font, colour of the window.
cdto the folder which contains your user files, and type the command name. Here we
cdto the paml folder (suppose you have extracted the archive into
C:\Programs\paml4.9j\) and run program using the default files.
C: cd \Programs\paml4.9j\ codeml
Because there is no executable file called codeml.exe (or codeml.bat, etc.) in your current folder, the OS will look for it in the folders listed in the environment variable path. It will find and execute codeml.exe in the C:\Users\Ziheng\Bin folder. You can also specify the full path of the exectuable program, with something like the following:
Some codeml analyses use an amino acid distance (e.g., grantham.dat) or substitution rate matrice (e.g., wag.dat). You will then need to copy the necessary file to your current folder. Otherwise the program will ask you to input the full path-name for the file.
tar -xf paml4.9j.tgz cd paml4.9j rm bin/*.exe cd src make -f Makefile ls -lF rm *.o mv baseml basemlg codeml pamp evolver yn00 chi2 ../bin cd .. ls -lF bin bin/baseml bin/codeml bin/evolver
bin/folder inside your account. If not, create one.
cd mkdir bin
bin/folder in the initialization file for the shell. You can use more
/etc/passwdto see which shell you run. Below are notes for the C shell and bash shell. There are other shells, but these two are commonly used.
/bin/cshfor your account in the
/etc/passwdfile, you are running the C shell, and the intialization file is
.cshrcin your root folder. You can use more
.cshrcto see its content if it is present. Use a text editor (such as emacs, vi, SimpleText, etc.) to edit (or create, if one does not exist) the file, by something like
set path = ($path . ~/bin)
The different fields are separated by spaces. Here
. means the current folder, and
~/ means your root folder, and
~/bin means the bin folder you created, and
$path is whatever folders are already in the path.
/bin/bashin the file
/etc/passwdfor your account, you are running the bash shell, and the initialization file is .bashrc. Use a text editor to open
.bashrcand insert the following line
This changes the environment variable
PATH. The different fields are separated by colon
: and not space. If the file does not exist, create one.
After you have changed and saved the initialization file, every time you start a new shell, the path is automatically set for you. You can then
cd to the folder which contain your data files and run paml programs there. The following moves to the paml folder (suppose you have extracted the archive into Programs/paml4.9j/ on your account) and runs the program using the default files.
cd cd Programs/paml4.9j codeml
Note that Windows uses \ while Unix uses /, and Windows is case-insensitive while Unix is case-sensitive.
However, if you have a G5 or if you would like to compile the programs yourself, please follow the notes here.
I understand that the Apple XCODE is now automatically installed on your mac. Otherwise you will have to download and install the mac XCODE system, which includes the C compiler. Without a C compiler, you will get a “Command not found” error when you type gcc or cc at the command terminal.
src/folder and add
#at the beginning of the following line to comment it out:
CFLAGS = -O4 -funroll-loops -fomit-frame-pointer -finline-functions
#at the beginning of the line for either G5 or intel, depending on your machine, to uncomment the line.
For MAC OSX G5 uncomment the following line:
CFLAGS = -mcpu=G5 -O4 -funroll-loops -fomit-frame-pointer -finline-functions
For MAC OSX intel uncomment the following line:
CFLAGS = -march=pentium-m -O4 -funroll-loops -fomit-frame-pointer -finline-functions
!!!!!!!!!!!Save the file and compile after the programs are successfully compiled, delete the
.o files and move the executables to the
bin/ folder as follows:
rm *.o mv baseml basemlg codeml pamp evolver yn00 chi2 ../bin
You may want to
mv the executables into the
bin/ folder on your accounts rather than the paml main folder. And finally, if your current folder is not on your search path, you will have to add
./ in front of the executable file name; that is, use
./codeml to run codeml. See the notes for unix systems above.
A graphical user interface, called PAML-X, has been written by Bo Xu of Institute of Zoology, Chinese Academy of Sciences in Beijing. This is written in Qt and should run on Windows, Mac OSX, and linux, although the versions for OSX and linux may not be well tested.
Download PAML (see above), and also PAML-X (links below). Use of pamlX1.3.1 requires paml4.9 or later. When you run PAML-X for the first time, you need to specify the PAML folder name.
Yang, Z. 1997 PAML: a program package for phylogenetic analysis by maximum likelihood. Comput. Appl. Biosci. 13, 555-556.
Yang, Z. 2007 PAML 4: Phylogenetic Analysis by Maximum Likelihood. Mol. Biol. Evol. 24, 1586-1591.
The best way of running the programs listed below is by the command line. Here are links for command line tutorials on different operating systems.
An fairly extensive introduction to Unix commands, written by Tim Massingham for the Workshop on Computational Molecular >Evolution (CoME), is available here.