Alumnus of Freie Universität Berlin – Michael Grünstäudl, PhD

Successful habilitation in botany and bioinformatics

Displaying phylogeny over map

A brief, preliminary evaluation

For the revision of a new manuscript, I needed to generate a figure, in which a phylogenetic tree is plotted over a geographic map. The tips of the tree shall hereby point to the distribution area of the taxa they represent on the underlying map.

Lucky for me, Rod Page has recently published a small script, which plots the tips of a phylogenetic tree (stored in nexus-format) to latitude and longitude coordinates, which are saved as a geographic character alongside the tree.

php make_html.php MyTree.tre > MyTree.geojson

Upon running the script, I loaded the resulting geojson-file into the online tool geojson.io in order to evaluate the validity of the above-mentioned script. From the looks of it, this script does what it is supposed to do.

 

Screenshot geojson.io

Screenshot geojson.io

 

In order to adjust line colour and thickness, I loaded the geojson-file into R using the rgdal library and plotted the results.

library(rgdal)
points = readOGR(dsn = "MyTree.geojson", layer = "OGRGeoJSON", require_geomType=c("wkbPoint"))
lines = readOGR(dsn = "MyTree.geojson", layer = "OGRGeoJSON", require_geomType=c("wkbLineString"))
plot(lines)
plot(points, add=T)

In summary, my first impression of this mapping procedure is quite positive.

Der Beitrag wurde am Monday, den 7. September 2015 um 20:10 Uhr von Michael Grünstäudl veröffentlicht und wurde unter audiovisual, bioinformatics abgelegt. Sie können die Kommentare zu diesem Eintrag durch den RSS 2.0 Feed verfolgen. Sie können einen Kommentar schreiben, oder einen Trackback auf Ihrer Seite einrichten.

Eine Reaktion zu “Displaying phylogeny over map”

  1. Dewi

    Nice post. I know the Robinson and Winkel projections work betetr overall, but being a Kiwi I prefer the old fashioned Mercator projection if only because the others tend to turn New Zealand into a disortorted smear at the edge of the world

Leave a Reply

Captcha
Refresh
Hilfe
Hinweis / Hint
Das Captcha kann Kleinbuchstaben, Ziffern und die Sonderzeichzeichen »?!#%&« enthalten.
The captcha could contain lower case, numeric characters and special characters as »!#%&«.