{
  "filename": "plot_4.png",
  "iteration": 3,
  "description": "Mechanistic causal chain for MSH3-related attenuated FAP, from biallelic germline loss to adenoma and carcinoma",
  "timestamp": "2026-11-26 19:56:31",
  "code": "\nimport matplotlib.pyplot as plt\nfrom matplotlib.patches import FancyBboxPatch, FancyArrowPatch\nimport matplotlib as mpl\n\nsteps = [\n (\"1. Biallelic germline MSH3 LoF\\n(frameshift / splice / nonsense)\", \"#4C72B0\"),\n (\"2. No functional MSH3 protein;\\nMutS\u03b2 (MSH2-MSH3) cannot form\\nGO:0032302 lost\", \"#4C72B0\"),\n (\"3. Insertion-deletion loops of 2-13 nt\\ngo unrecognised (GO:0032135/0032139)\\nMutS\u03b1 (MSH2-MSH6) stays intact\", \"#55A868\"),\n (\"4. Polymerase slippage at di- and\\ntetranucleotide repeats is unrepaired\\n\u2192 EMAST in normal mucosa and tumour\", \"#55A868\"),\n (\"5. Frameshift indels hit repeat tracts\\nin APC (12/13 were 2-5 bp deletions)\\nand in ACVR2A, ARID genes\", \"#DD8452\"),\n (\"6. Biallelic APC inactivation stabilises\\n\u03b2-catenin \u2192 Wnt target transcription\\nin colonic crypt stem cells (CL:0009043)\", \"#DD8452\"),\n (\"7. Clonal expansion \u2192 tubular adenomas,\\nright-colon predominant, 18-54 cumulative\\n(HP:0005227), fifth decade\", \"#C44E52\"),\n (\"8. Dysplasia gradient \u2192 colorectal\\nadenocarcinoma (HP:0003003) in a\\nsubset; duodenal adenomas in ~27%\", \"#C44E52\"),\n]\nbranches = [\n (\"Branch A (demonstrated in vitro):\\nMutS\u03b2 loss impairs homology-directed\\nrepair of DSBs with secondary structures\\nat common fragile sites \u2192 extra DSB burden\", \"#937860\"),\n (\"Branch B (inferred for this disease):\\nimpaired HR plausibly underlies the\\nbreast and other extracolonic lesions,\\nbut n=5 women, not demonstrated\", \"#8C8C8C\"),\n]\n\nfig, ax = plt.subplots(figsize=(13.5, 10.5))\nax.set_xlim(0, 10); ax.set_ylim(0, 10.6); ax.axis(\"off\")\ny = 9.9\nfor i,(txt,c) in enumerate(steps):\n    h = 0.95\n    ax.add_patch(FancyBboxPatch((0.4, y-h), 5.4, h, boxstyle=\"round,pad=0.08\",\n                 facecolor=c, alpha=0.16, edgecolor=c, linewidth=1.6))\n    ax.text(3.1, y-h/2, txt, ha=\"center\", va=\"center\", fontsize=9.3)\n    if i < len(steps)-1:\n        ax.add_patch(FancyArrowPatch((3.1, y-h), (3.1, y-h-0.26),\n                     arrowstyle=\"-|>\", mutation_scale=16, color=\"#555555\", linewidth=1.4))\n    y -= h + 0.26\n\n# branches off step 2/3\nby = 8.0\nfor txt,c in branches:\n    ax.add_patch(FancyBboxPatch((6.3, by-1.35), 3.45, 1.35, boxstyle=\"round,pad=0.08\",\n                 facecolor=c, alpha=0.14, edgecolor=c, linewidth=1.4, linestyle=\"--\"))\n    ax.text(8.02, by-0.675, txt, ha=\"center\", va=\"center\", fontsize=8.6)\n    ax.add_patch(FancyArrowPatch((5.8, by-0.675+0.9), (6.3, by-0.675),\n                 arrowstyle=\"-|>\", mutation_scale=14, color=\"#777777\", linewidth=1.2, linestyle=\"--\"))\n    by -= 2.0\n\nax.text(5.0, 10.35, \"MSH3-related attenuated FAP (MONDO:0044300): causal chain from germline lesion to adenoma\",\n        ha=\"center\", va=\"center\", fontsize=12.5, fontweight=\"bold\")\nax.text(8.02, 3.1, \"Colours: blue = germline lesion,\\ngreen = repair defect, orange = driver\\nmutation and signalling, red = clinical\\nphenotype. Dashed = branch.\",\n        ha=\"center\", va=\"center\", fontsize=8.5, color=\"#444444\")\nplt.tight_layout(); plt.show()\n",
  "plot_number": 4
}