Before you start
- A little basic Python from Python Basics helps when you reach the code-fetching part, but is not strictly required.
- Any term new? The Glossary has it.
Learning objectives
By the end of this lesson you will be able to: name the big public repositories such as NCBI, Ensembl, SRA, GEO, and UniProt, fetch data from them in code rather than by clicking, and search a database instead of only downloading from it.
One of the best things about bioinformatics is how much data is free and public. Decades of experiments from labs worldwide sit in a few major databases, waiting for you to analyze them. Knowing which database holds what is half the battle.
The big five
NCBI
The U.S. hub for sequences, genes, and genomes. Home of GenBank and the Entrez search system - your first stop for a gene or a sequence.
ncbi.nlm.nih.gov →Ensembl
Beautifully annotated genomes for humans and many species, with a genome browser. Great for "what genes are near this position?"
ensembl.org →GEO
Gene Expression Omnibus - a giant archive of functional genomics experiments, mostly gene expression (including RNA-seq) you can re-analyze, like the dataset in our flagship project.
GEO →SRA
The Sequence Read Archive - the raw FASTQ reads behind published studies. This is where you go for the original sequencing data.
SRA →UniProt
The reference for protein sequences and what they do - function, structure links, and disease associations.
uniprot.org →Decode the jargon: accession numbers
Every record has a unique ID called an accession - like NM_000207 (the insulin mRNA) or GSE52778 (a GEO dataset). Accessions are how you (and your code) ask for one exact record. Collect the accession from a paper or a search, and you can fetch the data anywhere.
Fetching data in code (not by clicking)
You can download by hand from these websites, but the real power is pulling data programmatically so your analysis is reproducible. Biopython's Entrez module talks to NCBI for you. (NCBI just asks for an email so they can contact you about heavy usage.)
▶ Code along
In Colab, run !pip install biopython first.
from Bio import Entrez, SeqIO Entrez.email = "your.email@example.com" # use your real email: NCBI uses it to contact you before blocking heavy traffic # fetch the human beta-globin mRNA (the sickle-cell gene) by accession handle = Entrez.efetch(db="nucleotide", id="NM_000518", rettype="fasta", retmode="text") record = SeqIO.read(handle, "fasta") handle.close() print(record.description) print("Length:", len(record.seq), "bases")
That's the same pattern from the Python project - and it works for any accession. Swap the id and you can fetch any sequence record, on demand, with a few lines of code.
ncbi.nlm.nih.gov/nuccore/NM_000518 (Send to → File → FASTA) and load it with SeqIO.read("file.fasta", "fasta").Searching, not just fetching
Don't have an accession yet? Entrez.esearch finds matching records first:
search = Entrez.esearch(db="nucleotide", term="BRCA1 Homo sapiens mRNA", retmax=5) results = Entrez.read(search) print(results["IdList"]) # matching IDs (NCBI's numeric IDs, not NM_ accessions; add idtype="acc" to get accessions)
Search to find IDs, then fetch those IDs - that two-step dance is the heart of programmatic data access.
Check your understanding
NM_000518). It lets you - or your code - request that exact record reproducibly, from anywhere.Entrez.email before fetching?Entrez.esearch finds matching record IDs first, then you fetch those IDs. Search to find, then fetch is the heart of programmatic access.Sources & further reading
- Sayers EW, Beck J, Bolton EE, et al. Database resources of the National Center for Biotechnology Information in 2025. Nucleic Acids Research 53: D20-D29, 2025. doi:10.1093/nar/gkae979
- Barrett T, Wilhite SE, Ledoux P, et al. NCBI GEO: archive for functional genomics data sets--update. Nucleic Acids Research 41: D991-D995, 2013. doi:10.1093/nar/gks1193
- Katz K, Shutov O, Lapoint R, et al. The Sequence Read Archive: a decade more of explosive growth. Nucleic Acids Research 50: D387-D390, 2022. doi:10.1093/nar/gkab1053
- Himes BE, Jiang X, Wagner P, et al. RNA-Seq transcriptome profiling identifies CRISPLD2 as a glucocorticoid responsive gene that modulates cytokine function in airway smooth muscle cells. PLoS One 9: e99625, 2014. (GSE52778, the airway dataset) doi:10.1371/journal.pone.0099625
Last reviewed: October 2026.
