NetLogo banner

 Home
 Download
 Help
 Resources
 Extensions
 FAQ
 References
 Contact Us
 Donate

 Models:
 Library
 Community
 Modeling Commons

 User Manuals:
 Web
 Printable
 Chinese
 Czech
 Japanese

  Donate

NetLogo User Community Models

(back to the NetLogo User Community Models)

genetics_applet

by Stephen Ratchford (Submitted: 11/20/2009)

[screen shot]

Download genetics_applet
If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".

(You can also run this model in your browser, but we don't recommend it; details here.)

WHAT IS IT?

This is a model of population genetics. The population has three genes (size, color and shape), each with a dominant and recessive phenotype, that are passed along to offspring from a mated pair in a Mendelian fashion. The model runs in an equilibrium fashion if criteria for a Hardy-Weinberg equilibrium hold; that is, there is no mutation, no migration, no selection, random-mating and a large population. Students can manipulate the model so that there is selection against any one phenotype, there is preference by the female for one of the phenotypes, or there is a large or small population.

HOW IT WORKS

Organisms represented by colored shapes move randomly around the world. If a female of appropriate age (25) finds and unmated male, she mates and has one offspring. Offspring have 50% chance of being female, 50% chance of being a male. Traits of the mother and father are passed on to offspring in a Mendelian fashion. For each of the three genes, parents are homozygous dominant, hetrozygous or homozygous recessive. The model calculates the probability of possible allele combinations from the mother and father and assigns the genotypes to the offspring based on the calculated probability. Calculations are based on independent assortment of the genes.
After a female mates, her age is reset to zero, such that she must wait a short time (25 time steps) before mating again. Offspring can mate in a similar fashion, passing on their genes to their own offspring.

Carrying capacity is the limit to the populations size. After carrying capacity has been exceeded, al individuals have a likelihood of dying at a rate of [(population size - carrying capacity) / carrying capacity]

Students can manipulate selection against any one phenotype by choosing the phenotype and setting a "selection_against_factor" that either slowly (low) or quickly (high number) eliminates that phenotype from the population. This occurs at all times, regardless of whether the carrying capacity has been exceeded or not. Selecting a phenotype and setting the "selection_against_factor" at zero is the same as choosing "no one".

Students can manipulate whether females have a mate preference or not by choosing a phenotype that is preferred and setting the "%preference" to determine how often the un-preferred phenotype gets to mate. Setting the "%preference" to zero is the same as the female preferring "no one"; that is mating with both phenotypes equally.

HOW TO USE IT

Students select a starting population size, as well as carrying capacity for the population.

Students can then select the approximate % of the population that will have the recessive phenotype (q2) for each gene. The model then calculates the approximate number of individuals in the population that are heterozygous (2pq) and homozygous dominant (p2) such tha the starting population is in an equilibrium.

Students can manipulate selection against any one phenotype by choosing the phenotype and setting a "selection_against_fator" that either slowly (low) or quickly (high number) eliminates that phenotype from the population.

Students can manipulate whether females have a mate preference or not by choosing a phenotype that is preferred and setting the "%preference" to determine how often the un-preferred phenotype gets to mate.

THINGS TO NOTICE

Note that the model runs at an equilibrium (that is, the percentages of the phenotypes do not change over time) if there is no selection, random mating, and the population is large enough.

THINGS TO TRY

Does the model run at equilibium for all starting phenotype percentages?
What happens if the population is small?
What happens if you select against a phenotype?
What happens if you have mate preference for one phenotype over another?
What happens if you change these while the model is running? Can you reverse a trend?
How long does it take to remove a phenotype completely from the model under each circumstance?

EXTENDING THE MODEL

How might you change the model to include mutation and migration?
How might you code the model so males have to be of a certain age to mate?
Code could be wrritten in the model to include organisms dying after a certain age or after they have had a certin number of offspring.

NETLOGO FEATURES

This section could point out any especially interesting or unusual features of NetLogo that the model makes use of, particularly in the Procedures tab. It might also point out places where workarounds were needed because of missing features.

RELATED MODELS

Other models of population genetics can be found at
http://ccl.northwestern.edu/netlogo/models/community/sheep-selection (Ed Hazzard)
http://ccl.northwestern.edu/netlogo/models/community/sheep-fussyfemales (Ed Hazzard)
http://ccl.northwestern.edu/ProbLab/Genetics.html

After looking at the code for sheep-selection and sheep-fussyfemales, I think these models have a problem in that the offspring can inherit genes from more than one father.

CREDITS AND REFERENCES

This section could contain a reference to the model's URL on the web if it has one, as well as any other necessary credits or references.

(back to the NetLogo User Community Models)