{
  "filename": "plot_5.png",
  "iteration": 4,
  "description": "Ordered causal chain for ATP6AP2-related disorder, with evidence level marked per step",
  "timestamp": "2026-11-26 22:37:39",
  "code": "\nimport matplotlib.pyplot as plt\nfrom matplotlib.patches import FancyBboxPatch, FancyArrowPatch\n\nfig, ax = plt.subplots(figsize=(15.5, 10.2))\nax.set_xlim(0, 100); ax.set_ylim(0, 100); ax.axis(\"off\")\n\nDEM = \"#2166ac\"   # demonstrated in human cells or patient tissue\nMOD = \"#1a9850\"   # demonstrated in model organism only\nINF = \"#b2182b\"   # inferred\n\ndef box(x, y, w, h, text, color, fs=9.2):\n    ax.add_patch(FancyBboxPatch((x, y), w, h, boxstyle=\"round,pad=0.6\",\n                                linewidth=1.6, edgecolor=color, facecolor=color+\"18\"))\n    ax.text(x+w/2, y+h/2, text, ha=\"center\", va=\"center\", fontsize=fs, color=\"#111111\")\n\ndef arrow(x1, y1, x2, y2, label=\"\", color=\"#555555\"):\n    ax.add_patch(FancyArrowPatch((x1, y1), (x2, y2), arrowstyle=\"-|>\", mutation_scale=15,\n                                 linewidth=1.4, color=color, shrinkA=2, shrinkB=2))\n    if label:\n        ax.text((x1+x2)/2 + 1.2, (y1+y2)/2, label, fontsize=8, color=color,\n                style=\"italic\", ha=\"left\", va=\"center\")\n\n# --- trunk, steps 1-5 ---\nbox(26, 90, 48, 7.5, \"1  ATP6AP2 variant at Xp11.4 (hypomorphic only: splice-modulating\\nsynonymous/intronic, or partial-function missense)\", DEM)\nbox(26, 80, 48, 7.5, \"2  leads to exon 2 or exon 4 skipping, or reduced protein stability\\n(RNA-seq in patient fibroblasts and iPSC-NPCs: PMID 35779466, 41131679)\", DEM)\nbox(26, 70, 48, 7.5, \"3  results in ~50% loss of full-length ATP6AP2 protein\\n(gene dosage, not dominant negative: cDNA rescue, PMID 30985297)\", DEM)\nbox(26, 60, 48, 7.5, \"4  results in failed V0 assembly in the ER: lost binding to ATP6AP1,\\nVMA21, ATP6V0D1 (PMID 29127204, 29995586)\", DEM)\nbox(26, 50, 48, 7.5, \"5  leads to fewer functional V-ATPase holoenzymes delivered to\\nGolgi, endosomes, lysosomes and synaptic vesicles\", DEM)\nfor y in (90, 80, 70, 60): arrow(50, y, 50, y-2.5)\n\n# --- branch point at step 5 -> three arms ---\narrow(50, 50, 50, 47)\nax.text(50, 45.5, \"6  branches into three arms\", ha=\"center\", fontsize=10, fontweight=\"bold\")\n\n# arm A: glycosylation / liver\nbox(1.5, 30, 29, 11, \"6a  under-acidified Golgi leads to mislocalised\\nglycosyltransferases, giving N- and O-hypo-\\nglycosylation (type II transferrin pattern).\\nDemonstrated in patient serum: PMID 29127204,\\nand in splicing patients too: PMID 41131679\", DEM, fs=8.6)\n# arm B: autophagy / mTOR\nbox(35.5, 30, 29, 11, \"6b  under-acidified lysosome leads to blocked\\nautophagic flux (p62 and LC3-II accumulate)\\nand altered mTORC1 signalling.\\nMouse liver and fly fat body: PMID 29127204,\\n28129027, 40813582\", MOD, fs=8.6)\n# arm C: Wnt\nbox(69.5, 30, 29, 11, \"6c  loss of the Frizzled/LRP6 to V-ATPase\\nadaptor leads to reduced canonical Wnt and\\nPCP signalling.\\nXenopus and Drosophila: PMID 20093472,\\n20579879, 20579883, 23292348\", MOD, fs=8.6)\narrow(50, 45, 16, 41.5); arrow(50, 45, 50, 41.5); arrow(50, 45, 84, 41.5)\n\n# --- step 7: cellular consequence ---\nbox(1.5, 18, 29, 8, \"7a  results in hepatocyte vacuolation,\\nsteatosis, cirrhosis; defective immuno-\\nglobulin and CD4+ T cell output\", MOD, fs=8.6)\nbox(35.5, 18, 29, 8, \"7b  results in neuronal and synaptic\\nprotein clearance failure, synapse loss,\\nprogressive neuronal death\", MOD, fs=8.6)\nbox(69.5, 18, 29, 8, \"7c  results in impaired neural progenitor\\ndifferentiation and cortical patterning\\n(inferred for human from Xenopus/fly)\", INF, fs=8.6)\nfor x in (16, 50, 84): arrow(x, 30, x, 26.5)\n\n# --- step 8: clinical ---\nbox(1.5, 6, 29, 8, \"8a  ATP6AP2-CDG (OMIM 301045):\\nhepatopathy, cutis laxa, immuno-\\ndeficiency, mild ID\", DEM, fs=8.6)\nbox(35.5, 6, 29, 8, \"8b  XPDS (OMIM 300911): adult\\nparkinsonism with spasticity, and\\nMRXSH late-course parkinsonism\", DEM, fs=8.6)\nbox(69.5, 6, 29, 8, \"8c  MRXSH (OMIM 300423): infantile\\nID, epilepsy, cerebral and cerebellar\\natrophy, thin corpus callosum\", DEM, fs=8.6)\nfor x in (16, 50, 84): arrow(x, 18, x, 14.5)\n# cross links showing the arms converge on each phenotype\narrow(30.5, 10, 35.5, 10, color=\"#999999\"); arrow(64.5, 10, 69.5, 10, color=\"#999999\")\nax.text(50, 2.4, \"grey arrows: the three arms are not phenotype-specific. Raynor 2025 (PMID 41131679) found the glycosylation defect of arm 6a\\n\"\n                 \"in splicing patients with a purely neurological presentation, so allele severity sets the phenotype, not which arm is engaged.\",\n        ha=\"center\", fontsize=8.4, style=\"italic\", color=\"#444444\")\n\nh = [plt.Line2D([0],[0], color=c, lw=4) for c in (DEM, MOD, INF)]\nax.legend(h, [\"demonstrated in human patient cells or tissue\",\n              \"demonstrated in model organism only\",\n              \"inferred, not directly demonstrated\"],\n          loc=\"upper left\", bbox_to_anchor=(0.0, 1.0), fontsize=9, frameon=False)\nax.set_title(\"ATP6AP2-related disorder: ordered causal chain from variant to phenotype\",\n             fontsize=13.5, loc=\"left\", pad=12)\nplt.tight_layout(); plt.show()\n",
  "plot_number": 5
}