{
  "filename": "plot_2.png",
  "iteration": 1,
  "description": "Summary figure showing serpin architecture, why HSP47 cannot inhibit proteases, and GO curation recommendation",
  "timestamp": "2026-07-06 12:43:33",
  "code": "\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n# Create a schematic showing the serpin inhibitory mechanism and why HSP47 can't do it\nfig, axes = plt.subplots(1, 3, figsize=(18, 7))\n\n# === Panel A: Serpin domain architecture ===\nax1 = axes[0]\nax1.set_xlim(0, 10)\nax1.set_ylim(0, 10)\nax1.set_aspect('equal')\nax1.axis('off')\nax1.set_title(\"A. Serpin Fold Architecture\", fontsize=13, fontweight='bold')\n\n# Draw simplified serpin body\nfrom matplotlib.patches import Ellipse, FancyArrowPatch\nbody = Ellipse((5, 4), 6, 5, facecolor='#E3F2FD', edgecolor='#1565C0', linewidth=2)\nax1.add_patch(body)\nax1.text(5, 4.5, '\u03b2-Sheet A\\n(insertion target)', ha='center', va='center', fontsize=10, \n         color='#1565C0', fontstyle='italic')\n\n# Draw RCL as a loop on top\nrcl_x = np.array([2.5, 3, 4, 5, 6, 7, 7.5])\nrcl_y = np.array([6.3, 7.5, 8.5, 9, 8.5, 7.5, 6.3])\nax1.plot(rcl_x, rcl_y, 'r-', linewidth=3, label='Reactive Center Loop (RCL)')\nax1.plot(5, 9, 'r*', markersize=20)\nax1.text(5, 9.4, 'P1 (reactive bond)', ha='center', fontsize=9, color='red', fontweight='bold')\n\n# Hinge region\nax1.plot([2.5, 3.5], [6.3, 7.8], color='orange', linewidth=4, alpha=0.7)\nax1.text(2.2, 7.2, 'Hinge\\nregion', ha='center', fontsize=9, color='orange', fontweight='bold')\n\n# RDEL label\nax1.text(5, 1.5, 'RDEL (ER retention)', ha='center', fontsize=10, color='purple', \n         fontweight='bold', style='italic')\n\n# === Panel B: Why HSP47 can't inhibit ===\nax2 = axes[1]\nax2.axis('off')\nax2.set_title(\"B. Why HSP47 Cannot Inhibit\\nSerine Proteases\", fontsize=13, fontweight='bold')\n\nevidence_text = \"\"\"\n\u274c HINGE REGION (P14-P9):\n   0/6 small residues\n   (need \u22654/6 for RCL insertion)\n   Pro at P13 \u2192 rigid backbone\n   Phe at P12 \u2192 steric clash\n\n\u274c ER-RESIDENT PROTEIN:\n   RDEL retention signal\n   Not secreted to encounter\n   extracellular proteases\n\n\u274c NO INHIBITORY ACTIVITY:\n   Multiple studies confirm\n   no serine protease inhibition\n   (Nagata lab, 2011, 2017)\n\n\u2705 ACTUAL FUNCTION:\n   Collagen-specific chaperone\n   Binds triple-helical procollagen\n   Essential for collagen maturation\n   Knockout = embryonic lethal\n\"\"\"\n\nax2.text(0.05, 0.95, evidence_text, transform=ax2.transAxes, fontsize=11,\n         verticalalignment='top', fontfamily='monospace',\n         bbox=dict(boxstyle='round', facecolor='#FFF3E0', alpha=0.8))\n\n# === Panel C: GO Curation Recommendation ===\nax3 = axes[2]\nax3.axis('off')\nax3.set_title(\"C. GO Curation Recommendation\", fontsize=13, fontweight='bold')\n\ncuration_text = \"\"\"\nCURRENT ANNOTATION:\n  GO:0004867\n  serine-type endopeptidase\n  inhibitor activity\n  Evidence: IBA (phylogenetic)\n\nVERDICT: OVER-ANNOTATED \u26a0\ufe0f\n\nIBA transferred from serpin\nsuperfamily, but HSP47 is a\nnon-inhibitory serpin member.\n\nRECOMMENDED ACTIONS:\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\u2717 REMOVE GO:0004867\n  (no supporting evidence)\n\n\u2713 RETAIN GO:0005518\n  (collagen binding - IEA)\n\n\u2713 RETAIN GO:0051082\n  (unfolded protein binding\n   - IDA from MGI)\n\n? CONSIDER adding\n  GO:0030544\n  (Hsp70 protein binding)\n  or a chaperone activity term\n\"\"\"\n\nax3.text(0.05, 0.95, curation_text, transform=ax3.transAxes, fontsize=10.5,\n         verticalalignment='top', fontfamily='monospace',\n         bbox=dict(boxstyle='round', facecolor='#E8F5E9', alpha=0.8))\n\nplt.tight_layout()\nplt.savefig(\"hsp47_go_curation_summary.png\", dpi=150, bbox_inches='tight')\nplt.show()\nprint(\"Figure saved: hsp47_go_curation_summary.png\")\n",
  "plot_number": 2
}