bodkan / slendr

Population genetic simulations in R 🌍
https://bodkan.net/slendr
Other
54 stars 5 forks source link

Slim Simulations using SliM Genomic element types #77

Closed jaurbanChicago closed 2 years ago

jaurbanChicago commented 2 years ago

Hello,

I was wondering if there is a way to run slim simulations in slendr using the GenomicElement concept. I am interested in simulating a chromosome with several 1kb GenomicElements each, separated by "empty spaces" of 100 kb or even 1Mb. Is this achievable with the slim command of slendr?

Thank you so much in advance.

Best,

Jose Antonio Urban Aragón

bodkan commented 2 years ago

Hello.

I have both good news and bad news.

The bad news is that slendr currently does not directly support things like changing the genome architecture, regions with different selective pressures or accumulating different mutation types. It turned out to be extremely challenging to design an R interface that would be still as easy to use as it is now without basically implementing R versions of many SLiM's functions. My goal is not to reimplement SLiM in R, but to use SLiM as an engine to do new interesting things. For everything else, SLiM is and always will be there.

For the 1.0 version of slendr, I'm aiming at supporting neutral demographic scenarios, because I'm mostly interested in studying the features of the coalescent process in spatio-temporal context, mostly with tree sequence data. I have some plans at supporting what you asked about, including some simple selection scenarios, but when will that happen, that's not just clear yet.

The good news is that compiled slendr models (basically what you get when you run compile(...) and save the configuration files to a directory) are just ordinary SLiM projects: there is a script.slim file and associated configuration files. If you need to do more than what slendr currently supports, you could edit script.slim directly and tweak it to your changes.

The bad news again would be that I will not be able to support such modified scripts :( If significant changes to that script break other slendr functionality, I won't have the capacity to help fix. I designed that script to be a fixed backend for slendr simulations and to do exactly what slendr needs -- not less, but unfortunately also not more.

Hope this helps!