PopG genetic simulation program
version 3.3
October, 2008
This is a one-locus, two-allele genetic simulation program for use by
students. Earlier versions were called Simul8.
At our distribution server
evolution.gs.washington.edu in folder pub/popgen
there are archives that can be fetched for Windows, Mac OS, Mac OS X and Linux.
These contain executables and documentation. A source code archive is
also available there which has support files for compiling your own version
of the program in these operating systems. Normally you will not need the
source code and you will not need to recompile the program. The source code
can also be used to make versions for other varieties of Unix.
See below for links that will enable you to fetch the archives.
Getting PopG
You can fetch PopG using the links below.
- For Windows: popgwin.exe
A self-extracting zip archive containing the files of the Windows version
for Windows 95, 98, NT, 2000, me, xp, Vista and as far as we
know all other recent versions of windows.
- For Mac OS X: popgosx.dmg
A Mac OS X version which can be run on any version of Mac OS X as a
Universal native-mode executable. It is a .dmg "disk image" file.
- For Linux: popglinux.tar.gz Linux version, as a Gnuzip'ed tar archive of
the executables and documentation.
There are also executable versions for some older kinds of computers, including
earlier Unix workstations, pre-Windows DOS systems, and earlier Macintosh
processors. These can be fetched from folder old at our PopG site. Most users will not need to
use these older executables, but if you do, you should start by reading the
README file in that folder.
The documentation
The documentation files are included in the fetchable archives, and consist
of this web page. The latest version of it can be read on the Web
using this link.
Unpacking the archives
After fetching the archives for Windows, for Mac, or for Linux/Unix, you need
to unpack them. Do this:
- For Windows
- Make sure the popgwin.exe file is in the folder where you want
the program to be. The click on it. It will run and unpack itself into
a set of files, including this documentation file and the
PopG executable. These will be in a folder (directory) called PopG_3.3
- For Mac OS X
- After the disk image has been downloaded, you should click on it to
mount it. A new folder should open showing the contents of the disk image.
It will have a folder (directory) PopG_3.3 with
documentation, an icon graphic, and the
PopG executable). Copy the PopG_3.3 folder to some other
place on your system, outside of the disk image (such as your desktop). Do
not try to use it inside the disk image.
- For Linux or Unix
- Put the popglinux.tar.gz file into the folder where you want
the program to reside and do
tar xvfz popglinux.tar.gz. This will create a
folder (directory) called PopG_3.3 that contains these files.
Running the program
To run the program on Linux or Unix systems you should simply type popg
while in the proper directory.
On Windows or Macintosh systems you simply click (or double-click) on the
program icon.
The program uses a random number generator. It should give you a different
result every time it is run.
The program opens a window, and there are three menus that you can use to
control it. On Windows and Linux/Unix systems the menus are in the upper
left of the main window. On Mac OS they are in the upper left of your
desktop window. The windows are File and Run. Most of their menu items
can selected using the mouse or else (in the Windows and Macintosh cases) by
typing the appropriate character on the keyboard. On Windows systems
these are Control characters such as Control-C (holding down the
Ctrl key while typing C). On Macintosh systems they are
Command characters such as Command-C (holding down the Command key while typing C.
The Run menu
This contains four menu items, Continue w/, Continue, New Run, and Restart.
- New Run (Control-N or Command-N)
- Initially only New Run is available. It brings up a box with
parameter values that can be changed, marking then with the mouse and using
backspace and/or delete keys, and typing modified values in. When these are
given the desired values, clicking the OK box will dismiss the
parameter values and start the run. If at any point you want to restart
the run with different parameter values, you can select New Run
and you will be given a chance to change the parameters.
- Continue w/ (Control-C or Command-C)
- This choice continues the run, for the same number of generations as
before (which is shown in the menu).
- Continue
- This continues the run, but presents a box allowing the user to first
change the number of generations run in the continuation of the run.
- Restart (Control-R or Command-R)
- This restarts the run with the same parameter values as before. If you
want to change some of the parameter values, use New Run instead.
The File menu
This contains four menu items, which may not all be available. They are
Save, Print, About and Quit.
- Quit (Control-Q or Command-Q)
- This is self-explanatory: the program quits.
- Print (Control-P or Command-P)
- This sends the present image of the graph to the system's print queue.
On Windows, Mac OS X or Mac OS 9 systems it will present the user with a
"print box"
in which various options can be selected. On Linux or Unix systems it will
send the graph as a Postscript file to the system's lpr
printing command.
- Save (Control-S or Command-S)
- This saves the graph as a Postscript file, allowing the user to
select the name of the file (the default name is output.ps).
- About (Control-A or Command-A)
- Displays the program's copyright notice.
Compiling it yourself
Most people will not have to compile the program themselves, and thus they
won't need a C compiler for it. But if you want to modify the program, or
if you want to port it to a different version of Unix, you will need to
compile the program. If you don't need to do any of these, you can just use
the executables that we distribute.
If you do need to compile the program, first download from our site the
appropriate source code archive, and make sure it is extracted into a folder.
Instructions for downloading and compiling the source code are available
on our server, where you will find
a web page
with those instructions.
There are downloadable files that contain source code, compiling
instructions, and compilation support files for Windows, for Linux and Unix
systems, and for Mac OS 9 and Mac OS X systems. After you download the correct
source code archive, use your browser to read the compiling.html
web page in the main source code folder. It contains instructions for
compiling in each of these operating systems.
Simulating with PopG
This program simulates the evolution of random-mating populations with two
alleles, arbitrary fitnesses of the three genotypes, an arbitrary mutation
rate, an arbitrary rate of migration between the replicate populations, and
finite population size.
The programs simulate ten simultaneously evolving populations with you
specifying the population size, the fitnesses
of the three genotypes, the mutation rates in both directions (from A
to a
and from a to A), and the initial gene frequency. They also ask for a
migration rate among all the populations, which will make their gene
frequencies more similar to each other. Much of the time (but not always!)
you will want to set this migration rate to zero. In most respects the
program is self-explanatory.
When you make a menu selection that causes the program to run,
a graph of the gene frequencies of the A allele in each of the
populations will be drawn in the window. Note that the window can be
resized, and the graph should adjust to this.
There will also be a dashed curve that shows what the
gene frequencies would be in an infinite population (one with no
genetic drift). The graph can be printed using the Print
option of the File menu, or saved to a Postscript file using
the Save option in that menu.
Note that once the plot of the gene frequency curves reaches the
right-hand side of the graph, the program prints there the number of
populations that fixed for the A allele (ended up with a
frequency of 1.0) and the number that lost this allele.
The program can simulate a wide variety of cases, and you should
explore some of these. Here are some suggestions:
- Try cases with no mutation, no migration, and all fitnesses 1.0 so
that there is no selection. Does genetic drift in a population of
size 1000 accomplish roughly the same changes in 1000 generations as
genetic drift in a population of size 100 does in 100 generations?
By running a largish number of populations, can you check whether
the probability that an allele is fixed by genetic drift is equal to
its initial frequency in the populations?
- Try a case with no mutation or migration, with the A
allele favored by natural selection (with fitness of the AA
genotype set highest and fitness of the aa genotype set
lowest). Start with a small frequency of A. Is it always
fixed? If one starts with a single copy of the allele, how does
the probability that A is fixed compare with the selection
coefficient favoring it in the heterozygote (compared to the fitness
of the aa genotype? Is this fixation probability larger than
the one you would get with the same initial frequency with no
selection?
- Try overdominance (Aa having the highest fitness). Does
the gene frequency converge towards an equilibrium? Why does it
vary from this equilibrium frequency? How large do the selection
coefficients have to be to cause the gene frequency to stay away from
fixation or loss for large amounts of time?
- Try underdominance (Aa having the lowest fitness).
Is there a starting gene frequency that will result in some populations
heading for fixation, and others heading for loss? If you add a small
amount of migration, what will happen? if you add a small amount of
mutation in both directions?
- With migration but no selection or mutation, how much migration is
needed to make the gene frequency curves be quite similar to each other?
How much is needed to make them all end up at the same gene frequency?
How is that migration rate affected by the population size?
- With mutation but no migration or selection, how much mutation is
needed to cause the gene frequencies to converge on a mutational
equilibrium gene frequency? How does this value relate to the
population size?
- If an allele is selected against, can you set up mutation rates
that will maintain it at low frequency in the population?
You should be able to use the program to get a good feel for the
relative strengths of different evolutionary forces. It is worthwhile
trying many different kinds of cases and asking what values of
parameters are needed to make one evolutionary force be influential in
the presence of another.
Credits
PopG was written by Joe Felsenstein, Hisashi Horino, Sean Lamont,
Bill Alford, Mark Wells, Mike Palczewski, Doug Buxton, and Elizabeth
Walkup. I wrote the original
version of the program. Hisashi and Sean did the screen graphics for
IBM PC and the first part of the Postscript printing system. Bill
greatly improved and expanded the Postscript printing and
the X windows graphics. Mark Wells did the
original Macintosh version. Mike Palczewski greatly improved the Windows,
Macintosh and X Windows graphical user interface, and Doug Buxton modified the
program to the 3.0 version and prepared the executables for different
operating systems. Elizabeth Walkup improved the X windows interaction
and prepared version 3.3.
Copyright notice
Copyright 1993-2008. University of Washington and Joseph Felsenstein. All
rights reserved. Permission is granted to reproduce, perform, and modify
this program. Permission is granted to distribute or provide access to this
program provided that this copyright notice is not removed, this program is
not integrated with or called by any product or service that generates
revenue, and that your distribution of this program is free. Any modified
versions of this program that are distributed or accessible shall indicate
that they are based on this program. Educational institutions are
granted permission to distribute this program to their students and staff
for a fee to recover distribution costs. Permission requests for any other
distribution of this program should be directed to license @ u.washington.edu.
Joe Felsenstein
Department of Genome Sciences
University of Washington
Box 355065
Seattle, WA 98195-5065, USA |
email: joe @ gs.washington.edu