{
  "filename": "plot_2.png",
  "iteration": 2,
  "description": "Figure: Rac2-null mouse recapitulates all six core IMD73C features, with the mechanistic causal chain",
  "timestamp": "2026-11-19 04:33:53",
  "code": "\nimport matplotlib.pyplot as plt\nimport numpy as np, pandas as pd\n\ncols=[\"Impaired neutrophil\\nchemotaxis\",\"Decreased total\\nB cell count\\nHP:0010976\",\"Decreased\\ncirculating IgG\\nHP:0004315\",\n      \"Decreased\\ncirculating IgM\\nHP:0002850\",\"Low TRECs /\\nreduced T cells\\nHP:0031545\",\"Susceptibility to\\nbacterial infection\\nHP:0002205\"]\ndat={\"Rac2\":[1,1,1,1,1,1],\"Dock2\":[1,1,1,0,1,0],\"Itgb2\":[0,1,1,0,1,1],\"Rag1\":[0,1,1,1,1,0],\n     \"Il2rg\":[0,0,1,1,1,0],\"Was\":[0,1,0,0,1,0],\"Btk\":[0,1,0,1,0,0],\"Rac1\":[1,0,0,0,0,0],\n     \"Ncf1\":[0,0,0,0,0,1],\"Cybb\":[0,0,0,0,0,1],\"Ada\":[0,0,0,0,1,0],\"Dock8\":[0,0,0,0,0,0]}\nM=pd.DataFrame(dat, index=cols).T\n\nfig, axes = plt.subplots(1,2, figsize=(15.8,6.4), gridspec_kw={\"width_ratios\":[1.5,1]})\nax=axes[0]\nax.imshow(M.values, cmap=\"Blues\", vmin=0, vmax=1.35, aspect=\"auto\")\nax.set_xticks(range(M.shape[1])); ax.set_xticklabels(M.columns, fontsize=7.6)\nax.set_yticks(range(M.shape[0])); ax.set_yticklabels(M.index, fontsize=10)\nax.get_yticklabels()[0].set_color(\"#C03221\"); ax.get_yticklabels()[0].set_weight(\"bold\")\nfor i in range(M.shape[0]):\n    for j in range(M.shape[1]):\n        if M.values[i,j]: ax.text(j,i,\"\u2713\",ha=\"center\",va=\"center\",color=\"white\",fontsize=13,weight=\"bold\")\nfor k,v in enumerate(M.sum(axis=1)):\n    ax.text(M.shape[1]-0.35, k, f\"  {v}/6\", va=\"center\", fontsize=9,\n            color=\"#C03221\" if k==0 else \"#555\", weight=\"bold\" if k==0 else \"normal\")\nax.set_title(\"A  Mouse-model recapitulation of six core IMD73C features\\nRac2 6/6 vs mean 2.1/6 across 11 comparator inborn-error-of-immunity genes\\n(Fisher exact, one-sided, p = 0.0030); source: Alliance of Genome Resources MP annotations\",\n             fontsize=9.8, loc=\"left\", weight=\"bold\")\nax.set_xlabel(\"human IMD73C feature, mapped to the mouse phenotype statement it predicts\", fontsize=8.8)\n\nax=axes[1]; ax.axis(\"off\")\nsteps=[(\"RAC2 c.167G>A p.Trp56Ter, homozygous\\n(truncation before Switch II and before\\nthe C-terminal polybasic/CAAX motif)\",\"#C03221\"),\n       (\"leads to loss of functional RAC2 protein in\\nhaematopoietic cells; RAC1 is co-expressed\\nbut does not fully compensate\",\"#B5651D\"),\n       (\"branch 1: RAC2-GTP cannot bind p67phox\\n(NCF2) \u2192 NADPH oxidase (CYBB/CYBA/NCF1/\\nNCF2/NCF4) not assembled \u2192 low superoxide\",\"#1F6FB2\"),\n       (\"branch 2: RAC2-GTP cannot engage PAK1/2 and\\nWAVE2 (WASF2-CYFIP2-NCKAP1L) \u2192 no polarised\\nlamellipodial F-actin \u2192 no directed migration\",\"#2E7D32\"),\n       (\"branch 3 (inferred from mouse): loss of\\nDOCK2/VAV1 \u2192 RAC2 signalling in lymphocytes\\n\u2192 impaired T and B development and survival\",\"#7B4FA8\"),\n       (\"results in defective bacterial/fungal killing,\\nabsent fMLP chemotaxis, low TRECs, low B cells,\\nlow IgG and IgM\",\"#5A5A66\"),\n       (\"manifests as recurrent respiratory infection,\\nfailure to thrive, lymphadenopathy, and\\nautoimmune/renal involvement\",\"#C03221\")]\ny=0.985\nfor i,(txt,c) in enumerate(steps):\n    h=0.117\n    ax.add_patch(plt.Rectangle((0.02,y-h),0.96,h, fc=c, alpha=0.13, ec=c, lw=1.3))\n    ax.text(0.5,y-h/2,txt,ha=\"center\",va=\"center\",fontsize=7.5,color=c,linespacing=1.3)\n    if i<len(steps)-1:\n        ax.annotate(\"\", xy=(0.5,y-h-0.016), xytext=(0.5,y-h), arrowprops=dict(arrowstyle=\"-|>\",color=\"#999\",lw=1.4))\n    y-=h+0.016\nax.set_xlim(0,1); ax.set_ylim(0,1)\nax.set_title(\"B  IMD73C causal chain from mutation to clinical phenotype\\nbranches 1-2 demonstrated in RAC2-mutant human neutrophils;\\nbranch 3 inferred from Rac2-null mouse lymphocytes\", fontsize=9.8, loc=\"left\", weight=\"bold\")\nplt.tight_layout(); plt.show()\n",
  "plot_number": 2
}