PopG genetic simulation program

[PopG icon here]

version 3.1

October, 2005

This is a one-locus, two-allele genetic simulation program for use by students. Earlier versions were called Simul8. At this web site there are archives that can be fetched for Windows, MacOS, 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.

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 directory 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.0
For MacOS X (Stuffit archive)
When the file popgosx.sit was downloaded, it should have created a folder (directory), PopG 3.0, with documentation, an icon graphic, and the PopG executable. Make sure these got into the desired directory. If the popgosx.sit archive was transferred without being unpacked, you could unpack it using Stuffit Deluxe.
For MacOS X (Disk Image archive)
When the file popgosx.dmg was downloaded, it should have created a folder (directory) on your desktop. Inside it you will find a folder PopG 3.1. Enter this folder and mark and copy out all of its contents, putting them wherever you want to. But do not try to run the program from within the original Disk Image folder. The folder PopG 3.1 contains the documentation, an icon graphic, and the PopG executable. The Disk Image file is compressed, and will not decompress properly on the old original version of Mac OS X, 10.1. If you have that, use the Stuffit archive.
For Linux or Unix
Put the popglinux.tar.gz file into the directory where you want the program to reside. If your system has the Gnuzip program for unpacking .gz archives, you can run it by typing gunzip popglinux.tar.gz, after which you use tar xvf popglinux.tar. This will create a folder (directory) called PopG_3.0 that contains these files.
For MacOS 9
When the file popgmac.sit was downloaded, it should have been unpacked into the component files (documentation, source code, and the PopG executable). Make sure these got into the desired directory. If the popgmac.sit archive was transferred without being unpacked, you could unpack it using Stuffit Deluxe.

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 MacOS 9 version is for PowerMac systems and will not run on older 68k Macintoshes. You can download an older 68k Macintosh version from our web site if you have such a system. The MacOS X executable is also run by clicking on the icon (it will not run by typing its name in a shell window).

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 MacOS 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.

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 and MacOS X or MacOS 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 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 MacOS 9 and MacOS 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:

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.

PopG was written by Joe Felsenstein, Hisashi Horino, Sean Lamont, Bill Alford, Mark Wells, Mike Palczewski, and Doug Buxton. 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.

Copyright notice

Copyright 1993-2005. 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 (at) u.washington.edu.

Joe Felsenstein
Genome Sciences Department
University of Washington
Box 357730
Seattle, WA 98195-7730, USA

email:   joe (at) gs.washington.edu