Skip to content

Version 3.7

Compare
Choose a tag to compare
@bhaller bhaller released this 15 Dec 22:05
· 883 commits to master since this release

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