hentablihamza/practical-biopython-course
About
Hands-on Biopython course: 12 beginner-to-intermediate Jupyter/Colab notebooks from sequences to BLAST, alignments, phylogenetics, and protein-ligand structures, following the drug target EGFR with real public data.
Learning & EducationMeasured star growth
- in 24h
- Collecting history
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalPractical Biopython Course
A hands-on, 12-notebook course that takes you from Python basics to sequence analysis, BLAST, alignments, phylogenetics, and protein–ligand structures with Biopython — all in your browser with Google Colab.
Every notebook runs end to end on free Google Colab with one click — no installation, no setup. The course follows one real drug target from gene to drug-bound structure: EGFR, the epidermal growth factor receptor targeted by lung-cancer drugs such as erlotinib and osimertinib. All data are real, public records from NCBI, UniProt, and the PDB, and never invented numbers.

From Notebook 12: the 15 EGFR residues within 4 Å of erlotinib (PDB 1M17), compared across 15 kinases. Catalytic residues such as Lys745 and Asp855 are shared by all of them, while the gatekeeper Thr790 and the hinge region vary: that is where inhibitor selectivity comes from.
Who this is for
- Biology, chemistry, and pharmacy students and Ph.D. researchers starting in bioinformatics or computational drug discovery.
- Structural biologists and medicinal chemists who want to script the sequence and structure work they now do by hand on websites.
- Programmers entering the life sciences who want a biology-grounded tour of Biopython.
You need only basic Python. Notebook 01 covers the Python you need; everything else is taught as it appears.
Syllabus
Click a badge to open that notebook in Colab, or browse the notebooks/ folder.
Each notebook has clear learning objectives, explanations in Markdown, runnable code, and exercises with collapsible solutions. Work them in order — later notebooks reuse ideas and data from earlier ones.
How to use it
Option 1 — Google Colab (recommended, nothing to install)
Click any Open in Colab badge above. The first cell installs Biopython and downloads the course data automatically.
Option 2 — Run locally
git clone https://github.com/hentablihamza/practical-biopython-course.git
cd practical-biopython-course
# with conda
conda env create -f environment.yml
conda activate practical-biopython-course
# or with pip
pip install -r requirements.txt
jupyter notebook # open the notebooks/ folder
Online and offline
Notebooks 05 (NCBI Entrez), 10 (PDB download), and 12 (UniProt) query live web services when they can and fall back automatically to cached copies in data/ when there is no internet. Notebook 08 reads a cached BLAST result by default because remote BLAST jobs can wait in NCBI's queue for many minutes; flip RUN_LIVE_BLAST = True to submit your own. Set the environment variable COURSE_OFFLINE=1 to force the cached path everywhere (this is what CI does).
When you use NCBI, set Entrez.email to your own address, as NCBI's usage policy asks (Notebook 05 explains the rules).
Datasets
Small, real, public datasets are committed under data/ with full provenance in data/README.md and retrieval dates in data/provenance.json:
- UniProt sequences of 15 protein kinases (human ErbB family, EGFR orthologues, and drug targets such as ABL1, BTK, BRAF, ALK) plus EGFR feature annotations.
- NCBI RefSeq EGFR mRNA
NM_005228.5(GenBank and FASTA) and cached Entrez search results. - A cached BLAST search of the EGFR kinase domain against Swiss-Prot.
- A multiple sequence alignment of the 15 kinase domains (FAMSA).
- PDB 1M17: EGFR kinase domain bound to erlotinib (mmCIF and PDB formats).
Refresh everything from the original sources with scripts/refresh_cache.py.
Related open-source projects
This course is part of a small set of open tools and courses for computational drug discovery:
- practical-cheminformatics-course — the companion course: 12 Colab notebooks from RDKit basics to QSAR and virtual screening.
- chembl-easy — one-command clean, ML-ready bioactivity downloads from ChEMBL (e.g. for the EGFR target used here).
- chem-curate — reproducible bioactivity and structure curation for QSAR.
- qsar-split-bench — benchmark random, scaffold, cluster, and time splits to detect data leakage.
Author
Hamza Hentabli, Ph.D. — AI/ML drug discovery & cheminformatics scientist, and former teacher who has mentored Ph.D. and master's students. This course distills that teaching into material anyone can run.
- GitHub: @hentablihamza
- Google Scholar: publications
- ORCID: 0000-0002-9530-2815
If these materials help your work or teaching, please cite them (see CITATION.cff). Issues and suggestions are welcome.
Explore related projects
Loading…