Martin Petr
Martin Petr
@bodkan.bsky.social
genomics · history · future

profile: bodkan.net

Sometimes I post updates on my work here. Other than that, I don't spend time on social media anymore (and neither should you). Email is on my profile page!
Thank you for the kind words! I’m a big fan of your recent work on evaluating qpAdm. As I was reading it, I was like “slendr would've made things so much easier for these guys!”. :D

Cool stuff! Been referring to it a lot this year.
November 29, 2024 at 6:22 PM
More exciting #rstats popgen announcements are on the horizon, so stay tuned!

[I have no idea how threads are supposed to work here. Let's see if I made some embarrassing blunder.]
November 28, 2024 at 2:45 PM
The new slendr is already on CRAN, so go ahead and run `install.packages("slendr")` to get the latest goodies.

Finally, this update involved massive changes to the slendr internals. I'm actually a bit scared by the scale of those changes! Please report any bugs / issues at github.com/bodkan/slendr.
November 28, 2024 at 2:45 PM
You can now take a normal slendr demographic model of arbitrary complexity and "inject" a customization SLiM snippet during a `compile_model()` step, overriding the default neutral mode of operation. This gives you infinite SLiM flexibility while keeping everything else in slendr exactly the same!
November 28, 2024 at 2:45 PM
This thread is getting too long. If you want to know more, check out the WIP vignette with examples capturing a range of WF selection models you might normally use SLiM for: custom mutation types, genomic elements, scheduling specific mutations at given times etc. etc. www.slendr.net/articles/vig...
November 28, 2024 at 2:45 PM
It was frustrating because slendr is built on top of two simulation engines: 1. msprime, 2. the almighty selection simulator SLiM, which was used exclusively for its handling of space, not for selection (?!). This is no longer true. Since v1.0, slendr models can include any WF-compatible selection.
November 28, 2024 at 2:45 PM
This brings me to the main feature of the v1.0 release. Having personally come from an aDNA background and primarily studying history, slendr used to only simulate neutral scenarios, frustrating people who wanted to simulate selection happening along (potentially complex) demographic histories.
November 28, 2024 at 2:45 PM
Simulating ancient individuals at defined points in time, getting various f-statistics, ancestry tracts (chromosome painting), VCF or EIGENSTRAT files, are all supported (powered by tskit!). Very useful for model testing and building intuition as it's really easy to get ground truth from any model.
November 28, 2024 at 2:45 PM
To my big surprise, slendr became popular even for traditional nonspatial models. In few lines of R and no time, you can get from a model idea to meaningful statistics: a dealbreaker in classrooms and day-to-day exploratory work! See two toy models of f4 / divergence / 2D AFS. All without leaving R!
November 28, 2024 at 2:45 PM
What is slendr? We originally developed it to simulate "realistic-looking" genomic data from geographically-explicit models. It would take too many posts to detail its awesome spatial features but check out the project website for tutorials and our paper with many cool examples. www.slendr.net
A Simulation Framework for Spatiotemporal Population Genetics
A framework for simulating spatially explicit genomic data which leverages real cartographic information for programmatic and visual encoding of spatiotemporal population dynamics on real geog...
www.slendr.net
November 28, 2024 at 2:45 PM