SLiM 5.1 released

27 views
Skip to first unread message

Ben Haller

unread,
Sep 13, 2025, 3:19:33 PMSep 13
to slim-discuss
Hi everybody!  SLiM 5.1 has just been released.  This is a major point release, and has some nice new features.  Please read carefully.

This is a recommended update for all users, due to some significant bug fixes and improvements (detailed below).  Overall SLiM 5.0 proved to be stable; this release is expected to be even more so.  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.1 should preserve backward compatibility with SLiM 5.0 in almost cases (models that run in 5.0 will continue to run with no changes).  Similarly, it preserves backward reproducibility (the same model with the same seed will produce the same results) in almost all cases.  The exception is the bug fix to initializeRecombinationRateFromFile() described below.  Note that SLiM 5.0 did break backward compatibility and reproducibility with previous versions, however.

Recommended python package versions are tskit 0.6.2 or later, msprime 1.3.0 or later, and pyslim 1.1.0 or later.  Note the pyslim 1.1.0 was only recently released; all users of SLiM 5.1 and later should update to it.


NEW FEATURES:

- Support for matrices and arrays has been extended considerably.  Eidos now has new functions tr(), outerProduct(), det(), inverse(), and matrixPow(), and cor() and cov() now support computing correlation/covariance matrices.  A new asVector() method strips off matrix/array dimensions to provide a plain vector.  Thanks to Vitor Sudbrack for the implementations of a few of these.

- SLiM's population-genetics utility functions have been improved significantly.  Functions calcDxy(), calcLD_D(), and calcLD_Rsquared() have been added thanks to Vitor Sudbrack, and calcFST() has been extended to support multiple chromosomes thanks to Peter Ralph.

- Custom plotting functionality in SLiMgui, with the Plot class, has gotten several big improvements.  New image() and matrix() methods of Plot allow plotting of raster data -- spatial maps, Image objects, and matrices.  A new legendTitleEntry() method lets you add title lines to your plot legends.  And, last but not least, support for transparency (alpha) has been added to abline(), lines(), points(), and text() for more sophisticated visual appearances.

- New ways of subsetting matrices and arrays with the [] operator have been added to Eidos, following R's syntax for this.  Specifically, (1) you can now subset a matrix or array with a conformable logical matrix/array to select specific elements; and (2) you can now subset a matrix or array with an integer matrix in which each row specifies the coordinates of a specific element to select.  Both of these allow particular elements to be selected from a matrix/array in an efficient manner.

- Support for uniparentally-transmitted chromosomes in hermaphrodites has been added; the omission of this from SLiM 5.0 was an oversight.

- A new filter() function in Eidos can convolute a vector with a filter, similar to the filter() function in R; good for computing running averages and similar for plotting!

- SLiM will now detect infinite loops in some situations in Eidos, such as in while and do-while loops, and terminate with an error rather than hanging forever.  This can be turned off with a new option to initializeSLiMOptions() if it misbehaves (i.e., if you really want to loop millions of times).

- New recipes 16.11 (on life-long monogamous mating) and 14.16 (on visualizing linkage disequilibrium) extend the manual.


IMPORTANT BUG FIXES:

- Fixed #553, an off-by-one error in initializeRecombinationRateFromFile() that could result in a slightly incorrect recombination rate map.

- Fixed #548, an error from calcFST() when a windowed range (start/end) was used.

- Fixed #545, incorrect results from calcMeanFroh() in multi-chromosome models.

- Fixed #522, the sourceSubpop pseudo-parameter was NULL in modifyChild() callbacks in all cases.

- Fixed #549, a survival() callback that moved individuals to a new subpop could crash, only in models with null haplosomes.

- Fixed #533, the Haplosome method nucleotides() with format="char" would cause crashes and/or data corruption.


There are more new features and bug fixes, but those are the big ones; again, see chapter 32 and the VERSIONS file for more complete information.


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.1 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 5.0 and 5.1; an older edition of the workshop for SLiM 4.3 users is also available.  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

Ben Haller

unread,
Sep 24, 2025, 6:04:46 PM (13 days ago) Sep 24
to slim-discuss
Hi all.  Just a quick followup to say: the pacman installer for Windows is now available.  See section 2.3.1 of the SLiM manual for instructions on its usage.

Cheers,
-B.


Benjamin C. Haller
Messer Lab
Cornell University
Reply all
Reply to author
Forward
0 new messages