{"id":339,"date":"2018-12-27T19:32:34","date_gmt":"2018-12-27T19:32:34","guid":{"rendered":"http:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/?p=339"},"modified":"2018-12-27T19:32:34","modified_gmt":"2018-12-27T19:32:34","slug":"the-genealogy-of-the-coalescent-at-one-locus-in-two-populations-with-migration-and-mutation","status":"publish","type":"post","link":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/2018\/12\/27\/the-genealogy-of-the-coalescent-at-one-locus-in-two-populations-with-migration-and-mutation\/","title":{"rendered":"The genealogy of the coalescent at one locus in two populations with migration and mutation"},"content":{"rendered":"<p>I just posted another R Shiny application illustrating properties of the coalescent in two populations with mutation and migration. Unfortunately, to see this one, you&#8217;ll have to download the source from Github (<a href=\"https:\/\/github.com\/kholsinger\/PopGen-Shiny\/blob\/master\/Coalescent-structured-population\/app.R\">app.R<\/a>) and run it in your local version of R. It&#8217;s not difficult, but it&#8217;s less convenient than running it on shinyapps.io. The problem arises because I use <tt>ggtree()<\/tt> to plot and color the tree. <tt>ggtree()<\/tt> is a <a href=\"https:\/\/www.bioconductor.org\/\">BioConductor<\/a> package, and I&#8217;m running into an error installing it in the application package. If I can&#8217;t figure it out, I may install a version of <a href=\"https:\/\/www.rstudio.com\/products\/rstudio\/download-server\/\">R Studio Server<\/a> here and host it locally.<\/p>\n<p>Here&#8217;s how to run the application in your local version of R:<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>Follow the link to Github and download <tt><a href=\"https:\/\/github.com\/kholsinger\/PopGen-Shiny\/blob\/master\/Coalescent-structured-population\/app.R\">app.R<\/a><\/tt> (click on the button labeled &#8220;Raw&#8221; at the right side of the screen and use &#8220;File-&gt;Save&#8221; to save it somewhere convenient on your hard drive.<\/li>\n<li>Make sure your version of R has the libraries mentioned at the top of <tt>app.R<\/tt> installed. They are: <tt>ggplot2, shiny, cowplot, plotly, coala, ggtree, and ape<\/tt>. (Actually, I think you can delete <tt>cowplot and plotly<\/tt> from the list of libraries that are loaded. They&#8217;re leftover from some earlier experiments. To install <tt>ggtree()<\/tt>, you&#8217;ll first have to make sure that you have <tt>BiocManager<\/tt> installed. Then you can simply <tt>BiocManager::install(\"ggtree\")<\/tt>.<\/li>\n<li>Launch R and make sure your working directory contains the source for <tt>app.R<\/tt>.<\/li>\n<li>Then <tt>runApp()<\/tt> and enjoy the ride!<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I just posted another R Shiny application illustrating properties of the coalescent in two populations with mutation and migration. Unfortunately, to see this one, you&#8217;ll have to download the source from Github (app.R) and run it in your local version of R. It&#8217;s not difficult, but it&#8217;s less convenient than running it on shinyapps.io. The &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/2018\/12\/27\/the-genealogy-of-the-coalescent-at-one-locus-in-two-populations-with-migration-and-mutation\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The genealogy of the coalescent at one locus in two populations with migration and mutation&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-339","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/posts\/339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/comments?post=339"}],"version-history":[{"count":1,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/posts\/339\/revisions"}],"predecessor-version":[{"id":340,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/posts\/339\/revisions\/340"}],"wp:attachment":[{"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/media?parent=339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/categories?post=339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/darwin.eeb.uconn.edu\/uncommon-ground\/eeb348\/wp-json\/wp\/v2\/tags?post=339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}