Fiches de cours 2017-2018


Nature, In Code - Biology in JavaScript


Lecturer(s) :

Salathé Marcel




Every year


Nature, In Code teaches basic biological principles - such as natural selection, epidemics, the evolution of cooperation - by implementing those priciples in the programming language JavaScript. The course teaches both the biological principles and the programing language at the same time.


This course is based on a book "Nature, in Code" which has the following chapters, and which will be followed in the course:

1. Introduction

2. Hardy-Weinberg equilibrium ' the null model of evolutionary biology

3. Stochastic drift

4. Mutation

5. Spatial models

6. Natural Selection

7. Infectious Disease Spread

8. Evolution of Cooperation

With the exception of chapter 8, all content is available as a MOOC on the EdX platform under the title "Nature, in Code".

This is an online course available as of May 1, 2017 which can be taken anytime throughout the year. Please get in touch with Prof. Salathé once you have finished all the material in the book and the course, in order to define a capstone project.


Students must submit an HTML document as a capstone project report. This HTML document must be describing and implementing a model in JavaScript. The models need to be discussed and approved beforehand with the project team.


Population Genetics

Computational Thinking


Learning Outcomes

By the end of the course, the student must be able to:


Moodle Link

In the programs

  • Biotechnology and Bioengineering (edoc), 2017-2018
    • Semester
    • Exam form
      Project report
    • Credits
    • Subject examined
      Nature, In Code - Biology in JavaScript
    • Lecture
      20 Hour(s)
    • Exercises
      20 Hour(s)
    • Practical work
      50 Hour(s)

Reference week

Exercise, TP
Project, other


  • Autumn semester
  • Winter sessions
  • Spring semester
  • Summer sessions
  • Lecture in French
  • Lecture in English
  • Lecture in German