Skip to content

Version 4.1

Compare
Choose a tag to compare
@bhaller bhaller released this 06 Dec 21:35
· 240 commits to master since this release

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