This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Biological Computation 20.181 Homework 3 In this assignment, you will get more experience writing functions that act on the tree data structure we outlined in class. Tree arithmetic. In this exercise, you will compute the average distance from the root of a tree to its leaves. In the last homework, you were given the task of printing branch lengths, now you will use those same lengths to do some simple 'tree arithmetic'. First, compute the average distance from root to leaf within a tree. Your function will use a codebase nearly identical to that of the previous homework, and should take the following form: def avgDistance(tree): #This function returns the average root to leaf distance #in a phylogenetic tree # #...insert code here # # return averageDistance Detecting outliers. When genes evolve faster or slower than expected, that may reveal important insight as to how natural selection is acting. Genes that are being repurposed by evolution to function in a new niche, may evolve more rapidly in that niche/species -- this process is sometimes called...
View Full Document
This note was uploaded on 11/11/2011 for the course BIO 20.010j taught by Professor Lindagriffith during the Spring '06 term at MIT.
- Spring '06