Releases: MesserLab/SLiM
Version 4.3
Hi everybody! SLiM 4.3 has just been released. This is a major point release. It should preserve backward compatibility with SLiM 4.2 in all cases (models that run in 4.2 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 all cases. It is recommended, but there might be new build/install issues with it due to some changes described below. See the new SLiM manual (chapter 30) and the VERSIONS file for a complete list of changes, which will be summarized here.
Recommended python package versions are tskit 0.5.6 or later, msprime 1.3.0 or later, and pyslim 1.0.4.
NEW FEATURES:
-
SLiMgui now builds against Qt6 as well as Qt5 (Qt being the cross-platform widget kit that SLiMgui uses). This should have few visible consequences for most users, but it is important nonetheless because Qt5 is getting rather old and users have started to see bugs and compatibility problems resulting from that. Shifting over to Qt6 gives SLiMgui lots of bug fixes and modernization. If you use an installer, it should install using Qt6 automatically (unless perhaps your platform is so old that Qt6 is not supported). If you build SLiMgui yourself, you will need to ensure that Qt6 is installed on your machine (I have been testing with Qt 6.7.2, the current version as of this writing), and then CMake should automatically detect it and use it in most cases. The manual (chapter 2) has more information on building with Qt6 and troubleshooting problems that might occur; but hopefully this transition will be smooth for everyone.
-
Tick range expressions that schedule events/callbacks can now use symbolic constants that are defined later in the simulation. For example, an event that should run 10 ticks after the end of a burn-in period could be declared as
BURNIN_END+10 early() { ... }
and will get scheduled whenever the constantBURNIN_END
becomes defined, allowing a variable-length burnin to be handled easily. -
calcPi()
andcalcTajimasD()
popgen utility functions have been added, thanks to Nick Bailey. [EDIT: Due to an error on my end, these new functions are wired up incorrectly, and do not produce the correct result. They should not be used. They will be fixed in the next release.] -
SLiMgui now displays the selected script block, to the right of the Jump menu; if you're in a
10 early()
event, it will say "10 early()", making navigation around big script files easier. -
A new "Copy as HTML" menu item in SLiMgui can copy the selected chunk of script as HTML, including syntax coloring, making it easy to paste pretty, syntax-colored Eidos code into other documents.
-
Some users have been having display issues in SLiMgui due to some kind of OpenGL malfunction on their machine. If the chromosome view and individuals view don't display correctly for you, there is now a "Use OpenGL" checkbox in the Preferences; you can uncheck it to turn off OpenGL usage in SLiMgui, which appears to fix this problem.
IMPORTANT BUG FIXES:
-
The start/end parameters to
calcWattersonsTheta()
to specify a window should now work correctly. -
sampleIndividuals()
could occasionally crash due to an incorrectly sized buffer; that has been fixed. -
a couple of the built-in graphs in SLiMgui could occasionally crash; that has been fixed.
INSTALLATION NOTES:
-
If you are on Fedora, RedHat, CentOS, openSUSE, 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. The installer has not been working for RHEL 8 for the past several releases; that issue has now been fixed, thanks to the labors of Bryce Carson.
-
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 was somewhat delayed as usual; it was released on 14 October 2024.
-
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).
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 4.3 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 compatible with SLiM 4.3. It 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
Version 4.2.2
Hi folks! SLiM 4.2.2 has just been released. This is a bug fix release. It should preserve backward compatibility with SLiM 4.2 in all cases (models that run in 4.2 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 all cases. I would recommend that everyone on version 4.2.x should upgrade to this version; version 4.2 SHOULD NOT BE USED. See the new SLiM manual (chapter 30) and the VERSIONS file for a complete list of changes, which will be summarized here.
Recommended python package versions are tskit 0.5.6, msprime 1.3.1 (but back to 1.2.0 should be fine for SLiM), and pyslim 1.0.4.
IMPORTANT BUG FIXES:
-
A bug that caused SLiMgui to crash when typing in callbacks, such as
mutationEffect()
etc., has been fixed. Unfortunately we don't have a good solution for unit-testing SLiMgui, so bugs like this can creep in. -
The other important bug fix, relative to 4.2, was in 4.2.1; see those release notes for details.
INSTALLATION NOTES:
-
If you are on Fedora, RedHat, CentOS, openSUSE, 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.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.2.
-
The manual discusses using another method, AppImage, to install SLiMgui (only – no command-line tools) on Linux platforms, since it is the most difficult target to build. However, AppImage is proving a bit finicky to configure, and is not yet ready to use. PLEASE DISREGARD that manual section until further notice. Hopefully it will be working soon.
-
If you are on macOS, download the double-click installer from the SLiM home page at .
-
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.
-
If you are on Arch, the installer is delayed a bit; in the meantime, you can use conda or build from sources.
-
For those using conda, the new version is now available for all platforms (but does not give you SLiMgui, only slim).
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 4.2.2 release.
The manuals, recipes, and reference sheets have undergone only version number tweaks, if that, and do not need to be downloaded again if you downloaded them for version 4.2.
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 has been updated to SLiM 4.2.x. It is offered occasionally in person, and as of this posting there are a few spaces left in the upcoming Ancona, Italy, workshop on May 27-31; see the slim-discuss list for workshop announcements.
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
Version 4.2.1
Hi folks! SLiM 4.2.1 has just been released. This is a bug fix release. It should preserve backward compatibility with SLiM 4.2 in all cases (models that run in 4.2 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 all cases. I would recommend that everyone on version 4.2 should upgrade to this version; it has one very important bug fix, and version 4.2 SHOULD NOT BE USED. See the new SLiM manual (chapter 30) and the VERSIONS
file for a complete list of changes, which will be summarized here.
[ Note that on 30 April 2024 this release was patched to fix a crash in SLiMgui. Only SLiMgui was affected by this bug, so users of the command-line slim program do not need to update that. Users of SLiMgui should reinstall 4.2.1 once the installer for their platform has been updated. Sorry for the confusion! ]
Recommended python package versions are tskit
0.5.6, msprime
1.3.1 (but back to 1.2.0 should be fine for SLiM), and pyslim
1.0.4.
IMPORTANT BUG FIXES:
- A bug that could result in a crash or a corrupted run (producing incorrect results) has been fixed. This bug would bite under very specific circumstances: in a nonWF model, with a subpopulation of size 0 (containing no individuals), if and only if a non-zero-size subpopulation had not existed in a previous tick. This usage pattern is somewhat common, so this was a very dangerous bug that unfortunately merited a new release.
INSTALLATION NOTES:
-
If you are on Fedora, RedHat, CentOS, openSUSE, 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.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.2.
-
The manual discusses using another method, AppImage, to install SLiMgui (only – no command-line tools) on Linux platforms, since it is the most difficult target to build. However, AppImage is proving a bit finicky to configure, and is not yet ready to use. PLEASE DISREGARD that manual section until further notice. Hopefully it will be working soon.
-
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.
-
If you are on Arch, the installer is delayed a bit; in the meantime, you can use conda or build from sources.
-
For those using conda, the new version is now available for all platforms (but does not give you SLiMgui, only slim).
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 4.2.1 release.
The manuals, recipes, and reference sheets have undergone only version number tweaks, if that, and do not need to be downloaded again if you downloaded them for version 4.2.
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 has been updated to SLiM 4.2 (and 4.2.1). It is offered occasionally in person, and as of this posting there are a few spaces left in the upcoming Ancona, Italy, workshop on May 27-31; see the slim-discuss list for workshop announcements.
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
Version 4.2
Hi folks! SLiM 4.2 has just been released. This is a major point release with some new features that I've been wanting to do for a long time. It should preserve backward compatibility with SLiM 4.1 in most, but not all, cases (models that run in 4.1 will continue to run with few or no changes). Similarly, it preserves backward reproducibility (the same model with the same seed will produce the same results) in most, but not all, cases. I would recommend that everyone should upgrade to this version; it has several important bug fixes, and seems quite stable in testing. See the new SLiM manual (chapter 30) and the VERSIONS
file for a complete list of changes, which will be summarized here.
Recommended python package versions are tskit
0.5.6, msprime
1.3.1 (but back to 1.2.0 should be fine for SLiM), and pyslim
1.0.4. Note that there was an important bug in pyslim
from versions 0.700 through 1.0.2, so you should DEFINITELY be on the latest version of pyslim
; more information on that bug can be found in Peter's posts here: https://groups.google.com/g/slim-discuss/c/Rtkkx_8pW58/m/SpuaxFSgAAAJ.
NEW FEATURES:
-
SLiMgui now supports custom plotting, with the addition of a new
Plot
class (which exists only when running in SLiMgui). This is similar tobase
plotting in R, although much less full-featured. Recipes 13.5, 13.7, 14.7, and 15.17 demonstrate this new custom plotting facility; have a look at them to see what is possible. -
SLiMgui also now supports plotting of data recorded by a
LogFile
. You can create such a plot in the user interface, directly from the debug output window, from a context menu. Recipes 4.2.5 and 15.16 demonstrate this new capability. It is now also possible to access logged data in script, with a newlogFileData()
method, to produce a custom plot (only in SLiMgui). -
The tick range for event and callback declarations, which specify which ticks the event/callback should run in, can now contain arbitrary Eidos expressions, can use defined constants (as long as they exist by the end of the last
initialize()
callback), and no longer need to be consecutive. Needing to userescheduleScriptBlock()
to dynamically schedule events and callbacks is now largely a thing of the past! So legal event declarations would includeN:(N+M+2) early()
,seq(1, 100, by=5) early()
, andc(5, 50, 500) early()
, among many other possibilities. Recipes 4.1.10 and 17.4 now demonstrate the use of such tick range expressions, and sections 20.2 and 26.1 provide relevant documentation. -
Eidos
for
loops now support multiplein
clauses, so a loop likefor (x in 1:3, y in 2:4) { ... }
is now legal. Allin
clauses must entail the same number of iterations, and are executed concurrently. This is very useful for iterating over multiple vectors in a synchronized fashion. Recipes 10.5, 14.7, and 19.7 now demonstrate this newfor
loop syntax. -
A new method on Subpopulation,
deviatePositions()
, makes it even easier and more efficient to move individuals around in continuous-space models; recipe 16.3 now demonstrates this. -
External editors are now better supported by SLiMgui. If you edit a SLiM model externally, SLiMgui will notice the change and offer to reload the model from disk. In SLiMgui's Preferences panel, you can even configure SLiMgui to reload external changes automatically, as long as there is not a conflict between internal and external changes.
These are only the most notable new features; see the full release notes in the SLiM manual for more.
IMPORTANT POLICY CHANGES:
-
Indices of type
float
are no longer legal for subsetting a vector with operator[]
. The ability to subset withfloat
indices was inherited from R, and seems unwise. Existing code that usesfloat
indices will need to convert tointeger
withasInteger()
, perhaps after callinground()
. -
Assignment into a property of an object must now match the type of the property; type promotion will no longer occur. Existing code that now errors should use
asInteger()
,asFloat()
, etc. as needed.
IMPORTANT BUG FIXES:
-
A very large memory leak when reading a tree-sequence file into SLiM in some cases has been fixed. Memory usage, for models that encountered this bug, may now be MUCH lower.
-
Writing to a file with
writeFile()
, with the combination ofappend=T
andcompress=T
, could silently fail to write the data -- but only in SLiMgui, and only if a partial path rather than an absolute path was used. -
Adding a null genome to a subpopulation in nonWF models could crash in some cases.
See full release notes in the SLiM manual regarding less prominent bug fixes.
NEW/REVISED RECIPES:
Recipe revisions were extensive for this release, with changes to show off many of the new features that were added, as described above. I would recommend looking at recipes 4.1.10, 13.7, and 14.7 in particular, to see important new features demonstrated.
And as always, if your own model is based upon a recipe in the manual, it is wise to review that foundational recipe in each new SLiM release to see if improvements or fixes have been made. Recipes have changed beyond those cited here.
INSTALLATION NOTES:
-
If you are on Fedora, RedHat, CentOS, openSUSE, 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.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.2.
-
The manual discusses using another method, AppImage, to install SLiMgui (only – no command-line tools) on Linux platforms, since it is the most difficult target to build. However, AppImage is proving a bit finicky to configure, and is not yet ready to use. PLEASE DISREGARD that manual section until further notice. Hopefully it will be working soon.
-
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 build from sources.
-
If you are on Arch, the installer is delayed a bit; in the meantime, you can use conda or build from sources.
-
For those using conda, the new version is now available for all platforms (but does not give you SLiMgui, only slim).
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 4.2 release.
The manuals, recipes, and reference sheets have undergone revisions, so you should re-download those too.
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 has been updated to SLiM 4; an update to SLiM 4.2 will happen, hopefully soon, but the changes will be minor. It is offered occasionally in person, and as of this posting there are a few spaces left in the upcoming Ancona, Italy, workshop on May 27-31; see the slim-discuss list for workshop announcements.
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
Version 4.1
Hi all! SLiM 4.1 has just been released. This is a major point release with a bunch of new stuff. It should preserve backward compatibility with SLiM 4.0 and 4.0.1 (models that run in those will continue to run). Backward reproducibility will usually, but not always, be preserved (the same model with the same seed might produce different results, due to algorithmic changes under the hood). I would recommend that everyone should upgrade to this version; the 4.0 series has proved to be stable. See the new SLiM manual (chapter 30) and the VERSIONS file for a complete list of changes, which will be summarized here.
Recommended python package versions are tskit 0.5.6, msprime 1.2.0, and pyslim 1.0.4. Note that there was an important bug in pyslim from versions 0.700 through 1.0.2, so you should DEFINITELY be on the latest version of pyslim; more information on that bug can be found in Peter's posts here: https://groups.google.com/g/slim-discuss/c/Rtkkx_8pW58/m/SpuaxFSgAAAJ.
NEW FEATURES:
-
Spatial maps, used to represent spatially-varying values in continuous-space models, have been split out from Subpopulation into their own Eidos class, SpatialMap. This has allowed the addition of many new features, including doing high-quality bicubic interpolation of map values, algebraically blending and manipulating maps, smoothing/blurring map values, and using spatial maps to influence directed dispersal and habitat preference. This opens up lots of exciting new possibilities for spatial modeling.
-
InteractionType has a new method, setConstraints(), that lets you set constraints on which receivers and/or exerters are eligible to interact, allowing you to make spatial (or non-spatial) interactions that influence only a subset of a population. Constraints can include age, sex, migrant status, and various tag values, making this mechanism quite flexible. For example, a mate-search interaction might involve only female receivers of a given age range, and only male exerters of a perhaps different age range, and might require males to have a certain tag value to be considered eligible.
-
A new pointDeviated() method can manage kernel-based dispersal and boundary condition enforcement in a single vectorized call, making dispersal/movement in spatial models much simpler and more efficient.
-
Individuals now have a set of new logical tag properties, tagL0/tagL1/tagL2/tagL3/tagL4, that can be used in your script to track binary/logical state for your individuals, for whatever purpose you need.
-
Profiling of line-by-line model performance can now be done at the command line (not just in SLiMgui), allowinf you to profile your model on the platform where it will be run (i.e., on your computing cluster) for greater accuracy. A custom build of slim from sources is required, but very easy to make.
-
The Dictionary class now allows integer keys, not just string keys, making it possible to use Dictionary as a sort of "sparse array " or "ragged array" class. Also, both Dictionary and DataFrame now allow objects of all classes to be added as values (with some caveats).
-
For nonWF models, the various reproduction methods such as addCrossed() now have an optional count parameter, allowing you to generate a whole litter of offspring with a single call. The addRecombinant() method gets a couple of additional extensions: parent1/parent2 parameters to supply pedigree tracking information, and a randomizeStrands parameter to request that the initial copy strand for each gamete should be chosen randomly from the genomes supplied for that gamete.
These are only the most notable new features; see the full release notes in the SLiM manual for more.
IMPORTANT BUG FIXES:
-
In multispecies models (and only in multispecies models), the mutationCounts() / mutationFrequencies() methods could return zero in some cases, due to a caching bug.
-
Many memory leaks have been tracked down and fixed. These were mostly minor, but a couple were larger, so some models might see a large improvement in memory usage.
NEW/REVISED RECIPES:
Note that chapters 15 and 16 switched places in the manual, so all recipe numbers in those chapters have changed! Recipe revisions were extensive for this release, with changes to show off many of the new features that were added; see the release notes in the manual for details. A couple of new recipes are worth calling out here. For the new spatial-modeling features in SLiM 4.1, section 16.3 got a new sub-recipe (16.3 V) and sections 16.14 and 16.18 are completely new. Also, for those interested in modeling strictly biallelic loci, there is a new section, 14.16, showing a third possible approach (in addition to the two approaches already shown in section 14.15).
INSTALLATION NOTES:
-
If you are on Fedora, RedHat, CentOS, Arch, openSUSE, 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.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.2.
-
The manual discusses using another method, AppImage, to install SLiMgui (only – no command-line tools) on Linux platforms, since it is the most difficult target to build. However, AppImage is proving a bit finicky to configure, and is not yet ready to use. Please disregard that manual section until further notice. Hopefully it will be working soon.
-
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 build from sources.
-
For those using conda, the new version is now available for all platforms (but does not give you SLiMgui, only slim).
Everyone else can download the SLiM.zip source archive from the SLiM home page and build it themselves.
The manuals, recipes, and reference sheets have undergone revisions, so you should re-download those too.
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 has been updated to SLiM 4; an update to SLiM 4.1 will happen, but the changes will be minor. It is offered occasionally in person, but the four scheduled dates (all in Europe in 2024) are full and wait-listed.
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
Version 4.0.1
Hi everybody! SLiM 4.0.1 has just been released. This is a minor release, mostly to fix a couple of bugs. It should preserve backward compatibility and reproducibility from SLiM 4.0. If you are on SLiM 4.0 now, upgrading is strongly recommended; if you have chosen to stay back on SLiM 3 for the time being, you can continue to do so if you wish (or if you decide to move to SLiM 4 now, please also read the release notes for SLiM 4.0 for important information). Recommended python package versions are the same as for SLiM 4.0: at least 0.5.2 for tskit, 1.2.0 for msprime, and 1.0 for pyslim. See the SLiM manual (chapter 29) and the VERSIONS file for a complete list of changes, which will be summarized here.
NEW FEATURES:
-
Individual has a new property, meanParentAge, that makes calculating the generation time of nonWF models easier. This is useful for adjusting time units when using tree-sequence recording; see the pyslim documentation at https://tskit.dev/pyslim/docs/latest/time_units.html for more information. (It should be updated to show the use of meanParentAge shortly.)
-
DataFrame has a new method, asMatrix(), that converts the target DataFrame into a matrix. This makes it easy to read a matrix from disk: use readCSV() to read the file in as a DataFrame, and then use asMatrix(). Recipe 16.12 II now provides an example of that.
-
DataFrame's subset() method now takes NULL for row/col to get whole rows/columns
-
readCSV() now accepts sep="" to use a "whitespace" separator (as in R).
IMPORTANT BUG FIXES:
- Models using tree-sequence recording that read in a saved tree sequence with readFromPopulationFile() could raise an error or leak a large amount of memory; see https://groups.google.com/g/slim-discuss/c/ys4zAQLlXsY/m/VTWbBtO9AAAJ.
NEW/REVISED RECIPES: Recipe 6.1.2 (reading a recombination rate map from a file) now uses readCSV() to read the rate map.
INSTALLATION NOTES:
-
If you are on Fedora, RedHat, CentOS, Arch, or the newly supported platforms openSUSE and SUSE Linux Enterprise, the SLiM installer for your Linux platform has already been updated (see chapter 2 of the SLiM manual for details).
-
If you are on Debian or Ubuntu, the installation strategy is being overhauled; we will announce when an installer for those platforms is available, but it may take a while (the installation instructions in the manual for those platforms will either not work, or give you version 3.7.1, I imagine); in the meantime Debian and Ubuntu users will need to build from sources, sorry (see chapter 2 for instructions).
-
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 build from sources.
-
For those using conda, the new version is now available for all platforms (but does not give you SLiMgui, only slim).
Everyone else can download the SLiM.zip source archive from the SLiM home page and build it themselves.
The manuals, recipes, and reference sheets have undergone revisions, so you should re-download those too.
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 has not yet been updated to SLiM 4; that should happen fairly soon.
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
Version 4.0
SLiM 4.0 has just been released. This is a major release, and breaks backward compatibility and reproducibility for many models. Given the magnitude of changes, some users may want to continue living on SLiM 3.7.1 for the time being; it is a stable release. However, a handful of bugs in 3.7.1 have been fixed in SLiM 4, as discussed below; in general, upgrading is thus recommended. This announcement will only touch on the highlights of what's new in SLiM 4; see the SLiM manual (chapter 29) for a more complete list, or the VERSIONS file for even more detail.
GENERAL OBSERVATIONS:
-
To use SLiM 4 with tree-sequence recording, you should update to the current versions of related Python packages; recommended versions are at least 0.5.2 for tskit, 1.2.0 for msprime, and 1.0 for pyslim. Version 1.0 of pyslim has just been released moments ago; huzzah! There have been some changes to pyslim; for a guide to upgrading your Python code from previous versions, see https://tskit.dev/pyslim/docs/stable/previous_versions.html.
-
SLiM's Eidos interfaces – the names of properties, methods, and classes – have changed significantly in 4.0. If you open and run your scripts in the new SLiMgui, it should offer to "autofix" most of these changes for you, updating your scripts to 4.0. Notably: in preparation for planned future work, fitness() callbacks are now called mutationEffect() callbacks, and fitness(NULL) callbacks are now called fitnessEffect() callbacks. Along the same lines, early() is no longer the default event type; now there is no default, and early() must be explicitly declared in your script. SLiMgui should autofix both of these changes for you. For changes that are not autofixed, please see the manual for further information.
-
Note that the macOS double-click installer no longer installs the manuals for you (matching the installers on other platforms). The manuals should now be downloaded separately from http://messerlab.org/slim/.
MAJOR NEW FEATURES:
-
The blockbuster new feature is that SLiM 4 supports simulating multiple species. Each species can have its own genetic architecture, its own behaviors and life history, and can live on its own timescale. You can easily simulate ecological interactions like predation, parasitism, mutualism, and competition, with either an individual-based or an aggregated approach. In the SLiM manual, a new section 1.9 summarizes the concepts involved in multispecies modeling, and a new chapter 19 provides an in-depth look with eight new recipes; see those for further details on this exciting advance, which makes it easy to model eco-evolutionary and coevolutionary dynamics in SLiM. Single-species models work much as they did before; this change is (almost) transparent for them.
-
InteractionType has undergone a complete redesign under the hood to support spatial interactions between individuals of different species. Most of these changes are transparent to the end user, although a few minor interface changes were made, and a few new methods were added; see chapter 29 for further details. The big user-visible change is that for many models the memory usage due to InteractionType, which could be quite large for large models with a large maximum interaction distance, will be substantially reduced.
-
A new killIndividuals() method allows nonWF models to simulate mortality at (almost) any time, such as when a predator eats a prey, or when a diease kills its host, without having to use fitnessScaling for this purpose. Several recipes now illustrate the use this method and discuss its applications.
-
A simulated species can now be a "no-genetics" species, with no chromosome and no mutations at all. This avoids some annoying boilerplate genetics initialization, and slightly increases efficiency, when a species is only present for its ecological effects and does not evolve.
-
To reduce order-dependency issues with callbacks, the order in which individuals are handled by callbacks can now be randomized. This order randomization is enabled by default, but can be turned off with initializeSLiMOptions().
There are lots of more minor new features; see chapter 29 for a more complete list.
IMPORTANT BUG FIXES:
-
Mutation frequencies/counts provided by the mutationFrequency() and mutationCount() methods could be incorrect in certain situations, expected to be rare; see https://groups.google.com/g/slim-discuss/c/ADkbalv6vcw for discussion.
-
Tree-sequence metadata could be malformed in certain conditions after removal of a subpopulation.
-
A crash could occur in removeMutations() if it was called on a null genome.
-
Not exactly a "bug", but: calcFST() gave an "average of ratios"; it now gives a "ratio of averages", following best practice.
NEW/REVISED RECIPES: Many, perhaps most, of the recipes in the SLiM manual have been revised for this release, to bring them forward to SLiM 4's Eidos interfaces; most of these changes are trivial and were simply "autofixed" by SLiMgui. A few recipes have also had bug fixes or improvements made, notably 18.14 and 18.15 (uniquing down mutations). There are some new recipes: besides the new multispecies recipes in chapter 19, we now have recipe 14.15 (showing how to make a truly biallelic model in SLiM, primarily of interest for matching SLiM to biallelic analytical models), and a new second part to recipe 16.19 showing a second way to do a nonWF range expansion model (using a survival() callback). If your own models are based upon SLiM recipes, it is strongly suggested that you check for changes in those recipes so that you benefit from the latest improvements and fixes.
INSTALLATION NOTES: If you are on Fedora, RedHat, CentOS, Arch, or the newly supported platforms openSUSE and SUSE Linux Enterprise, the SLiM installer for your Linux platform has already been updated (see chapter 2 of the SLiM manual for details). If you are on Debian or Ubuntu, the installation strategy is being overhauled; we will announce when an installer for those platforms is available, but it may take a while (the installation instructions in the manual for those platforms will either not work, or give you version 3.7.1, I imagine); in the meantime Debian and Ubuntu users will need to build from sources, sorry (see chapter 2 for instructions). 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 (perhaps two weeks, at a guess); a followup post will be made here when it is ready, and in the meantime you can build from sources. For those using conda, the new version is now available for all platforms (but does not give you SLiMgui, only slim). Everyone else can download the SLiM.zip source archive from the SLiM home page and build it themselves. The manuals, recipes, and reference sheets have also undergone revisions, so you should re-download those too. As noted at top, you must update to the latest pyslim, tskit, and msprime if you are using tree-sequence recording.
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 has not yet been updated to SLiM 4; that should happen fairly soon.
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
Version 3.7.1
SLiM 3.7.1 has just been released. This is a "patch release" containing only bug fixes. It is recommended for all users presently on SLiM 3.7, since it eliminates a couple of very visible bugs, including one common crash. It preserves backward compatibility and backward reproducibility with SLiM 3.7, except in cases where the bugs that were fixed might have caused incorrect results to be produced. No update to msprime, tskit, or pyslim is necessary with this new version.
IMPORTANT BUG FIXES:
-
Fixed a semi-reproducible crash when treeSeqOutput() is called. In cases where the crash did not occur, it is possible that data corruption occurred and output is incorrect. Users who used tree-sequence recording in SLiM 3.7 should therefore re-run their models just to be safe. This bug did not exist in previous SLiM versions.
-
Fixed a spurious self-test error that happened occasionally. The test itself was wrong; there was no problem with the code being tested.
-
Fixed a spurious error like "subpopulation p0 has already been used" that would happen in certain circumstances even though the subpopulation had not already been used.
-
Fixed a problem with the appearance of profile output in SLiMgui when in dark mode that made it unreadable.
NEW/REVISED RECIPES: Recipes 17.8 and 17.9 were updated to use sim_ancestry() instead of simulate(), to show current best practices with msprime. Recipe 18.13 was fixed to work with new pyslim changes.
INSTALLATION NOTES (see chapter 2 of the SLiM manual for details): Installers for macOS, Linux, and conda (for macOS, Linux, and Windows) are online now. The Windows pacman installer is not yet ready; a separate post will be made to slim-discuss when that installer has been updated.
SLIM BEGINNERS: If you're a beginner in SLiM, you might want to check out our recent paper "Evolutionary modeling in SLiM 3 for beginners" (http://dx.doi.org/10.1093/molbev/msy237). Beyond that, a complete SLiM Workshop is available online at http://benhaller.com/workshops/workshops.html, and is highly recommended for new users.
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
Version 3.7
SLiM 3.7 has just been released, and contains a lot of stuff. As usual, this announcement will just touch upon the most important things (although I'm getting more verbose with each release, since it seems useful to people). See the SLiM manual (chapter 29) for a more complete list, or the VERSIONS file for even more detail.
To use SLiM 3.7 with tree-sequence recording, you will need to update to the latest tskit, msprime, and pyslim. PLEASE NOTE that the necessary new version of pyslim is not yet released, but is expected in the next couple of days, and will be announced on slim-announce and slim-discuss; in the meantime, you can use the current GitHub head version of pyslim (see https://pyslim.readthedocs.io/en/latest/development.html), or you can twiddle your thumbs and google cat videos.
SLiM 3.7 preserves backward compatibility and backward reproducibility for most, but not all, models:
-
nonWF models that use addRecombinant() will likely require revision; see below for details
-
models based upon the manual's chromosomal inversion recipe (14.4) will likely require revision; see below
-
models that use relatedness() or reproductiveOutput will likely need to be re-run due to bug fixes
-
models that depend upon the exact format emitted when float values are printed will require revision, because a tenths place is now always emitted; for example, where SLiM 3.6 would have emitted "10" for a float value exactly equal to 10, SLiM 3.7 now emits "10.0" (to improve JSON/CSV/TSV read/write fidelity)
MAJOR NEW FEATURES:
-
Windows is now supported as a native platform (i.e., without using the WSL), including SLiMgui, thanks to work by Russell Dinnage. Please note that only 64-bit Windows is supported. There is an installer for Windows, using pacman, but the crank for that is still turning; do not attempt to use it now, it will either fail or give you an old pre-3.7 test build. I will post to slim-announce and slim-discuss again when the Windows installer is ready; in the meantime, you can attempt to build it yourself if you wish, which should be straightforward. See chapter 2 of the manual for installer/build instructions for Windows.
-
New first() events are added in WF and nonWF models, as a chance to execute code before anything else in a generation happens; many recipes in chapters 15 and 16 now use them.
-
New survival() callbacks in nonWF models can now be used to govern mortality/survival, and even to move individuals between subpopulations during the survival phase; see examples in recipes 16.12, 16.15, 16.22.
-
New DataFrame class added for representing data tables; CSV/TSV/JSON serialization of DataFrame/Dictionary; readCSV() for reading in DataFrames.
-
Overhauled handling of null genomes, which act as placeholders in models that involve haploidy; support for this type of model is much better, but the changes break backward compatibility in some respects for nonWF models that already used addRecombinant() with (NULL, NULL, NULL) to produce an empty offspring genome. Related new features to support null genomes: genomesNonNull property on Subpopulation, addEmpty() flags, addSubpop() flag, haploidDominanceCoeff property on MutationType controlling haploid/hemizygous fitness. See #205 (comment) for a detailed discussion of the ramifications. The new haplodiploidy recipe in section 16.24 shows off the power of this approach; existing models involving haploidy were also fixed up.
-
Improvements for spatial models, including new function summarizeIndividuals() for creating spatial maps from information about individuals (local density maps, for example), new methods localPopulationDensity() and clippedIntegral() for local area/density calculations, and a new spatialMapImage() method on Subpopulation to get an Image from a spatial map. Related improvements to Image: a new write() method to write out a PNG image; a new Image constructor to create a grayscale image from a matrix of values.
-
Tree-sequence recording improvements. Parent pedigree IDs are now kept in individual metadata, and the parent column in the individuals table is now supported and utilized. New name and description properties have been added to Subpopulation and are stored in the population table metadata, where tskit expects to find them, allowing subpopulations to be referenced by name in some python APIs. A new treeSeqMetadata() method returns a Dictionary of metadata for a .trees file on disk. The tskit "time unit" feature is now support, and you can set the time unit name with the timeUnit parameter to initializeTreeSeq().
-
SLiMgui improvements. The individuals view now has titles and action buttons for its subviews, for greater usability. The individuals view also now supports a Unified display mode for spatial models, showing individuals from all subpopulations overlaid onto a single landscape. The chromosome view now has an action button and a cleaner user interface design. The debugging output viewer now has tabs to see output your model has sent to LogFiles, or to ordinary files with writeFile(), allowing you to monitor all the output from your simulation in SLiMgui.
-
Eidos improvements. New string functions strcontains(), strfind(), strprefix(), and strsuffix(). New assert() function for raising an error if a given condition is not true, rnbinom() for negative binomial distribution draws, grep() for regular expression matching, tempdir() and sysinfo() for better cross-platform support.
IMPORTANT BUG FIXES:
-
Recipe 14.4, modeling chromosomal inversions, had important bugs and has been completely overhauled thanks to Sara Schaal, Vince Buffalo, Peter Ralph, and Andy Kern. DO NOT USE the old inversions recipe in SLiM 3.6 and earlier; existing models based upon that recipe should be re-run. See the manual's writeup in section 14.4 for details.
-
The relatedness() method of Individual has been completely rewritten to improve its generality and fix bugs, of which it had several. DO NOT USE relatedness() in SLiM 3.6 and earlier; existing models using that method should be re-run. We now have unit testing code for relatedness() and hope it is in a happier place.
-
The reproductiveOutput property was incorrect in models in which a proposed child was rejected by a modifyChild() callback; the rejected child would still be counted in the parent's reproductiveOutput. Models that would hit this bug should be re-run.
The above bugs were all spotted by vigilant users who were examing their simulation results closely, not just trusting that everything was working right. Be a vigilant user.
NEW/REVISED RECIPES: Several new recipes were added, including 16.22 (sperm storage with a survival() callback), 16.23 (tracking separate sexes in script in nonWF models), and 16.24 (modeling haplodiploidy using null genomes). Lots of recipes were tweaked, to adjust to changes or to show off new features; see especially recipes 9.2, 9.3, 9.6.2, 14.4, 16.11, 16.12, 16.13, 16.14, 16.15, 17.3 I/II.
Like I said, there's a lot in this release!
INSTALLATION NOTES (see chapter 2 of the SLiM manual for details): If you are on Fedora, RedHat, CentOS, Debian, or Ubuntu, the SLiM installer for your Linux platform has already been updated. The installer for Arch should be updated soon. 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 should be updated soon, as noted above. Conda has been updated with the new version. Everyone else can download the SLiM.zip source archive from the SLiM home page and build it themselves. The manuals, recipes, and reference sheets have also undergone revisions, so you should re-download those too. As noted at top, you must update to the latest pyslim, tskit, and msprime if you are using tree-sequence recording.
SLIM BEGINNERS: If you're a beginner in SLiM, you might want to check out our recent paper "Evolutionary modeling in SLiM 3 for beginners" (http://dx.doi.org/10.1093/molbev/msy237). Beyond that, a complete SLiM Workshop is available online at http://benhaller.com/workshops/workshops.html, and is highly recommended for new users.
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
Version 3.6
SLiM 3.6 is a major release, with some important bug fixes; it is strongly recommended over SLiM 3.5. It preserves backward compatibility/reproducibility with SLiM 3.5 (apart from bug fixes). Below are the most high-profile changes in SLiM 3.6; complete release notes are in the manual, chapter 29.
-
Improvements to tree-sequence recording, including: the ability to "retain" individuals (different from "remembering" them), with permanent=F passed to treeSeqRememberIndividuals(); the ability to keep "retained" individuals across simplification even when they are not a coalescence point, with retainCoalescentOnly=F passed to initializeTreeSeq(); and the ability to attach user-defined metadata to .trees files, with metadata= passed to treeSeqOutput()
-
SLiMgui has some nice new features, including: "debug points" that can be set to obtain debugging output on specific lines of your script as it runs; support for dark mode on macOS (automatic) and Linux (chosen in the preferences panel)
-
Eidos adds some nice things including: better support for sending output to stderr (or to the debugging output window, in SLiMgui); extensions to the Dictionary class to support dataframe/struct/tuple-like usage patterns; support for Unicode characters in variable names, including accents, Chinese characters, and even emojis (use wisely)
-
Major bug fixes. (1) Using takeMigrants() could cause data corruption or crashes, in very unusual circumstances. This was introduced in SLiM 3.5. It is unlikely to bite most users, but if you use takeMigrants() you should not use SLiM 3.5, period. (2) The "reproductive output" property added in SLiM 3.5 would be incorrect when takeMigrants() is used; again, do not use this method in SLiM 3.5. (3) Several other bugs that could cause a crash, a runtime error, or a large memory leak, but that would not cause data corruption; see the full release notes for details on these.
You can obtain SLiM 3.6 from the SLiM home page at http://messerlab.org/slim/; note that the manuals, recipes, and reference sheets have also undergone revisions. Note that the manuals now have PDF "document outlines", i.e. tables of contents visible in your PDF reader, for easier navigation.
If you're a beginner in SLiM, you might want to check out our recent paper "Evolutionary modeling in SLiM 3 for beginners" (http://dx.doi.org/10.1093/molbev/msy237). Beyond that, a complete SLiM Workshop is available online at http://benhaller.com/workshops/workshops.html, and is highly recommended for new users.
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