best strategy for simulating genomic loci under different selective pressures

80 views
Skip to first unread message

David Rinker

unread,
Apr 6, 2017, 3:02:43 PM4/6/17
to slim-discuss
Hi,

I'm just starting out with SLiM and wanted to get some simple advice to help me better plan out my design strategy.

Basically, what I want to do is simulate a genome with "genes" that are distributed over the length of the chromosome and am wondering if there is an upper limit to the number of such loci that SLiM can handle?--the real genome has 20,000 genes but would I be better off planning all my models around a down-sampled genome?

Thanks for the great manual BTW.  It's very helpful 

-D

Ben Haller

unread,
Apr 6, 2017, 11:46:10 PM4/6/17
to slim-discuss
  Hi!  SLiM doesn't have a hard limit (or to be precise, the hard limit is vastly higher than you will ever attempt to go :->).  You'll find that in practice you're limited by either the execution speed of your model, or by memory usage.  Usually execution speed is the wall people hit first.  But there are certainly folks out there simulating entire chromosomes at full resolution; indeed, there are folks simulating multiple full-resolution chromosomes at once (which you can do by subdividing SLiM's single chromosome into multiple chromosomes by positioning free-recombination breakpoints between specific pairs of bases using a custom recombination map).  If you're OK waiting a while for your runs to finish, there's no particular obstacle to doing this.  Many people doing big model runs like this use a computing cluster; if you've got access to one, that can be a good way to go.  You can design your model on your local machine, using SLiMgui if it's a Mac, and then run SLiM at the command line on your cluster to do your big production runs.

  If you're wondering what the limits actually are, the answer is usually "a little over 2 billion".  You can run a model in SLiM for up to ~2 billion generations, can simulate a chromosome with up to ~2 billion base positions, and can make a subpopulation with up to ~2 billion individuals.  This comes from the fact that 32-bit signed integers are used for many such quantities in SLiM, and 2^31 is 2147483648.  Of course if you ever actually tried to make a model that big, it would probably exceed the memory capacity of your machine, and/or run for longer than the lifetime of the universe.  :->

  And if you end up wanting to scale down your model to improve its runtime, section 5.5 of the manual has some advice about doing that.

  I'm glad you like the manual.  Let me know if you end up having any suggestions for improvement!

Cheers,
-B.

Benjamin C. Haller
Messer Lab
Cornell University

David Rinker

unread,
Apr 10, 2017, 2:37:39 PM4/10/17
to slim-discuss
"You can design your model on your local machine, using SLiMgui if it's a Mac, and then run SLiM at the command line on your cluster to do your big production runs."

Brilliant!  Don't know why this didn't occur to me but this is exactly how I plan on proceeding.

Thank you

-David
Reply all
Reply to author
Forward
0 new messages