This tutorial describes how to convert a location-annotated MCC to KML for visualization in Google Earth. The tutorial uses the MCC tree generated in Tree summary. For KML conversion, download the phylogeo.jar. To map the MCC tree in Google Earth, we have to associate each location with a particular latitude and longitude. To this purpose, prepare a tab-delimited file including each location, its latitude and longitude. For the H5N1 example, this should look like this:
Fujian 25.917 118.283 Guangdong 22.87 113.483 Guangxi 23.6417 108.1 Hebei 39.3583 116.6417 Henan 33.875 113.5 HongKong 22.3 114.167 Hunan 27.383 111.517
To list the options of the KML conversion tool, run phylogeo using the help option:
java -jar phylogeo.jar -help
Many options allow setting the style of the branch mapping. For our purposes, we can use:
java -jar phylogeo.jar -coordinates locationCoordinates -mrsd 2005.5 -radius 50000 H5N1_HA_discrete_MCC.tre output.kml
where "-coordinates" specifies the file to which we saved the locations and their coordinates, "-mrsd" specifies the most recent sampling date, "-radius" sets the radius of the circles that represent the number of lineages maintaining a particular state. The last two arguments specify the input and output file.
Open the output file in Google Earth; a time bar indicating the time scale of the tree should appear in the upper left corner. Clicking the clock/play button starts an animation of the diffusion through time. The final tree mapping should look like this:
For more information about the options for KML conversion and bug reporting, contact philippe.lemey (at) gmail.com.