VisualPopGen


User’s Manual

This software was produced by students in Software Engineering I (CSCI 3250-001; Fall 1998) and Software Engineering II (CSCI 3350-001; Spring 1999) at East Tennessee State University. The course was taught by Dr. Don Gotterbarn, Department of Computer and Information Sciences. The "client" for whom the software was designed was Dr. Dan M. Johnson, Department of Biological Sciences. VisualPopGen may be obtained free from the following web site:

For software related questions contact Dr. Don Gotterbarn at .

For biological questions contact Dr. Dan M. Johnson at .

Table of Contents

Introduction 2

Overview of Software Package 2

System Requirements 2

Installing VisualPopGen 2

Biological Background 4

Evolutionary Forces, Genetic Parameters, and Default Values 4

Definition of Evolutionary Forces and Genetic Parameters 5

Equations Implemented in Sequential Order 7

Familiarizing Yourself With VisualPopGen 8

Overview 8

Hot Key List 10

Menu Options 11

File Menu Options 11

Generations Menu Options 11

Help Menu Options 12

Saving and Printing Graphs 13

Opening a Saved, Non-Bitmap, Graph 13

Printing a Graph 13

Saving Graph as a Bitmap Image 15

Example Scenarios 16

Simulating Hardy-Weinberg Equilibrium 16

Simulating Effects of User Entered Parameters 17

Viewing Composite Graphs 18 .

Glossary of Terms 19

1VisualPopGenuser_man

Introduction

Overview of Software Package

VisualPopGen software package is designed for students in the Department of Biological Sciences (Principles of Biology Lab III) at East Tennessee State University. This program calculates the sequential effects of genetic drift, inbreeding, selection, gene flow, and mutation on the proportion of a population’s gene pool comprised of the second of two alleles (for definitions of these terms look under subheading Biological Background). Simulations are usually for 100 generations, but they can be conducted for as few as 10 or as many as 1,000 generations. VisualPopGen’s main purpose is to help the user explore the effects of various evolutionary forces on a population’s gene pool by providing graphs of the calculations, allowing the user to visualize the changes.

System Requirements

VisualPopGen is designed to run on IBM compatible machines with a Windows 95, 98, NT 4.0, or compatible operating system. If the operating system is Windows NT, Service Pack 3, which is available free of charge, must be installed on the system. The software is designed to be used with a keyboard or a mouse, and is designed for use with a SVGA color monitor set at 800x600 (256 colors) resolution or higher. Users with lower resolution models or with monochrome monitors will be unable to run this software. The software requires that a printer be correctly attached to any system to produce graph printouts. It is highly recommended to use a color or laser printer for the best printout quality. If a dot matrix printer is used, the distinction between graphs on a composite printout may be unclear.

Installing VisualPopGen

In order to run VisualPopGen, the installation program will install necessary files onto the system. The installation program detects the necessary requirements for each system.

If installing from a CD:

1. Place the CD in to the CD-ROM drive on the computer. At this point the CD should

automatically run. The install shield will walk the user through the installation

process. If the CD does not automatically run, follow the following steps for

drive installation.

  1. Double left click the My Computer icon from the Windows desktop environment.
  1. Double left click the Control Panel option.
  1. Double left click the Add/Remove Programs option.
  1. Choose the Install option then press Next.
  1. If VisualPopGen is not on a floppy disk the browse option may be used to find it on another drive.
  1. Choose setup.exe and left click Next.
  1. After the installation is complete the install shield will ask the user to reboot the system. This reboot is necessary. The VisualPopGen icon will not appear until the reboot is complete.

After the system has rebooted, the VisualPopGen menu option will be available on the Programs section of your Windows environment. You can place the mouse pointer over the VisualPopGen item, then double click on the submenu that appears.

Biological Background

Evolutionary Forces, Genetic Parameters, and Default Values

EvolutionaryForce / Genetic Parameter / Name / Expected Range / Default Value / Graduation
Genetic Drift / N / Effective population size / 1 - 1,000,000 / 1,000,000 / 1
Inbreeding* / F / Inbreeding coefficient. / 0 – 0.5 / (1/(2N)) or 0* / 0.001
Selection / w11 / Relative fitness of the three possible genotypes. / 0 – 1 / 1.00 / 0.01
w12 / 0 – 1 / 1.00 / 0.01
w22 / 0 – 1 / 1.00 / 0.01
Gene Flow / m / Proportion of new migrants per generation / 0 – 1 / 0.000 / 0.001
qm / Proportion of allele 2 in migrants' gene pool / 0 – 1 / 0.000 / 0.001
Mutation / u / Forward mutation rate. (A1->A2) / 0 – 1 / 0.0000000 / 0.0000001
v / Back-mutation rate.
(A2->A1) / 0 – 1 / 0.0000000 / 0.0000001
q0 / Initial proportion of A2 in the population's gene pool / 0 – 1 / 0.500 / 0.001
Generations / Number of generations involved in calculations. / 10 - 1000 / 100 / 10

*F=1/2N if Inbreeding is activated for simulation; F=0 if it is not.

Definition of evolutionary forces and genetic parameters:

Genetic Drift:Parameter (N) –Effective breeding population size.

When N is small, only a small number of alleles (2N) comprise the gene pool passed from one generation to the next. Given these circumstances, allele proportions may be affected by chance (random) sampling errors. Changes could be positive or negative (flip of a coin). Genetic drift may lead to fixation of an allele by accidentally failing to pass on alternative alleles during one generation.

Inbreeding:Parameter (F) – Inbreeding coefficient.

Breeding among relatives causes some individuals who would otherwise have been heterozygotes to be homozygous because the two alleles in their genotype are “identical by descent.” The inbreeding coefficient, F, is the proportion by which the expected heterozygote genotype proportion is reduced due to inbreeding. Half of that proportion is added to each of the two homozygous genotype proportions. The value of F increases by a factor of (1+F) each generation. Inbreeding will not change allele proportions (p q) unless combined with selection--the only evolutionary force that acts directly on genotypes.

Selection:Parameter (w11)– Relative fitness of one homozygous genotype (A1A1)

Parameter (w12)– Relative fitness of the heterozygous genotype (A1A2).

Parameter (w22)–Relative fitness of one homozygous genotype (A2A2).

The most fit genotype must be assigned a relative fitness of 1, the others (those being “selected against”) are assigned relative values (0 <= w <= 1).

Directional selection involves selection against one of the homozygotes but not the other. This type of selection tends to favor one allele. This may result in fixation of the favored allele due to complete elimination of the alternative allele.

Stabilizing selection involves selection against both homozygotes. This type of selection results in an equilibrium (q stops changing). This situation results in a “stable polymorphism,” where both alleles remain present in the gene pool.

Note: Selection tends to have a stronger effect on allele proportions when both alleles are relatively frequent. If nearly all alleles are of one kind, there is little genetic variation among individuals, and few experience their selective disadvantage; thus changes in q become smaller per generation.

Gene flow:Parameter (m) – the proportion of new migrants in a breeding population each generation.

Parameter (qm) – the proportion of second allele (A2) among new migrants.

The effect of migrants entering the breeding population with their own characteristic allele proportions may be very great if a high proportion of the population (m) are recent migrants each generation, and those migrants have allele proportions (qm) that are quite different from those in the rest of the population. But if the proportion of migrants is low, or if allele proportions are similar in residents and migrants, the effect of gene flow may be more similar to that of mutations (an occasional source of alternate allele).

Mutation:Parameter (u) – Forward mutation rate (A1 --> A2).

Parameter (v) – Backward mutation rate (A2 --> A1).

Mutation is not considered an important force in changing allele proportions. The importance of mutations is as a source of alternative alleles, some of which might become abundant in a population due to genetic drift or to selection.

Mutation & Selection. To illustrate the interaction of mutation (a source of alternative alleles) and selection (a potentially strong force changing allele proportions), start with q0= 0 so that A2 must be introduced by mutation.

Purifying selection. Start with only one allele (A1) in the gene pool (set the initial value of q to 0); then assign realistic mutation rates that cause introduction of the second allele (A2); and implement selection against the mutant by assigning w22 the lowest value, and w11 = 1.

Progressive selection. Start with only one allele (A1) in the gene pool as above; use the same realistic mutation rates; and implement selection that favors the mutant allele (w22 = 1; w11 < 1).

Equations Implemented in Sequential Order

Allele proportions, conventionally called "gene frequencies," of the first generation parent population, must be specified by the user unless the default value q0 = 0.5 is accepted.

q0{q0, proportion of second allele (A2) in gene pool at start of simulation}

p0 = 1 - q0{p, proportion of first allele (A1) in gene pool}

{NOTE: p + q = 1 because only two alleles comprise the gene pool.}

{NOTE: Subscripts for qand p below indicate sequential calculations within each generation. All equations are implemented each generation, but default parameter values preclude some evolutionary forces from affecting allele proportions unless they are activated and their genetic parameters are assigned other values by the user.}

Genetic Drift

q1 = q0+ (p0q0 / 2N)1/2{N, effective population size; default N = 1,000,000}

p1 = 1 – q1

Inbreeding & Selection

q2 = (((p1q1 - Fp1q1)w12 + (q12 + Fp1q1)w22) /

((p12 + Fp1q1)w11 + (2p1q1 - 2Fp1q1)w12 + (q12 + Fp1q1)w22)))

p2 = 1 – q2

{F, inbreeding coefficient; default F = 0 if no inbreeding,

or F = 1/2N if inbreeding is being simulated}

{F increases each generation, Fg+1 = Fg (1+F)}

{w, relative fitness of genotype; default w11 = w12= w22 = 1.00}

Gene Flow

q3 = q2 – m(q2 – qm)

p3 = 1 – q3

{m, proportion of new migrants per generation; default m = 0}

{qm, frequency of A2 in migrants; default qm = 1}

Mutation

q4 = q3 + up3 – vp3

p4 = 1 – q4

{u, forward mutation rate (A1->A2) per gene per generation; default u = 0}

{v, back mutation rate (A2->A1) per gene per generation; default v = 0}

The resulting gene pool represents the next generation parent population.

q0 = q4

Repeat for a specified number of generations. {default = 100 generations}

{Note: The equations above were adapted by Dan M. Johnson from Population Biology: The Evolution and Ecology of Populations by Philip W. Hedrick, published by Jones and Bartlett Publishers, Inc., in 1984.}

Familiarizing yourself with VisualPopGen

Overview

This section describes the graphical user interface of VisualPopGen, including the graph tabs and menu options.

Open the VisualPopGen program by double clicking your mouse on the VisualPopGen

icon. You should see the VisualPopGen program open. The program will display one parent window containing five property pages (tabs) representing four (4) individual graph pages and one composite graph page. Only one graph page will be active containing the default parameter values when no genetic forces are selected at initial program startup. Only graph pages containing active graphs may be selected. The inactive graphs will not be accessible until you select the File->New main menu item. If you select the graph option New, from the File menu, the next available inactive graph page will become active and its parameters will be set to the default values. After four (4) graphs have been made active the File->New menu option will produce an error message if selected. If two or more graphs are active at any given time the Composite page will be active as well. Otherwise the composite page will remain inactive.

At the bottom left corner of each graph page will be 4 tabs containing the names of the graph pages. These names will be inactive as long as the current parameter values have been used to calculate the current graph. This tab becomes bolded then that graph page’s current parameter values are not represented by the existing graph. This signals the user to Plot the graph again to see the effects of the changed parameter values.

Each graph page will consist of the following:

•A label identifying the name of the graph. The default is “PlotX” where X is the graph number and the Composite page is named “Composite.” The label will be on the tab that corresponds to the graph. You will have the option to rename this label (a maximum of 15 characters long).

•A list of evolutionary forces with a corresponding check box to the left of each. An evolutionary force will be active when its box is checked and inactive when cleared.

•A list of the genetic parameters with a corresponding text box to the right of each parameter. The text boxes will contain up and down arrows for using the mouse to increment/decrement the numeric values contained in the text box. If the user wishes to enter the text from the keyboard the Tab button must be pressed before input will be accepted. After a value in a text box has been changed, the new values will not be accepted until the user places the mouse pointer somewhere outside of the text box and clicks the left mouse button.

•Each text box for a genetic parameter will initially be inactive until the relevant

evolutionaryforcecheck box has been selected.

•A pane with a blank x/y graph. Axes of the graph will be labeled q, the proportion of the second allele, (on the yaxis) and Generations Over Time (the xaxis).

•A Reset button to reset a graph to its default parameters.

•A Plot button to graph the results of the current simulation. If the Plot button is selected, the mouse button can be held down, or the Enter button on the keyboard can be held down, and the graph will repeatedly re-calculate graphs using current parameter values. This is especially interesting if chance phenomena (genetic drift, mutation) are activated so that each simulation is expected to be somewhat different.

The composite page will consist of the following:

•A pane with a blank x/y graph. The axes of this graph will be labeled Proportion q (the yaxis) and Generations Over Time (the xaxis).

•A list of graphs held in the Data Module and a corresponding check box for each. Checking this box for a graph will include that graph in the composite graph.

•A pane listing the genetic parameters for any graph selected by the user. Only one set of parameters may be selected at a time.

Hot Key List

File / ALT + F
New / CTRL + N
Open / CTRL + O
Save / CTRL + S
Save As
Save All
Save As Bitmap / CTRL + B
Print / CTRL + P
Composite
Graph1
Graph2
Graph3
Graph4
Exit
Generations / ALT + G
Help / ALT + H
Help (Online Help) / F1
About

Note: The user will be able to get through the main menu by using the tab key.

Menu options

File Menu Options

New (Activates new graph page...if an inactivepage exists. If this option is selected and no inactive page is available an error message will appear)

Open(Opens a graph using genetic parameters stored in a disk file.)

Save(Save active graph in focus to a disk file. Use this option if the parameters may be changed at a later date.)

Save As Bitmap(Save active graph in focus under a new name, 15 characters in length, as Bitmap (.BMP) graphics format. Use this option if the graph will be printed at a later date but not changed.)

Save All (Save all active graphs using their respective tab names. All graphs may be opened and changed at a later date.)

Print(Activates popup submenu to select graph(s) to print. Then brings up a Print Dialog box. The default setting will be for color printing. If a color printer is not available, or the user wishes to print in grayscale, this option must be selected. Graphs may only be printed in Portrait format.)

This is the popup submenu when you select Print:

Print (Print the selected graphs.)

------

Default Printer (Shows the default printer the system uses.)

Composite (Select composite page to print.)

Graph1 (

Graph2 Any active graphs that you wish

Graph3 to print will be selected (checked) here.

Graph4 )

Scale(Allows user to select grayscale or color option for

printing)

Exit(Quit program.)

Generations Menu Options

Set Number of Generations(Allows user to select from 10 to 10,000 generations for the simulation)

Help Menu Options

Help(Help: Online Users Guide to VisualPopGen.)

About(About screen: The Team)

The VisualPopGen Team

Phase 1:Phase 2:Phase 3:

Project ManagerProject ManagerProject Manager

Roger SnodgrassRoger SnodgrassRoger Snodgrass

Configuration ManagersConfiguration ManagersConfiguration Manager

David MumpowerDavid MumpowerJennifer Smith

Jennifer SmithJennifer Smith

Requirements TeamTesting TeamTesting Team

Melanie TimbsAaron UmbargerChris Simons

Jay K. SingletonWendi WardenJay K. Singleton

Melanie Timbs

Sushma Patel

Preliminary Design TeamTools/User Manual TeamTools/User Manual Team

Edward HoDavid BlairWendi Warden

Sushma PatelShannon WhittShannon Whitt

Chris SimonsJay K. SingletonDavid Blair

Arlene MilesArlene Miles

Testing TeamDetailed DesignCode and Unit Testing

Brandon DoranMelanie TimbsAaron Umbarger

Shannon WhittSushma PatelDavid Mumpower

Eric WilhoitBrandon DoranEdward Ho

Brandon Doran

Eric Wilhoit

Tool/User Manual TeamCode and Unit TestingOther Contributors

David BlairEdward HoDoug Harris

Aaron UmbargerChris SimonsTodd Hawthorne

Arlene MilesEric WilhoitRob Kubicki

Wendi WardenBrian Luethke

Kate Tebeau

James Thomas

Dr. Dan M. Johnson

Dr. Don Gotterbarn

Saving and Printing Graphs

Opening a Saved, Non-Bitmap, Graph

To open a saved, non-bitmap, image the user must have a graph saved and the location of the saved graph must be known to the user. First left click on the File menu option and then left click on the Open option. From there a window will appear asking for the user to select a file to open. Choose the correct file to open and press the OK button. The graph will appear in the Visual PopGen environment in the first available inactive graph page. If there are no inactive graph pages the user must close one active graph, making room for the new graph.

Printing a Graph

When printing a graph, the user will left click once on the File menu option and left click on the Print menu option. A window will appear asking the user to check the boxes next to the graph(s) they wish to print. After the user chooses the graph(s), left click on the Print button in this window. Another window will appear asking for the printing destination. This option should default to the printer attached to the system (user cannot perform the print option unless there is a working printer attached to the computer or network the computer is on). Left click on the OK button once the correct printer is set as the working printer. . If multiple printers are used on the system in which Visual PopGen is installed the user must choose one by entering the Print Setup menu under the File menu. This screen will also allow the user to print multiple copies if needed. Select the correct printer from the Name box and left click on the OK button to activate the print option.