Hi everybody! SLiM 5.0 has just been released. This is a major release, so a lot has changed; please read carefully.
This is a recommended update for most users, due to some significant bug fixes and improvements (detailed below), but a LOT has changed under the hood so it is very possible that there will be kinks that need to be worked out. If you do not wish to be on the cutting edge, you might wait a bit. See the Revision History section in the new SLiM manual (chapter 32) for a more complete list of changes (or the VERSIONS file for even more detail); the changes will be summarized here.
SLiM 5.0 breaks backward compatibility with SLiM 4.3 for most models, due to widespread changes in SLiM's Eidos APIs – the names of classes, methods, properties, and so forth. The new SLiMgui included in SLiM 5.0 can autofix almost all of those issues for you; just open your old model, recycle, and run until you no longer get any errors. Once those API changes have been fixed in your script, SLiM 5.0 should be backward compatible for almost all models (models that run in 4.3 will continue to run with no further changes). Similarly, SLiM 5.0 preserves backward reproducibility with SLiM 4.3 (the same model with the same seed will produce the same results) for almost all models. The main exception is models that simulate the Y chromosome, using `initializeSex("Y")`; those should preserve backward compatibility, but not backward reproducibility.
Recommended python package versions are tskit 0.6.2 or later, msprime 1.3.0 or later, and pyslim 1.1 or later. The new version of pyslim is not yet released; an announcement will be made here when it is. In the interim, pyslim 1.0.4 can still be used for most purposes; Peter Ralph writes: "Recapitation will work properly for single-chromosome models; it just won't understand multi-chromosome models well, and won't be able to write out tree sequences (single or multi-chromosome) that can be read back in by SLiM."
Please admire the new cover art for the two manuals! They are by Ehouarn Le Faou, a PhD student at the Université de Lausanne. If you love them as I do, please email him at
ehouarn...@unil.ch to tell him so. Furthermore, he says that he is interested in doing more work of this kind for other projects; feel free to reach out to him with ideas. Thanks Ehouarn!
NEW FEATURES:- The big new thing in SLiM 5.0 is support for multiple chromosomes, including models with both autosomes and sex chromosomes, both diploid and haploid chromosomes, and so forth. Sex chromosomes including XY, ZW, and UV are supported (and similar systems like X0). The new architecture should be quite flexible. It still does not, however, support ploidy levels above diploid. To learn about modeling multiple chromosomes in SLiM 5, read sections 1.5.1 and 8.3 of the SLiM manual; the latter section provides a bunch of new example recipes. There are several new methods to support the new paradigm (see chapter 32), output formats have changed in some cases to provide chromosome information (see chapter 28), and so forth.
- Because of this architectural shift, there has been a terminological shift. Diploid individuals in SLiM used to contain two "genomes"; each "genome" contained the genetic information for one of the two copies of the simulated chromosome. In SLiM 5, individuals might contain many such objects, representing the genetics for the multiple chromosomes being simulated, so the term "genome" can no longer be used to refer to one such object containing the genetic information for one copy of one chromosome. There is, remarkably, no single-word term in biology for these genetic entities (really!), so we have coined a new term: "haplosome". This is the reason for the many changes in SLiM's APIs: "genome" has changed to "haplosome" throughout. Section 1.5.1 gives a much more detailed explanation of the rationale for this shift; please read it before you object. :->
- In this new paradigm, tree-sequence recording now records a separate tree sequence for each chromosome being simulated. Under the hood, these tree sequences actually share a single node table, individual table, and population table for lower memory usage and other performance improvements, as well as to keep the tree sequences synchronized with each other so that they are easier to work with in Python. For single-chromosome models, really little has changed apart from tweaks to the saved metadata. For multiple-chromosome models, tree sequence information is now saved to a directory called a "trees archive" that contains a .trees file for each chromosome. Chapter 29 has details on tree-sequence metadata, trees archives, and so forth. The new version of pyslim will contain a vignette demonstrating how to work with multi-chromosome tree sequences on the Python side.
- SLiMgui has lots of nice changes. It supports multi-chromosome models, and can show you all the chromosomes in the main simulation window or focus in on just one. In addition, it now lets you open up separate "Chromosome Display" windows that give you a separately configurable view onto one or all of the modeled chromosomes, for greater flexibility in model visualization. The haplotype plot also supports multiple chromosomes now. Besides multi-chrom stuff, it can now display a "page guide" in the script editor, at a configurable column/width (nice when preparing scripts for publication), and it now has a built-in color chart and plot symbol chart in the Help menu for quick reference.
- The pop-gen utilities function suite has expanded, with new calcSFS() and calcMeanFroh() functions (for site frequency spectra and runs of homozygosity, respectively). The calcPi() and calcTajimasD() functions, which were new in 4.3 but incorrectly wired and non-functional, now work as well.
- Built-in output/input methods have been markedly improved. The outputFull() method can now write out information about object tags and about substitutions, and the readFromPopulationFile() method can now read that information back in (if you tell outputFull() to save in binary format), allowing more complete information about the state of the simulation to be saved and restored. Other output methods can now write out object tag information as well. The Individual class now has new outputIndividuals() and outputIndividualsToVCF() methods that are optimal for writing individual-level information, especially from multi-chromosome models; and a new readIndividualsFromVCF() method can read multi-chromosome VCF data.
- Spatial modeling capabilites have increased. The existing deviatePositions() method now supports “absorbing” boundaries for spatial movement; and a new deviatePositionsWithMap() method can use a spatial map to limit dispersal.
- There are some nice new convenience methods and functions. New initializeRecombinationRateFromFile() and initializeMutationRateFromFile() functions make it easy to read rate maps from disk. A new rztpois() function in Eidos draws from the zero-truncated Poisson distribution. A new setValuesVectorized() method on Dictionary does vectorized value assignments, assigning a different singleton value to each dictionary in a vector of dictionaries. A new substitutionsOfType() method parallels mutationsOfType(), providing all substitutions of a given mutation type.
- You can now see a progress bar at the command line when running `slim`, by supplying -p or -progress as a command-line option.
- There are a bunch of new recipes, demonstrating multi-chromosome models and other new features. In addition, the manual has been reorganized somewhat, a chapter was split in two, and lots of recipe numbers changed; sorry if that proves confusing, but it should be much better in the long run.
There are quite a few more changes; again, see chapter 32 and the VERSIONS file for more complete information, including various "policy changes" that might break your script in certain narrow cases.
IMPORTANT BUG FIXES:- The calcPi() and calcTajimasD() functions now call the correct code (they were miswired in 4.3).
- Several problems in SLiMgui have been fixed involving window positions and layering. These bugs could cause windows to be located off-screen, or to be shown underneath another window (and thus not be visible), leading to confusion.
- SLiMgui's response to the script file being modified in an external editor was sometimes non-optimal, to put it politely. That logic should now be greatly improved; please let me know if there is still anything about the external editing experience that needs work.
- Tracking and reporting of error positions in your script should work much better, especially in nested contexts such as errors inside user-defined functions.
INSTALLATION NOTES:- If you are on Fedora, RedHat, CentOS, or SUSE Linux Enterprise, the SLiM installer for your Linux platform has already been updated, and installs both the command-line slim binary and the SLiMgui app; see section 2.2.1. HOWEVER, there is an unresolved build issue with openSUSE platforms; Bryce Carson writes: "For now, the only openSUSE with a successful build is Tumbleweed, so any openSUSE Leap 15.6 SLiM users we have would need to wait." (Note that openSUSE 15.4 and 15.5 have been discontinued.) Building from sources should work fine; see section 2.2.2.
- If you are on Debian or Ubuntu, there is a Bash script that installs both the command-line slim binary and the SLiMgui app; see section 2.2.1.
- If you are on macOS, download the double-click installer from the SLiM home page at
http://messerlab.org/slim/.
- If you are on Windows, the pacman installer will be somewhat delayed as usual; a followup post will be made here when it is ready, and in the meantime you can use conda or build from sources following section 2.3.2.
- If you are on Arch, the installer has already been updated; see section 2.2.1.
- For those using conda, the new version is now available for all platforms (but does not give you SLiMgui, only slim); see section 2.5.
Everyone else can download the SLiM.zip source archive from the SLiM home page and build it themselves, or build from sources using the git tag associated with the SLiM 5.0 release, following the instructions for building from sources in chapter 2.
The manuals, recipes, and reference sheets have been updated and should be downloaded again.
SLIM BEGINNERS: Note that a free SLiM Workshop is available online at
http://benhaller.com/workshops/workshops.html, and is highly recommended for new users. It is presently compatible with SLiM 4.3; it will be updated for SLiM 5.0 soon. The workshop is offered occasionally in person; watch the slim-discuss list for workshop announcements, or see
https://messerlab.org/slim/#Workshops for workshops presently accepting applications.
If you have any questions, comments, etc., please use the slim-discuss group for that. Thanks, and happy modeling!
Cheers,
Benjamin C. Haller
Messer Lab
Cornell University