Uncommon Ground

Monthly Archive: September 2021

Sharing a new version of my genetic drift simulation

You may be aware that I wrote a series of applications in RShiny several years ago to illustrate some principles of population genetics. I just finished revising the genetic drift application. If you’ve used it in the past, you’ll know that it would get hung up when you tried to simulate a long time series or a lot of populations. After some digging around, I realized that the problem isn’t with running the simulation or with collecting the results. It’s with converting the results to a form that allows the simulation to unfold over time.

As a result, this version allows you to turn the animation off. Now you can run long time series with lots of populations (where “lots” equals “up to 10”). You won’t see the results played as a movie, but you’ll see them displayed very quickly. As you’ll see from the first link above, all of the source code is available on Github. If you find any of these applications useful, you’ll want to take a look at the Google Doc that Katie Lotterhos put together and announced on Twitter last January. It includes screenshots and links to applications written by CJ Battey, Graham Coop, and Chris Muir.