BIEB 143. Computational Modeling in Ecology and Evolution. Spring 2017

Lin Chao, Scott Rifkin (professors). Chao Shi (IA)
General information and announcements
Welcome to the Spring 2017 web page for Computational Modeling in Ecology and Evolution. All course material and announcements will be posted or linked here.
- This is a course for students who want to improve their ability to use quantitative, mathematical, and statistical models in biology by learning to write and use computer code.
- Students will develop their own programs instead of using programs prepared by software engineers.
- A degree of familiarity with and desire to work with mathematical reasoning is required.
- Topics for modeling may include population genetics, ecological dynamics, evolutionary game theory, neural networks, and sexual selection.
- This is not a course for students who already know how to program. Only basic beginning code writing will be taught. All programming will be in the language R.

- We will use the free, open source computer language R in this course. You can download R here and you can also find more information about R as well as introductory tutorials here or by searching on the web. R is a programming language that is specifically geared towards statistical analyses, and it is the pre-eminent statistical software package in the world, especially in ecology and bioinformatics.

- You can run R by itself just like you would run any other program, but it has a tendency to make windows pop up all over your screen. We will use R Studio which is an R programming environment. Essentially, it is a nice program that keeps all the R windows together and makes it easy to switch from one to another.

Weeks 8-10 - Game Theory
- Friday, May 26 handout & homework

To output your chromosome in the appropriate format, use the following code:
In this command, the chromosome is stored in the variable superDuperPlayer1_20. Replace this with whatever variable name you use to store your player
This gives output like:
except that you will have a bunch more numbers where the ... is above.
Be sure to modify this code appropriately for your player with a chromosome length of 200.

Cut and paste this output from RStudio into the web form.
Submit this form once for each of your organisms (20 and 200).
Note: if you are trying to output the code for entering your 200 player and it is getting truncated, go to this web page and follow the instructions to fix it.
Your ultimate (project 3) organisms

Project 2 Organisms

New and Improved Project 1 Organisms

Project 1 Organisms

To read the player 1s from the class into R, enter the code below:
or go here so you can see how this code works and cut and paste.

Enter your player 1 results here.
Be sure to enter your player name in the next open row or column. You are home (rows) when you are playing on your computer. Your opponent is visitor. Enter your final frequency (# of organisms) into the appropriate box.
Weeks 6 and 7 - Neural Networks and Sexual Selection
Week 5 - Epidemiology

Simulation of a grid 751 x 751 with recovery & immunity. Colors: green = vaccinated, yellow = susceptible, red = infected, blue = recovered & immune. Proportion vaccinated goes from 0.1 to 0.9
- Wednesday, May 3 handout & homework | Template
Week 4 - Population Genetics
- Wednesday, April 26 handout & homework | Template
- Friday, April 28 further explorations (after you have finished the ones above)
Due on Tuesday 11:59PM: (1) Code and discussion as specified in the template (#6-#8 from Wednesday). (2) Code and a discussion of what you discovered through your computational experiments for at least one of #2-#8 from the explorations handout.
Week 3 - Poisson
- Friday, April 21 handout: Cookies! | Template
- Wednesday, April 19 handout & homework | Template

Load the cookie data into R by typing (or cutting and pasting):
It will load in a vector variable called cookieData. Make sure it shows up in your environment.

If you want to compare the data from this year to previous years:
- 2016 data:
It will be stored in a variable called cookieData2016
- 2015 data:
It will be stored in a variable called cookieData2015
- 2014 data:
The 2014 data will be stored in a variable called cookieData2014
- 2013 data:
The 2013 data will be stored in a variable called cookieData2013
Week 2
Week 1
Homework and quiz info

Turn in your homework using the template provided (even if not everything is working) by emailing to: ucsdbieb143 {at sign} gmail dot com
If relevant, include a write up indicating whether program worked or not and parts of program you do not understand. If it did not work, explain what you tried and where you think that bug could be. Put the title of the program as the subject line. Homework is due at midnight, Tuesday night/Wednesday morning unless stated otherwise Please use the templates to organize your homework code. That way Chao can just run it all and then annotate your code. If any part doesn't work, as always, say what you tried to get it to work and where you think the bug might be. You can put this in comments in your code.

Please watch for emails about this class and homework from any of your instructors.

Creative Commons License
Unless superceded by preexisting copyrights or licenses, material developed for UCSD BIEB143 Spring 2017 by Lin Chao and Scott Rifkin is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.