{
  "filename": "plot_9.png",
  "iteration": 5,
  "description": "Summary figure for congenital pancreatic lipase deficiency: tissue restriction of PNLIP, the developmental lipase handover that sets onset, ClinVar classification state, and predicted carrier frequency by ancestry",
  "timestamp": "2026-11-29 00:22:39",
  "code": "\nimport numpy as np, matplotlib.pyplot as plt\n\nfig, ax = plt.subplots(2, 2, figsize=(14, 10))\n\n# Panel A: GTEx tissue restriction of PNLIP (median TPM, v8)\nt = [\"Pancreas\", \"Ectocervix\", \"Minor salivary\\ngland\", \"Stomach\", \"Liver\", \"Whole blood\"]\nv = [31393, 4.59, 2.10, 1.35, 0.52, 0.02]\na = ax[0, 0]\na.barh(range(len(t))[::-1], v, color=[\"#b2182b\"] + [\"#9ecae1\"] * 5)\na.set_xscale(\"log\"); a.set_yticks(range(len(t))[::-1]); a.set_yticklabels(t, fontsize=9)\na.set_xlabel(\"PNLIP median TPM, GTEx v8 (log scale)\")\na.set_title(\"A. PNLIP is pancreas restricted: 6,841-fold over\\nthe next tissue, so the disease is monoenzymatic\", fontsize=10, loc=\"left\")\na.text(31393, 5, \"  31,393\", va=\"center\", fontsize=9, color=\"#b2182b\")\n\n# Panel B: developmental lipase handover sets the onset\nage = np.array([0, 0.25, 0.5, 1, 2, 3, 5, 10])\npnlip = np.array([3, 8, 20, 45, 70, 85, 95, 100])\nsubs = np.array([100, 95, 85, 60, 35, 20, 12, 10])\nb = ax[0, 1]\nb.plot(age, pnlip, \"o-\", color=\"#b2182b\", lw=2, label=\"PNLIP (fails in disease)\")\nb.plot(age, subs, \"s-\", color=\"#2166ac\", lw=2, label=\"PLRP2 + CEL + gastric lipase\")\nb.axvspan(0, 0.6, color=\"#d9f0d3\", alpha=0.7)\nb.axvspan(0.6, 2.5, color=\"#fde0dd\", alpha=0.7)\nb.text(0.28, 50, \"milk fed:\\nsilent\", ha=\"center\", fontsize=9)\nb.text(1.5, 50, \"weaning:\\nsymptoms\\nappear\", ha=\"center\", fontsize=9, color=\"#b2182b\")\nb.set_xlabel(\"Age (years)\"); b.set_ylabel(\"Share of luminal lipase capacity (%, schematic)\")\nb.set_title(\"B. Substituting lipases carry infancy, so onset is\\nlate infantile to childhood, not neonatal\", fontsize=10, loc=\"left\")\nb.legend(fontsize=8, loc=\"center right\")\n\n# Panel C: ClinVar classification state for 278 PNLIP small variants\nlab = [\"VUS\", \"Likely benign\", \"Pathogenic\", \"Benign\", \"Likely pathogenic\", \"B/LB\", \"Conflicting\"]\ncnt = [129, 110, 14, 14, 4, 3, 2]\nc = ax[1, 0]\ncol = [\"#bdbdbd\", \"#74c476\", \"#b2182b\", \"#238b45\", \"#ef6548\", \"#41ab5d\", \"#969696\"]\nc.bar(range(len(lab)), cnt, color=col)\nc.set_xticks(range(len(lab))); c.set_xticklabels(lab, rotation=35, ha=\"right\", fontsize=8)\nc.set_ylabel(\"ClinVar records\")\nc.set_title(\"C. 240 of 278 PNLIP small variants (86.3%) are VUS or benign,\\nand only 1 record carries the disease name\", fontsize=10, loc=\"left\")\nfor i, n in enumerate(cnt):\n    c.text(i, n + 2, str(n), ha=\"center\", fontsize=8)\n\n# Panel D: predicted carrier frequency by ancestry (gnomAD v4 pLoF, Hardy-Weinberg)\nanc = [\"African/AA\", \"South Asian\", \"Non-Finnish Eur\", \"Admixed American\",\n       \"Middle Eastern\", \"Remaining\", \"East Asian\", \"Ashkenazi Jewish\", \"Finnish\"]\none_in = [1094, 1876, 1931, 2796, 2885, 3020, 3309, 4357, 4452]\nd = ax[1, 1]\ny = np.arange(len(anc))[::-1]\nd.barh(y, [1e5 / x for x in one_in], color=\"#4292c6\")\nd.set_yticks(y); d.set_yticklabels(anc, fontsize=9)\nd.set_xlabel(\"Carriers per 100,000 people\")\nd.set_title(\"D. Carrier state is common (1 in 2,009 overall) while predicted\\nbirth prevalence is 1 in 16.1 million, so cases need consanguinity\", fontsize=10, loc=\"left\")\nfor yi, n in zip(y, one_in):\n    d.text(1e5 / n + 1, yi, f\"1 in {n:,}\", va=\"center\", fontsize=8)\nd.set_xlim(0, 110)\n\nplt.tight_layout()\nplt.show()\n",
  "plot_number": 9
}