Introduction to Bioinformatics Programming in Python
Learn to analyse biological data with Python.
You do not need any experience. We start with a short, friendly first exercise that runs in your browser. There is nothing to install.
Reading Python is like reading English
Code is a list of instructions the computer follows from top to bottom, like a recipe. Read each note (the line starting with #), then the code under it. They say the same thing.
# Say hello.
print("Hello")
# Remember that the age is 25.
age = 25
# If the age is more than 18, say "adult".
if age > 18:
print("adult")Start the 10-minute warm-upOpens in Google Colab. You need a free Google account. Once it opens, choose File, then Save a copy in Drive.
First star
Back from the warm-up? Type the GC fraction you wrote down, rounded to 3 decimal places.
Stuck? Get a nudge
It is the number printed by the last cell, the one with round(gc, 3). Run that cell again in the notebook if you need to.
Your progress
Pick any stage to jump to it. Stars are saved in this browser.
| stage | star1 | star2 | star3 | |
|---|---|---|---|---|
| Part 1: learn by running code (all in Colab, nothing to install) | ||||
| start | Warm-upreading code like English, in about 10 minutes | NaN | – | – |
| 0 | Python building blocks Corevalues, lists, dictionaries, libraries, tables · about 60 min | NaN | NaN | – |
| 1 | Notebooks, text and loops Corecells, kernel memory, text, loops · about 45 min | NaN | NaN | – |
| 2 | Reading error messages Corewhat error messages mean and what to do · about 30 min | NaN | NaN | – |
| 3 | Tables with pandas Coreload a table, pick columns, filter rows · about 40 min | NaN | NaN | – |
| 4 | Calculations and groups Corenew columns, groups, pivots · about 40 min | NaN | NaN | – |
| 5 | Writing functions Corereuse code with a function · about 40 min | NaN | NaN | – |
| 6 | Checking real data Corelook at real data before trusting it · about 45 min | NaN | NaN | NaN |
| 7 | Summarising by region Coregroup, summarise, interpret · about 40 min | NaN | NaN | NaN |
| 8 | Plotting distributions Corehistogram, box plot, violin, strip, count · about 40 min | NaN | NaN | – |
| 9 | More plots Optionalscatter, line, heatmap · about 45 min | NaN | NaN | – |
| 10 | Checking your conclusion Coredoes the answer survive a different rule? · about 40 min | NaN | NaN | NaN |
| Part 2: your own computer, then the cluster | ||||
| 11 | Setting up your computer Level upterminal, Miniconda, environments, VS Code · about 60 min | NaN | NaN | – |
| 12 | Organising a project Level upfolders, downloads, checksums, helper files · about 45 min | NaN | NaN | – |
| 13 | Running a script Level upone command that rebuilds a result · about 30 min | – | – | – |
| Extra | ||||
| extra | DNA sequences with Biopython Optionaltranslate and read sequence files · about 40 min | – | – | – |
Already know some Python? Where should I start?
Special thanks to Nilay!