{
  "filename": "ubac2_go_decision_table.png",
  "iteration": 3,
  "description": "GO curation decision table for UBAC2 showing recommended annotation changes",
  "timestamp": "2026-07-05 05:34:49",
  "code": "\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as mpatches\n\nfig, ax = plt.subplots(figsize=(14, 7))\nax.axis('off')\n\n# Title\nax.text(0.5, 0.97, 'UBAC2 (Q8NBM4) \u2014 GO Curation Decision Table',\n        ha='center', va='top', fontsize=14, fontweight='bold')\n\n# Decision table\ntable_data = [\n    ['GO Term', 'Current Status', 'Recommended Action', 'Evidence', 'Confidence'],\n    ['GO:0004252\\nserine-type\\nendopeptidase\\nactivity', 'IBA from\\nGO_Central\\n(GO_REF:0000033)', 'REMOVE\\n+ consider NOT\\nannotation', 'Pseudoprotease (PMID:23297223)\\nNo GxSG in TMs\\nNo TM4-TM7\\n0/25 orthologs have catalytic', 'VERY HIGH\\n(5 convergent\\nevidence lines)'],\n    ['GO:0043130\\nubiquitin\\nbinding', 'Not annotated', 'ADD\\n(ISS or IDA\\nif available)', 'UBA domain (304-344)\\nPfam PF00627\\nInterPro IPR015940', 'MEDIUM\\n(domain-based;\\nneeds expt.)'],\n    ['Autophagy\\nreceptor\\nactivity', 'Not annotated\\n(MF term)', 'INVESTIGATE\\nGO term\\navailability', 'LIR motif (275-278)\\nGABARAP binding\\n(PMID:39284914)', 'HIGH\\n(experimental\\nevidence exists)'],\n    ['GO:0005515\\nprotein\\nbinding', 'IPI (7 refs)\\nAlready annotated', 'RETAIN\\nbut not as\\nprimary MF', 'Multiple interaction\\npartners validated\\n(UBXD8, GABARAP, etc.)', 'HIGH\\n(well-supported)'],\n]\n\nrow_heights = [0.06, 0.13, 0.10, 0.10, 0.10]\ncol_widths = [0.16, 0.14, 0.16, 0.30, 0.14]\nx_starts = [0.05, 0.21, 0.35, 0.51, 0.81]\ny_start = 0.90\n\nfor i, row in enumerate(table_data):\n    y = y_start - sum(row_heights[:i])\n    rh = row_heights[i]\n    \n    for j, (cell, width, x) in enumerate(zip(row, col_widths, x_starts)):\n        if i == 0:\n            facecolor = '#263238'\n            text_color = 'white'\n            fontweight = 'bold'\n            fontsize = 9\n        elif i == 1:  # The key row \u2014 REMOVE\n            if j == 2:\n                facecolor = '#FFCDD2'\n                text_color = '#C62828'\n                fontweight = 'bold'\n            else:\n                facecolor = '#FFEBEE'\n                text_color = '#212121'\n                fontweight = 'normal'\n            fontsize = 8\n        elif i == 2:  # ADD ubiquitin binding\n            if j == 2:\n                facecolor = '#C8E6C9'\n                text_color = '#1B5E20'\n                fontweight = 'bold'\n            else:\n                facecolor = '#E8F5E9'\n                text_color = '#212121'\n                fontweight = 'normal'\n            fontsize = 8\n        elif i == 3:  # INVESTIGATE\n            if j == 2:\n                facecolor = '#FFF3E0'\n                text_color = '#E65100'\n                fontweight = 'bold'\n            else:\n                facecolor = '#FFF8E1'\n                text_color = '#212121'\n                fontweight = 'normal'\n            fontsize = 8\n        else:\n            facecolor = '#F5F5F5'\n            text_color = '#212121'\n            fontweight = 'normal'\n            fontsize = 8\n        \n        rect = mpatches.FancyBboxPatch((x, y - rh + 0.005), width - 0.01, rh - 0.005,\n                                        boxstyle=\"round,pad=0.003\", facecolor=facecolor, \n                                        edgecolor='#B0BEC5', linewidth=0.8)\n        ax.add_patch(rect)\n        ax.text(x + width/2 - 0.005, y - rh/2 + 0.003, cell,\n               ha='center', va='center', fontsize=fontsize, fontweight=fontweight,\n               color=text_color, linespacing=1.3)\n\n# Footer\nax.text(0.5, 0.37, \n        'All recommendations are CURATION LEADS requiring curator verification.\\n'\n        'Primary evidence: PMID:23297223 (pseudoprotease designation), PMID:39284914 (ER-phagy receptor),\\n'\n        'InterPro IPR061914 (inactive rhomboid classification), 25 orthologs (ancestral catalytic loss).',\n        ha='center', va='top', fontsize=9, fontstyle='italic', color='#616161',\n        bbox=dict(boxstyle='round,pad=0.5', facecolor='#FAFAFA', edgecolor='#E0E0E0'))\n\nplt.tight_layout()\nplt.savefig('ubac2_go_decision_table.png', dpi=150, bbox_inches='tight')\nplt.show()\nprint(\"GO decision table saved.\")\n"
}