Simulations with Msprime

Georgia Tsambos, June 2022


How to run this activity

The activity on simulations will be run through Jupyter Notebooks. So, just as in the introductory tutorial on Python and Jupyter Notebooks by Hannes Svardal, you will first need to start a Jupyter Notebook on your AWS instance and connect to it.

Connect to the instance using SSH. Use “wpsg” as the username and the usual password. You can do that either through Guacamole in your web browser:

Or you can use SSH from your terminal:

Once connected through SSH:

  • Navigate into the tutorial directory: cd ~/workshop_materials/a16_msprime
  • Start a screen session by typing: screen
  • Confirm with the “Return” key
  • Start the conda virtual environment (you will be using an updated version of the conda environment used for the sweep detection activity):
    conda activate sweeps-env
  • Start the notebook server: jupyter notebook --no-browser --port=8889
  • The command blocks the terminal. That is normal. Keep it running. You can detach from the screen and get back to a functional terminal by typing “Ctrl + a, d” (first “Ctrl + a”, then “d”)
  • In your local browser, navigate to the web address: http://ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com:8889 (replace XXX with your Amazon instance IP address
  • Then you should see the contents of the folder in which your instance is running.

 
Open the jupyter notebook 1-Introduction-and-motivation.ipynb. All instructions and background information about the activity will be given in the Jupyter Notebooks, also available on github.