Intro to Python
Part III Systems Biology
University of Cambridge
Overview
This course is designed to equip all members of the Part III Systems Biology cohort at the University of Cambridge with a foundational understanding of Python. This will be utilised in various subsequent sections of the programme. While no prior knowledge of Python is required, basic familiarity with coding is assumed. Additionally, this course may serve as a valuable introduction for those interested in learning Python for data science, particularly for those working with biological data.
- Introduce participants to the core features of Python, emphasising its strengths and limitations in data science applications.
- Provide a comprehensive overview of Python syntax, data types, and operators.
- Cover key programming concepts in Python, including loops, conditionals, functions, and classes; alongside an introduction to the object-oriented programming paradigm.
- Discuss error handling, edge case management, memory management, code optimisation, and benchmarking.
- Introduce package installation and management, as well as environment management using pip and conda.
- Guide participants in the manipulation and visualisation of biological data using widely-used Python packages, including NumPy, Pandas, Matplotlib, and Seaborn.
Target Audience
This course is targeted at Part III Systems Biology students at the University of Cambridge. All students attending should have some basic programming experience, however familiarity with Python is not essential.
Some participants may have completed the introductory Python practical in the Part II Mathematical and Computational Biology module of the Natural Sciences Tripos. This course will refresh and extend further the concepts introduced there.
Prerequisites
- Have some prior experience in coding, whether in Python or another programming language.
- Have followed the instructions on the Data and Setup page to install python, mamba/conda, and jupyterlab.
- An understanding of biological terms (GCSE level Biology) would be beneficial.
Exercises
Exercises in these materials are labelled according to their level of difficulty:
Level | Description |
---|---|
Exercises in level 1 are simpler and designed to get you familiar with the concepts and syntax covered in the course. | |
Exercises in level 2 are more complex and may combine different concepts together and apply it to a given task. | |
Exercises in level 3 may be challenging and require going beyond the concepts and syntax introduced to solve new problems. |
Citation
Please cite these materials if for example:
- You adapted or used any of them in your own teaching.
- These materials were useful for your research work.
You can cite these materials as:
Shah, K. (2025). Intro to Python, Part III Systems Biology, University of Cambridge. https://doi.org/10.5281/zenodo.14651795
Or in BibTeX format:
@misc{YourReferenceHere,
author = {Shah, Kavi Haria},
month = {1},
title = {Intro to Python, Part III Systems Biology, University of Cambridge},
url = {https://doi.org/10.5281/zenodo.14651795},
year = {2025}
}
About the authors:
Acknowledgements
References
Tavares, H., van Rongen, M., Cardona, A. (2024). Course Development Guidelines. https://cambiotraining.github.io/quarto-course-template/
Python Programming, NST Part IB Mathematical and Computational Biology, ac812.github.io/mcb-python/
W3Schools, Python Operators, https://www.w3schools.com/python/python_operators.asp
Python Documentation, https://docs.python.org/3/library/stdtypes.html#boolean-operations-and-or-not
Waskom, M. L., (2021). seaborn: statistical data visualization. Journal of Open Source Software, 6(60), 3021, https://doi.org/10.21105/joss.03021. https://seaborn.pydata.org/
J. D. Hunter, “Matplotlib: A 2D Graphics Environment”, Computing in Science & Engineering, vol. 9, no. 3, pp. 90-95, 2007. https://matplotlib.org/stable/index.html
NumPy Documentation https://numpy.org/doc/
Pandas Documentation https://pandas.pydata.org/docs/
Rachel Lyne et al. 2022, HumanMine: advanced data searching, analysis and cross-species comparison, https://doi.org/10.1093/database/baac054
Cock, P.J.A. et al. Biopython: freely available Python tools for computational molecular biology and bioinformatics. Bioinformatics 2009 Jun 1; 25(11) 1422-3 https://doi.org/10.1093/bioinformatics/btp163 pmid:19304878
The cryptography developers cryptography-dev@python.org cryptography 43.0.1 https://pypi.org/project/cryptography/ https://cryptography.io/en/latest/
Images/Data Sources
Note: The data has been manipulated/modified to create exercises and therefore not representative of the source
maricuchi_reina; Dog, Animal, Mammal image. Free for use.; via Pixabay; https://pixabay.com/photos/dog-animal-mammal-canine-domestic-8946829/
OpenClipart-Vectors; Brain Neuron Nerves royalty-free vector graphic. Free for use & download.; via Pixabay; https://pixabay.com/vectors/brain-neuron-nerves-cell-science-2022398/
Humanmine https://humanmine.org/humanmine
UK HSA infectious diesease data https://www.gov.uk/government/publications/