![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMkGHt0GS69p0Sqpk3Asb5Eb7veRArquax6gEA_nyuxhPGfS05-OCJr6a0AlzNQNXTrULIlQWTEUvgZA50akswz3p5Un6JfBcVcWnz101a7C1mqpkFgw5hNJ02MayICsvP9OmleNWvTyeg/s320/Screen+shot+2010-11-23+at+3.26.21+PM.png)
In Joe Felsenstein's book, Inferring Phylogenies, he uses some data from Vincent Sarich to demonstrate UPGMA. Although I was tempted to "declare victory and go home", I decided to test my version of UPGMA with that data. And that turned up bugs in both the main
upgma
and the plotting code! So I guess the moral is: test, test, and test again.The top figure is a scan from the book. Here is what my program plotted:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv3B4yx7PYVNBa7TZOUBWCf1UqpeVF_w3gtHOE14bW2qCPo9A9SnxsVlg7q760fXXKmFvMKuBzQgehGP_gYws7RbkNR6y_CO_ebPjc_G2D9pWl77uImX007Onf2YUNipKodtl4hH0CMoqM/s320/Screen+shot+2010-11-23+at+3.39.01+PM.png)
It looks pretty good to me.
The data are immunological data from eight species in this order: dog, bear, raccoon, weasel, seal, sea lion, cat, monkey. The data are in this distance matrix:
If you grab the zipped files (here) and run them, you'll see a lot of diagnostic output when
debug == True
. As well as all the branch lengths.