Instructing Machines

Home

Bioinformatics · Aarhus University · 2026

Instructing Machines is a fourteen-week introduction to programming for molecular biology, written for students who will have a model at their side from the first line they type. Every week pairs a piece of Python with a way of working alongside an AI and a way of checking what it hands back.

For students

15 minutes to get started

The course folder, Python, the editor and the terminal are all set up in one pass, most of which is waiting. By the end of the course you can: Read code the way the machine does. Write Python to solve small problems. Break a problem into sub-problems and write them as testable functions. Verify code written by an AI, or by someone else. Judge how much of a task to hand over, and how much to keep. Explain why an AI is only as useful to you as your ability to check it.

For teachers

Take it and make it yours

Built for undergraduates in Molecular Biology and Molecular Medicine at Aarhus University, and MIT licensed. If you teach a similar course, fork it. Notes, slides, exercises and projects, all in the repository. Seven notebook widgets, installable as packages. A JupyterLite demo, so students can try before installing. A written account of the course design and the AI arc. A live demo of the same material runs in the browser using JupyterLite. Fork it on github

Teaching AI in programming

AI integrates in structures ways across the course to teach students how to safely hand more and more over to the AI. In a nutshell, the principle is this simple:

An AI is useful to you up to the limit of what you can specify and verify. The course spends fourteen weeks raising that limit.

Say computing the GC content of a DNA sequence was a very complex problem. You can only ask an AI to produce the code for you if you can specify that it is “the fraction of bases in a DNA sequence that are G or C”:

def gc_content(seq):
    gc = seq.count("G") + seq.count("C")
    return gc / len(seq)

and you can only verify that you got what you asked for if you can define tests that only correct code will pass:

assert gc_content("GCGC") == 1.0
assert gc_content("ATAT") == 0.0

Week outline

Across the fourteen weeks, Python topics and AI practice are taught together and applied in small projects from molecular biology.

Wk Lectures Exercises Project
35 Week 1 chapters Week 1 chapters
36 Week 2 chapters Week 1 chapters
37 Week 3 chapters Week 2 chapters
38 Week 4 chapters Week 3 chapters
39 Week 5 chapters Week 3 chapters
40 Week 6 chapters Week 4 and 5 chapters Translating ORFs
41 Week 7 chapters Week 6 chapters Primer analysis
43 Week 8 chapters Week 7 chapters Pairwise alignment
44 Week 9 chapters Week 8 chapters Codon usage
45 Week 10 chapters Week 9 chapters HIV sub-groups
46 Week 11 chapters Week 10 chapters Sequence trees
47 Week 12 chapters Week 11 chapters Finding genes
48 Week 13 chapters Week 12 chapters Genome assembly
49 Week 14 chapters Week 13 chapters