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’ll have to download the source from Github (app.R) and run it in your local version of R. It’s not difficult, but it’s less convenient than running it on shinyapps.io. The problem arises because I use ggtree() to plot and color the tree. ggtree() is a BioConductor package, and I’m running into an error installing it in the application package. If I can’t figure it out, I may install a version of R Studio Server here and host it locally.
Here’s how to run the application in your local version of R:
- Follow the link to Github and download app.R (click on the button labeled “Raw” at the right side of the screen and use “File->Save” to save it somewhere convenient on your hard drive.
- Make sure your version of R has the libraries mentioned at the top of app.R installed. They are: ggplot2, shiny, cowplot, plotly, coala, ggtree, and ape. (Actually, I think you can delete cowplot and plotly from the list of libraries that are loaded. They’re leftover from some earlier experiments. To install ggtree(), you’ll first have to make sure that you have BiocManager installed. Then you can simply BiocManager::install("ggtree").
- Launch R and make sure your working directory contains the source for app.R.
- Then runApp() and enjoy the ride!
2 Replies to “The genealogy of the coalescent at one locus in two populations with migration and mutation”