hw4 -...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
http://www.writely.com/RawDocContents.aspx?docID=dggds9kn_10. .. Biological Computation 20.181 Homework 4 Recall the basic formula for inferring gene trees: for each possible tree: calculate score(tree) report best tree In this assignment, you will write Python code to evaluate the parsimony score of a particular tree. You will be provided with both the tree topology and the sequences of leaf nodes. We will need to expand our simple data structure to accomodate this new information associated with each node. For example, tree = {'name':'a', 'left':None, 'right':None, 'data':chars } where chars is a list of characters present at each position in our sequence alignment, for example. .. chars = [ ['A'], ['G'], ['G'], ['A'], ['T'] ] Why a 'list of lists'? This seems unnecessary for leaf nodes, where we know the exact sequence of nucleotides. But for internal nodes, there may be some positions, in which two or more nucleotides are equally consistent with the observed data. Such situations should be familiar
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

hw4 -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online