{
  "filename": "go_decision_summary.png",
  "iteration": 3,
  "description": "Comprehensive GO annotation decision summary figure with provenance chain, verdict, and curation recommendations for CG4860 GO:0016937",
  "timestamp": "2026-07-01 06:12:56",
  "code": "\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as mpatches\nimport numpy as np\n\nfig, ax = plt.subplots(1, 1, figsize=(16, 10))\nax.axis('off')\nax.set_xlim(0, 16)\nax.set_ylim(0, 14)\n\n# Title\nax.text(8, 13.5, 'CG4860 (Q9VGC2) GO:0016937 Annotation Provenance & Decision Summary',\n        fontsize=14, fontweight='bold', ha='center', va='center')\n\n# === Section 1: Annotation Provenance Chain ===\nax.text(0.5, 12.5, 'A. Annotation Provenance Chain', fontsize=11, fontweight='bold')\n\nprovenance = [\n    ('GO:0016937\\n(IBA:GO_Central)', 'PAINT phylogenetic\\ninference', \n     'PANTHER PTN000097838\\n\u2192 P16219 (HsACADS)\\n\u2192 Q3ZBF6 (BovACADS)', '#FFD700'),\n    ('GO:0016937\\n(IEA:UniProt)', 'EC number mapping\\n(GO_REF:0000003)', \n     'EC:1.3.8.1 assigned by\\nARBA (ECO:0000256)\\n= automatic rule', '#FFD700'),\n    ('GO:0003995\\n(ISS:FlyBase)', 'Sequence similarity\\n(PMID:22758915)', \n     'with/from: Q709F0\\n(HsACAD11, 780aa)\\n= LONG-chain ACAD!', '#FFA07A'),\n    ('GO:0003995\\n(IEA:UniProt)', 'InterPro/ARBA\\nautomatic', \n     'IPR006089 + ARBA\\nAcyl-CoA DH family', '#90EE90'),\n    ('EC:1.3.8.1', 'ARBA automatic\\nrule', \n     'Based on protein\\nname/family match\\nNot experimental', '#FFD700'),\n]\n\nfor i, (annotation, method, source, color) in enumerate(provenance):\n    y = 11.5 - i * 1.2\n    # Boxes\n    rect1 = mpatches.FancyBboxPatch((0.5, y-0.4), 2.5, 0.8, boxstyle=\"round,pad=0.1\",\n                                      facecolor=color, edgecolor='black', linewidth=1)\n    ax.add_patch(rect1)\n    ax.text(1.75, y, annotation, ha='center', va='center', fontsize=7, fontweight='bold')\n    \n    ax.annotate('', xy=(3.5, y), xytext=(3.0, y),\n                arrowprops=dict(arrowstyle='->', color='gray', lw=1.5))\n    \n    rect2 = mpatches.FancyBboxPatch((3.5, y-0.4), 2.8, 0.8, boxstyle=\"round,pad=0.1\",\n                                      facecolor='white', edgecolor='gray', linewidth=1)\n    ax.add_patch(rect2)\n    ax.text(4.9, y, method, ha='center', va='center', fontsize=7)\n    \n    ax.annotate('', xy=(7.0, y), xytext=(6.3, y),\n                arrowprops=dict(arrowstyle='->', color='gray', lw=1.5))\n    \n    rect3 = mpatches.FancyBboxPatch((7.0, y-0.4), 3.0, 0.8, boxstyle=\"round,pad=0.1\",\n                                      facecolor='#F0F0F0', edgecolor='gray', linewidth=1)\n    ax.add_patch(rect3)\n    ax.text(8.5, y, source, ha='center', va='center', fontsize=6.5)\n\n# === Section 2: Key Verdict ===\nax.text(11, 12.5, 'B. Verdict', fontsize=11, fontweight='bold')\n\nverdict_box = mpatches.FancyBboxPatch((11, 10.5), 4.5, 2, boxstyle=\"round,pad=0.2\",\n                                       facecolor='#FFF3CD', edgecolor='#856404', linewidth=2)\nax.add_patch(verdict_box)\nax.text(13.25, 11.8, 'PARTIALLY SUPPORTED', fontsize=10, fontweight='bold', \n        ha='center', va='center', color='#856404')\nax.text(13.25, 11.2, '/ OVER-ANNOTATED', fontsize=10, fontweight='bold', \n        ha='center', va='center', color='#856404')\nax.text(13.25, 10.7, 'No experimental evidence\\nfor SCAD specificity', fontsize=8, \n        ha='center', va='center', color='#856404', style='italic')\n\n# Key evidence summary\nax.text(11, 10.0, 'C. Key Evidence', fontsize=11, fontweight='bold')\nevidence_items = [\n    ('Supporting:', '#2E7D32', [\n        '57.1% identity to HsACADS',\n        'Catalytic Glu (EIYEGTSEIQ) 100% conserved',\n        'All 3 ACAD Pfam domains present',\n    ]),\n    ('Challenging:', '#C62828', [\n        'CG4860 LOF \u2260 SCAD phenotype (PMID:40519079)',\n        'Arc42 = true functional SCAD (71.1% to HsACADS)',\n        'Leu\u2192Thr at substrate specificity position',\n        'All annotations computational (IBA/IEA/ARBA)',\n        'FlyBase ISS ref = ACAD11, not ACADS',\n    ]),\n]\n\ny_start = 9.5\nfor category, color, items in evidence_items:\n    ax.text(11.2, y_start, category, fontsize=9, fontweight='bold', color=color)\n    for j, item in enumerate(items):\n        ax.text(11.5, y_start - 0.4 - j*0.35, f'\u2022 {item}', fontsize=7.5, color=color)\n    y_start -= 0.4 + len(items)*0.35 + 0.3\n\n# === Section 3: Recommendation ===\nax.text(0.5, 4.7, 'D. Curation Recommendation', fontsize=11, fontweight='bold')\n\nrec_box = mpatches.FancyBboxPatch((0.5, 2.0), 15, 2.5, boxstyle=\"round,pad=0.2\",\n                                    facecolor='#E8F5E9', edgecolor='#2E7D32', linewidth=2)\nax.add_patch(rec_box)\n\nrecs = [\n    'GO:0016937 (SCAD activity):  Flag as over-specific; do not elevate above IBA. Consider generalizing to GO:0003995.',\n    'GO:0003995 (acyl-CoA DH):     RETAIN \u2014 well supported by sequence, domains, catalytic residues.',\n    'GO:0046359 (butyrate catabolism): FLAG for removal \u2014 not supported if CG4860 \u2260 functional SCAD.',\n    'Arc42 (Q9VDT1):                    Candidate for upgraded GO:0016937 annotation (IMP via PMID:40519079).',\n    'Key reference:                     PMID:40519079 \u2014 \"only Arc42 loss of function mirrors the acylcarnitine profile of ACADS loss of function\"',\n]\n\nfor i, rec in enumerate(recs):\n    ax.text(1, 4.2 - i*0.45, rec, fontsize=7.5, fontfamily='monospace')\n\n# Legend\nlegend_elements = [\n    mpatches.Patch(facecolor='#90EE90', edgecolor='black', label='Well-supported'),\n    mpatches.Patch(facecolor='#FFD700', edgecolor='black', label='Computationally derived (caution)'),\n    mpatches.Patch(facecolor='#FFA07A', edgecolor='black', label='Discrepant reference'),\n]\nax.legend(handles=legend_elements, loc='lower right', fontsize=8, framealpha=0.9)\n\nplt.tight_layout()\nplt.savefig('go_decision_summary.png', dpi=150, bbox_inches='tight')\nplt.show()\nprint(\"GO decision summary figure saved\")\n"
}