From Clicking to Scripting · Subtopic 7 of 7 · 13 min
Reproducibility and the BRCA1 Dossier (Capstone)
Back in Why Bioinformatics Runs on Databases, the promise was that you would be able to pull together everything known about one gene — sequence, variants, protein, structure, pathway, literature — and trust that someone else could rebuild the exact same picture later. This lesson is where you cash that promise in, by building a complete, version-pinned BRCA1 dossier.
The rule that makes a dossier reproducible
A dossier is only as trustworthy as its citations, and a database citation is only trustworthy if it is pinned. You met accession.version — the accession plus a dot and an integer, like NM_007294.4 — back in Versioning: accession.version and Why Records Change. That lesson explained why records change; this one is about what you owe the reader when they do.
The rule is simple to state and easy to violate under time pressure: always cite the full accession.version, never the bare accession. Writing "BRCA1 mRNA: NM_007294" in a methods section is not wrong, exactly — it is incomplete in a way that will eventually mislead someone. NM_007294 has gone through multiple versions as RefSeq curators corrected and re-annotated it; .4 is the version current as of writing, but by the time a reader checks it, NCBI may have released .5. If your dossier says only NM_007294, a reader who fetches it next year gets whichever version is live then — possibly not the one you analyzed.
Never assume a record is frozen just because it looks stable. RefSeq, UniProt, ClinVar, and Ensembl all revise, reclassify, and occasionally suppress records. A ClinVar variant classified "uncertain significance" this month can be reclassified "pathogenic" next month as more evidence accumulates — the accession stays the same, but what it asserts does not.
Recording builds and release dates, not just IDs
Pinning the accession is necessary but not sufficient. Two more facts belong in every dossier's methods section:
- The genome build. BRCA1's coordinates depend entirely on which assembly you are using — the Genome Assemblies and Builds lesson covered why. On the current build, GRCh38.p14, BRCA1 sits on
NC_000017.11at43,044,295-43,170,327(minus strand). On the older GRCh37/hg19 build, those coordinates point somewhere else entirely on the same chromosome. - The database release or access date. ClinVar publishes monthly releases; UniProt and KEGG stamp each entry with a last-modified or release date. "ClinVar, accessed 2026-07-20" is a real, checkable fact. "ClinVar" alone is not.
| What you cite | Why the date/version matters |
|---|---|
NM_007294.4 | RefSeq re-versions on re-annotation; the bare accession drifts |
GRCh38.p14, NC_000017.11 | Coordinates are build-specific; GRCh37 numbers differ |
ClinVar release, e.g. 2026-07 | Classifications shift monthly as evidence accumulates |
| UniProt entry version | Swiss-Prot entries get re-curated; sequence version can lag entry version |
Assembling the dossier: web UI pass
Start where the "Searching Web UIs Well" lesson left you — in the browser, confirming each record by eye before you script anything. For BRCA1, that means six stops:
- RefSeq sequence — NCBI Gene ID
672→ the MANE Select transcriptNM_007294.4, proteinNP_009225.1, on genomicNC_000017.11. - ClinVar variants — filtered to BRCA1, pathogenic/likely-pathogenic, noting the release date shown on the page.
- UniProt protein —
P38398(BRCA1_HUMAN), noting the entry version in the "Entry history" tab. - PDB structure —
1JNX(the BRCT-repeat region, residues 1646-1859, crystal structure) and1JM7(the BRCA1/BARD1 RING-domain heterodimer, solution NMR structure). - KEGG pathway —
hsa:672, which places BRCA1 in the homologous-recombination pathway map covered in the KEGG and Reactome lesson. - PubMed literature — the review linked from the Gene page, or a targeted search, each citation kept as a
PMID.
Scripting the dossier: version-pinned and rerunnable
Everything above becomes a short script once you know the identifiers. The point is not cleverness — it is that every call names an exact version, so rerunning it in a year reproduces today's dossier rather than whatever is current then.
from Bio import Entrez, SeqIO
import requests, time
Entrez.email = "[email protected]"
Entrez.api_key = "your-free-api-key"
# 1. RefSeq mRNA + protein — version-pinned accessions, not bare ones
with Entrez.efetch(db="nucleotide", id="NM_007294.4",
rettype="fasta", retmode="text") as handle:
mrna = SeqIO.read(handle, "fasta")
with Entrez.efetch(db="protein", id="NP_009225.1",
rettype="fasta", retmode="text") as handle:
protein = SeqIO.read(handle, "fasta")
# 2. UniProt entry, JSON — record the response's entry version alongside it
up = requests.get("https://rest.uniprot.org/uniprotkb/P38398.json").json()
print("UniProt entry version:", up["entryAudit"]["entryVersion"])
# 3. RCSB PDB metadata for both structures
for pdb_id in ("1JNX", "1JM7"):
entry = requests.get(f"https://data.rcsb.org/rest/v1/core/entry/{pdb_id}").json()
print(pdb_id, entry["rcsb_accession_info"]["deposit_date"])
time.sleep(0.2) # RCSB has no published hard cap, but pace yourself anyway
# 4. KEGG pathway membership for the gene
kegg = requests.get("https://rest.kegg.jp/get/hsa:672").textThis is the same ESearch/EFetch pattern from the NCBI E-utilities lesson, the same JSON-over-HTTP style from the UniProt/KEGG/RCSB PDB APIs lesson, and the same format literacy from the formats-databases-emit lesson earlier in this module — nothing new here except discipline about versions.
Writing it up: the methods paragraph
A dossier is not finished until someone else could rebuild it from your write-up alone. A minimal, honest methods paragraph looks like this:
BRCA1 (NCBI Gene
672, HGNC:1100) was analyzed using the MANE Select transcriptNM_007294.4and proteinNP_009225.1on genome build GRCh38.p14 (NC_000017.11). Pathogenic and likely-pathogenic variants were retrieved from ClinVar (accessed 2026-07-20). Structural context came from PDB1JNX(BRCT domain) and1JM7(BRCA1-BARD1 RING heterodimer). Pathway placement used KEGG entryhsa:672.
That is exactly what the module promised back in From Clicking to Scripting: not raw speed, but a script and a paragraph that anyone — including you, in six months — can rerun and trust.