Master Python
for Biology

A practical programming course for biology students. No prior coding experience required!

8
Sessions
8
Labs
100%
Biology Focused
3
Assignments

Section 1: Python Basics

Build your Python foundations through hands-on biological applications. Sessions 1–4 take you from your first variable to writing robust, testable functions.

Available
1

Data Types, Variables and Basic Operations

  • ▸Variables and assignment
  • ▸Core types: int, float, bool, str
  • ▸Arithmetic and string operators
  • ▸print() and f-strings
Available
2

From One Sequence to Many: Lists, Strings & Maps

  • ▸Lists: holding a collection of sequences
  • ▸Strings as sequences: indexing & slicing
  • ▸String methods: .replace(), .find()
  • ▸Dictionaries: mapping codons to amino acids
Available
3

Control Flow: Teaching a Program to Run Itself

  • ▸for loops and the accumulator pattern
  • ▸if / elif / else inside a loop
  • ▸Looping through a dictionary with .items()
  • ▸range() and translating a gene
Available
4

Functions, Files and Error Handling

  • ▸Defining functions and return values
  • ▸Scope, type hints and docstrings
  • ▸Reading and writing files
  • ▸try / except and raising errors

Section 2: Python and Data in Biology

Four sessions on real data: a neuron from a lab in this building, a pollinator survey from another, then cancer genomics, where you learn to plot, explore and test the data the final project is built on.

Available
5

Arrays — One Neuron, Many Trials

🐭NeurobiologyWhisker touch — Maravall Lab, Sussex
  • ▸Classes and objects: attributes and methods
  • ▸Imports and the random module
  • ▸numpy arrays, vectorisation and the method menu
  • ▸Boolean filtering and np.where on a real neuron
Available
6

DataFrames — Who Pollinates Your Dinner?

🐝EcologyUrban pollinator survey — Nicholls Lab, Sussex
  • ▸The DataFrame and the Series: two receptions
  • ▸Five steps from raw table to answer
  • ▸Masks, a new column and sort_values
  • ▸groupby — split, apply, combine
Available
7

Plotting — Making Data Visible

🧬Cancer biologyCancer Dependency Map (DepMap)
  • ▸How a figure shows data: kinds of data, kinds of plot
  • ▸fig and ax: building a basic figure
  • ▸Scatter, colour, box plots and two panels
  • ▸Who needs SOX10? A DepMap case
Under Construction
8

Exploratory Data Analysis and Statistics

  • ▸Look before you test: distributions and summaries
  • ▸Comparing two groups: box plot, median difference
  • ▸The Mann–Whitney test and what a p-value means
  • ▸Many tests, many chances: multiple testing
Final project70%Week 11

🧬 Does your gene respond to p53 loss?

Decide whether one gene’s expression responds to loss of p53 function in human tumours — and if so, in which direction.

  • ▸One gene and one cancer type each, from real TCGA patient data
  • ▸Clean a clinical export, test a hypothesis, draw the figure
  • ▸Six functions, each with self-checks on a worked example
  • ▸Marked on your analysis, your code quality and your GitHub history

Bonus: Beyond the Course

Two extra sessions after week 11, once the final project is in. Not assessed: come for what you want to do next.

Under Construction
9

Analysing Images in Python

🔬Cell biologyFluorescence microscopy — Hochegger Lab, Sussex
  • ▸An image is a 2-D array
  • ▸Cropping, indexing and displaying
  • ▸Otsu thresholding: finding the nuclei
  • ▸Counting, measuring, and a cell-cycle profile
Coming Soon
10

Coding with Agentic AI

  • ▸What a coding agent is, and what it does on your machine
  • ▸Briefing an agent: context, scope and a clear goal
  • ▸Reviewing what it wrote: tests, diffs and git
  • ▸When to use one, and when to write it yourself

Learning Resources