SLiM Workshops: Hardware and Software Setup  



Computer hardware:

Workshops may provide machines for every attendee to use, if a computer hall is available; see the workshop announcement. If machines are not provided, every attendee must bring their own laptop, or previously arrange with the workshop host for a loaner laptop from the host institution. Machines should generally be Macs running macOS 10.13 (or later; 10.15 or later is recommended), or Linux boxes running a supported distribution (such as Ubuntu 18.04 LTS or 20.04 LTS), or Windows machines compatible with SLiMgui (64-bit, Windows 10/11 or later recommended), with at least 8 GB of RAM. Note that SLiMgui, not just SLiM, is required for the workshop, as we will be doing many interactive exercises that leverage SLiMgui. The workshop will not be terribly processor-intensive; fast machines are not essential. No special graphics hardware, etc., is needed.

Computer software:

If you are bringing your own machine, there are several software packages that need to be installed. Please install and test all software prior to the beginning of the workshop, and if you have installation issues, please resolve them before the workshop. With as many as 30 attendees at a workshop, I simply cannot begin the workshop by helping each person install the necessary software on their personal machine, nor can I provide individual help for everyone's installation issues over email. The IT department at your institution should be able to help you with the installation of software. In everything that follows, Terminal.app refers to the application /Applications/Utilities/Terminal.app. The software needed:

• SLiM and SLiMgui (the current version). Complete installation instructions for all supported platforms can be found in chapter 2 of the SLiM manual; for macOS, Windows, and many Linux distributions an installer is available that makes it easy. Once you have installed it, test it with the following steps. (a) Launch the application /Applications/SLiMgui.app to ensure that it launches without errors. (b) Run Terminal.app and execute the commands:

slim -testEidos
slim -testSLiM

to ensure that the slim command-line tool runs correctly and passes its self-tests.

That's all that's needed for SLiM and SLiMgui, but to do various other things in the workshop – to work with tree-sequence recording in Python, in particular – other software is needed too. For users on Linux, I will just summarize by saying that you should install a reasonably recent Python 3 install (3.7 or later), the GNU Scientific Library (GSL), the Python packages numpy, matplotlib, msprime, tskit, and pyslim, and R 3.x or later; I imagine Linux users can figure out the details.

Mac users are often less used to installed Unix-based software, so here are more explicit instructions for macOS users:

• The Apple Developer Tools and the Apple Command-Line Tools packages. It may or may not prove necessary for you to install these, depending upon the package installer you use, etc., but they're useful to have installed anyway. The former package can be installed through the App Store as the Xcode package, and then you can run Terminal.app and execute xcode-select --install to install the command-line tools. Alternatively, you can get both packages from the Apple developer website; you will probably need an Apple login to proceed. Make sure that you install the correct version of the developer tools for your macOS version; the simplest solution is to be on the latest version of both macOS and the developer tools.

• The package installer of your choice – I use MacPorts, but Homebrew or conda should also work. For MacPorts, see the MacPorts installation page. MacPorts (and probably other package installers) requires that you have the Apple Developer Tools package and the Apple Command-Line Tools package installed first; the necessary links are provided on the MacPorts page. Once the Apple tools are installed, installing MacPorts can be done with a double-click installer available on that page.

If you use the conda package installer, please see these notes on conda installation, written up by Ian Caldas (thanks Ian).

• Python 3.7 or later. Personally, I install Python 3.9 with MacPorts (sudo port install py39-python-install, sudo port install py39-pip), but using Homebrew or conda should also be possible. To test: run Terminal.app and execute the command python3. You should get an interactive Python prompt; press control-D to exit back to the shell. If you then execute python3 --version it should print a version number >= 3.7; if not, you need to upgrade to a more recent version.

• The GNU Scientific Library (GSL). This is required by the msprime Python package, and it may be pulled in automatically when you install msprime. If not, I install it with MacPorts (sudo port install gsl), but other methods may also work. If there is a problem with this installation, you will find out when you try to install msprime in the next step.

• The Python packages numpy, matplotlib, msprime, tskit, and pyslim. I install these with python3 -m pip install <package> --user, but there are various other installation methods. I install Python packages with --user because installing them system-wide does not work for me on macOS, but probably this is just some trivial issue with my path or permissions or some such. To test: run Terminal.app and execute the commands:

cd ~/Desktop
python3

At the Python prompt, type:

import numpy as np
import matplotlib as plt
import msprime, tskit, pyslim

If those commands all execute without errors, you are probably good, but one additional check is advised. Do not close the Terminal window, but go to Safari and download the file installTestPython.trees to the Desktop. Then switch back to Terminal, and – still at the interactive Python prompt – type the following commands one at a time:

ts = tskit.load("installTestPython.trees").simplify()
mutated = msprime.mutate(ts, rate=1e-7, random_seed=1, keep=True)
mutated.dump("installTestOUT.trees")

If everything is installed correctly, a new file named installTestOUT.trees should be created on the Desktop.

You should be running the current versions of all of these packages, to sync up with the current version of SLiM; these software packages work together closely, so versions are important. If you experience problems with your Python install, the usual solution is just to burn it to the ground and start over: uninstall/delete everything related to Python, then reinstall everything from scratch. Debugging installation/versioning issues is just not worth the time it takes.

• R. Any version of R from the last couple of years should be fine (say, 3.6.0 or later); we will not be using cutting-edge features. No packages are needed beyond the base install, but the Rscript command-line utility should be included. A double-click installer for R can be downloaded from CRAN's R for Mac OS X page. To test: download the linked file installTestR.R to the Desktop, then run Terminal.app and execute the commands:

cd ~/Desktop
Rscript installTestR.R

After less than a second, you should see output including null device, and a new file named plot_1.pdf should be created on the Desktop. If you double-click that file, a plot with a jagged red line should open, probably in Preview.app (the line covers only part of the x-axis; that is fine). To check that the R.app GUI front end is correctly installed, find and launch /Applications/R.app; if it launches without errors you should be fine.