{"id":142,"date":"2015-09-07T20:10:51","date_gmt":"2015-09-07T18:10:51","guid":{"rendered":"https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/?p=142"},"modified":"2015-10-09T15:36:16","modified_gmt":"2015-10-09T13:36:16","slug":"displaying-phylogeny-over-map","status":"publish","type":"post","link":"https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/2015\/09\/07\/displaying-phylogeny-over-map\/","title":{"rendered":"Displaying phylogeny over map"},"content":{"rendered":"<p><strong>A brief, preliminary evaluation<\/strong><\/p>\n<p>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.<\/p>\n<p>Lucky for me, Rod Page has recently published a <a href=\"https:\/\/currents.plos.org\/treeoflife\/article\/visualising-geophylogenies-in-web-maps-using-geojson\/\" target=\"_blank\">small script<\/a>, which plots the tips of a phylogenetic tree (stored in <em>nexus<\/em>-format) to latitude and longitude coordinates, which are saved as a geographic character alongside the tree.<\/p>\n<p style=\"padding-left: 30px\"><code>php make_html.php MyTree.tre &gt; MyTree.geojson<\/code><\/p>\n<p>Upon running the script, I loaded the resulting <em>geojson<\/em>-file into the online tool <a href=\"https:\/\/geojson.io\" target=\"_blank\">geojson.io<\/a> 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.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_147\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/files\/2015\/09\/Screenshot_2015-09-07_20-22-19.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-147\" class=\"wp-image-147 size-medium\" src=\"https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/files\/2015\/09\/Screenshot_2015-09-07_20-22-19-300x272.png\" alt=\"Screenshot geojson.io\" width=\"300\" height=\"272\" srcset=\"https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/files\/2015\/09\/Screenshot_2015-09-07_20-22-19-300x272.png 300w, https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/files\/2015\/09\/Screenshot_2015-09-07_20-22-19-1024x927.png 1024w, https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/files\/2015\/09\/Screenshot_2015-09-07_20-22-19.png 1080w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-147\" class=\"wp-caption-text\">Screenshot geojson.io<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>In order to adjust line colour and thickness, I loaded the <em>geojson<\/em>-file into R using the <a href=\"https:\/\/cran.r-project.org\/web\/packages\/rgdal\/index.html\" target=\"_blank\">rgdal<\/a> library and plotted the results.<\/p>\n<div style=\"background-color: #ffebdb\">\n<p style=\"padding-left: 30px\"><code>library(rgdal)<br \/>\npoints = readOGR(dsn = \"MyTree.geojson\", layer = \"OGRGeoJSON\", require_geomType=c(\"wkbPoint\"))<br \/>\nlines = readOGR(dsn = \"MyTree.geojson\", layer = \"OGRGeoJSON\", require_geomType=c(\"wkbLineString\"))<br \/>\nplot(lines)<br \/>\nplot(points, add=T)<\/code><\/p>\n<\/div>\n<p>In summary, my first impression of this mapping procedure is quite positive.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":2306,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57599,57598],"tags":[],"class_list":["post-142","post","type-post","status-publish","format-standard","hentry","category-audiovisual","category-bioinformatics"],"_links":{"self":[{"href":"https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/wp-json\/wp\/v2\/posts\/142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/wp-json\/wp\/v2\/users\/2306"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/wp-json\/wp\/v2\/comments?post=142"}],"version-history":[{"count":15,"href":"https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/wp-json\/wp\/v2\/posts\/142\/revisions"}],"predecessor-version":[{"id":186,"href":"https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/wp-json\/wp\/v2\/posts\/142\/revisions\/186"}],"wp:attachment":[{"href":"https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/wp-json\/wp\/v2\/media?parent=142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/wp-json\/wp\/v2\/categories?post=142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.fu-berlin.de\/gruenstaeudl\/wp-json\/wp\/v2\/tags?post=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}