{
  "filename": "plot_4.png",
  "iteration": 2,
  "description": "Comprehensive evidence summary table comparing UBAC2 to active rhomboid proteases across all critical features",
  "timestamp": "2026-07-05 05:27:59",
  "code": "\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as mpatches\nimport numpy as np\n\nfig, ax = plt.subplots(figsize=(16, 10))\nax.axis('off')\nax.set_xlim(0, 1)\nax.set_ylim(0, 1)\n\n# Title\nax.text(0.5, 0.97, 'UBAC2 (Q8NBM4): Serine-Type Endopeptidase Activity (GO:0004252)',\n        ha='center', va='top', fontsize=14, fontweight='bold')\nax.text(0.5, 0.935, 'Verdict: REFUTED \u2014 Over-annotated rhomboid pseudoprotease',\n        ha='center', va='top', fontsize=13, fontweight='bold', color='#C62828',\n        bbox=dict(boxstyle='round,pad=0.4', facecolor='#FFCDD2', edgecolor='#C62828'))\n\n# Evidence table\ntable_data = [\n    ['Evidence Line', 'Active Rhomboid\\n(e.g. RHBDL2)', 'UBAC2', 'Result'],\n    ['GxSG catalytic Ser\\n(required in TM4)', 'GASG at pos 185\\nin TM4', 'GSSG only at pos 6\\n(N-terminal, NOT in TM)', 'ABSENT'],\n    ['Catalytic His\\n(required in TM6)', 'His250 in TM6\\n(annotated active site)', 'All His in lumenal\\nor cytoplasmic regions', 'ABSENT'],\n    ['TM segment count\\n(6-7 required)', '7 TM helices\\n(complete fold)', '3 TM helices\\n(truncated fold)', 'INSUFFICIENT'],\n    ['TM4-TM7 region\\n(catalytic core)', 'Present: contains\\nboth catalytic residues', 'Missing: replaced by\\ncytoplasmic tail + UBA', 'MISSING'],\n    ['Biochemical protease\\nassay evidence', 'Substrate cleavage\\ndemonstrated', 'Never tested; no\\nsubstrate cleavage', 'NO EVIDENCE'],\n    ['Literature\\nclassification', 'Active serine\\nprotease', '\"Rhomboid\\npseudoprotease\"', 'PSEUDOPROTEASE'],\n    ['InterPro/Pfam\\nclassification', 'IPR022764:\\nRhomboid protease', 'IPR061914:\\nInactive rhomboid', 'INACTIVE'],\n]\n\n# Draw the table\nrow_height = 0.085\ncol_widths = [0.22, 0.24, 0.24, 0.18]\nx_starts = [0.06, 0.28, 0.52, 0.76]\ny_start = 0.87\n\nfor i, row in enumerate(table_data):\n    y = y_start - i * row_height\n    \n    for j, (cell, width, x) in enumerate(zip(row, col_widths, x_starts)):\n        if i == 0:  # Header\n            color = '#263238'\n            text_color = 'white'\n            fontweight = 'bold'\n            fontsize = 9\n        elif j == 1:  # Active rhomboid column\n            color = '#E8F5E9'\n            text_color = '#1B5E20'\n            fontweight = 'normal'\n            fontsize = 8\n        elif j == 2:  # UBAC2 column\n            color = '#FFEBEE'\n            text_color = '#B71C1C'\n            fontweight = 'normal'\n            fontsize = 8\n        elif j == 3:  # Result column\n            color = '#FFCDD2'\n            text_color = '#C62828'\n            fontweight = 'bold'\n            fontsize = 9\n        else:  # Feature column\n            color = '#ECEFF1'\n            text_color = '#263238'\n            fontweight = 'bold'\n            fontsize = 8\n        \n        rect = mpatches.FancyBboxPatch((x, y - row_height + 0.01), width - 0.01, row_height - 0.005,\n                                        boxstyle=\"round,pad=0.003\", facecolor=color, edgecolor='#B0BEC5')\n        ax.add_patch(rect)\n        ax.text(x + width/2 - 0.005, y - row_height/2 + 0.008, cell,\n               ha='center', va='center', fontsize=fontsize, fontweight=fontweight,\n               color=text_color, linespacing=1.3)\n\n# Bottom section: Key conclusions\ny_bottom = 0.17\nax.text(0.06, y_bottom, 'Key Conclusions:', fontsize=11, fontweight='bold', va='top')\n\nconclusions = [\n    '1. UBAC2 belongs to the rhomboid-like superfamily but is a catalytically INACTIVE pseudoprotease.',\n    '2. The GO:0004252 (serine-type endopeptidase activity) IBA annotation is from PANTHER phylogenetic',\n    '   propagation (GO_REF:0000033) \u2014 not experimental evidence.',\n    '3. PMID:23297223 (the reference in the GO annotation) itself calls UBAC2 a \"rhomboid pseudoprotease\".',\n    '4. UBAC2 actual functions: ER-phagy receptor (PMID:39284914), ubiquitin binding (UBA domain),',\n    '   and ER membrane protein trafficking regulation.',\n    '5. Curation recommendation: REMOVE GO:0004252; consider NOT annotation to prevent re-propagation.'\n]\nfor i, line in enumerate(conclusions):\n    ax.text(0.06, y_bottom - 0.025 - i*0.018, line, fontsize=8, va='top',\n           color='#212121', family='monospace')\n\nplt.tight_layout()\nplt.savefig('ubac2_evidence_summary.png', dpi=150, bbox_inches='tight')\nplt.show()\nprint(\"Evidence summary figure saved.\")\n",
  "plot_number": 4
}