{
  "filename": "acad9_final_synthesis.png",
  "iteration": 3,
  "description": "Final steelman analysis and evidence synthesis figure with confidence assessment for each line of evidence",
  "timestamp": "2026-07-01 06:06:53",
  "code": "\n# Final comprehensive steelman analysis and evidence synthesis\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as mpatches\nimport numpy as np\n\nfig, axes = plt.subplots(2, 1, figsize=(16, 14))\n\n# Panel A: Steelman vs. Refutation Analysis\nax1 = axes[0]\nax1.axis('off')\nax1.set_title('Steelman Analysis: Could GO:0017099 Be Justified for ACAD9?',\n              fontsize=14, fontweight='bold')\n\n# Create a two-column comparison\nsteelman_data = [\n    ['Argument FOR GO:0017099', 'Counter-argument', 'Verdict'],\n    ['1. ACAD9 has activity on C22:6-CoA\\n(DHA), which has 22 carbons',\n     'C22 = 22 carbons = LONG-CHAIN by GO\\ndefinition (C13-22). GO:0017099 requires\\n>22 carbons. Also DHA is polyunsaturated.',\n     'FAILS\\nC22 is NOT\\nvery-long-chain'],\n    ['2. ACAD9 is 42% identical to VLCAD,\\nwhich has GO:0017099',\n     'Homology alone doesn\\'t justify IDA.\\nSubstrate specificity diverged: different\\nEC numbers, different peak substrates.',\n     'FAILS\\nParalog\\nconfusion'],\n    ['3. Perhaps PMID:33320993 has\\nsupplementary VLC assay data not\\nin the abstract',\n     'Abstract describes cryo-EM + biophysics\\nof MCIA complex. No mention of substrate\\nassays. Paper focus is CI assembly.',\n     'UNLIKELY\\nPaper focus\\nis structural'],\n    ['4. ACAD9 channel is more open than\\nMCAD, so might fit VLC substrates',\n     'Channel has Thr-139 (not Gly) at key\\nposition. More open than MCAD but still\\nrestricted vs VLCAD. No C24 data exists.',\n     'FAILS\\nPartially\\nrestricted'],\n    ['5. FlyBase made IDA annotation in\\nNov 2025; may reflect expert judgment',\n     'Annotation has no extensions or notes.\\nBoth cited papers are CI assembly studies.\\nIDA evidence code requires direct assay.',\n     'QUESTIONABLE\\nLikely\\nmisannotation'],\n]\n\ncolors = [['#BBDEFB', '#BBDEFB', '#BBDEFB']]\nfor i in range(1, 6):\n    colors.append(['#FFF9C4', '#E8F5E9', '#FFCDD2'])\n\ntable = ax1.table(cellText=steelman_data, cellLoc='center', loc='center',\n                  cellColours=colors)\ntable.auto_set_font_size(False)\ntable.set_fontsize(8.5)\ntable.scale(1, 3.2)\n\nfor j in range(3):\n    table[0, j].set_text_props(fontweight='bold')\nfor i in range(1, 6):\n    table[i, 2].set_text_props(fontweight='bold', color='#C62828')\n\n# Panel B: Final verdict with confidence assessment\nax2 = axes[1]\nax2.axis('off')\nax2.set_title('Final Evidence Synthesis: ACAD9 GO:0017099 Over-Annotation',\n              fontsize=14, fontweight='bold')\n\n# Evidence strength meter\nevidence_items = [\n    ('Enzymatic assays\\n(PMID:16020546, 12359260)', 0.95, '#2196F3',\n     'Peak at C16:1-C18:1. No >C22 sat. tested.'),\n    ('Structural analysis\\n(PMID:18227065 + alignment)', 0.85, '#4CAF50',\n     'Thr-139/Ala-143 partially restrict channel.'),\n    ('EC number assignment\\n(UniProt expert curation)', 0.90, '#FF9800',\n     'EC 1.3.8.8 (long-chain), NOT 1.3.8.9.'),\n    ('Reference audit\\n(PMID:33320993, 34646991)', 0.95, '#F44336',\n     'Papers study CI assembly, not substrates.'),\n    ('In vivo metabolites\\n(PMID:24158852)', 0.85, '#9C27B0',\n     'Produces C12-C14:1 from LC substrates.'),\n    ('Clinical phenotype\\n(PMID:30025539)', 0.70, '#607D8B',\n     'CI deficiency pattern, not VLC-FAO.'),\n    ('GO term definition\\n(QuickGO)', 0.98, '#00BCD4',\n     'Requires >22 carbons. ACAD9 max = C22.'),\n]\n\ny_positions = np.linspace(0.88, 0.08, len(evidence_items))\nfor i, (label, strength, color, note) in enumerate(evidence_items):\n    y = y_positions[i]\n    # Bar\n    ax2.barh(y, strength, height=0.08, color=color, alpha=0.8,\n             transform=ax2.transAxes, zorder=5)\n    ax2.barh(y, 1.0, height=0.08, color='#E0E0E0', alpha=0.3,\n             transform=ax2.transAxes, zorder=4)\n    # Label\n    ax2.text(-0.02, y, label, fontsize=9, ha='right', va='center',\n             transform=ax2.transAxes, fontweight='bold', color=color)\n    # Strength value\n    ax2.text(strength + 0.01, y, f'{strength:.0%}', fontsize=9,\n             ha='left', va='center', transform=ax2.transAxes,\n             fontweight='bold')\n    # Note\n    ax2.text(0.55, y, note, fontsize=8, ha='left', va='center',\n             transform=ax2.transAxes, color='#555555')\n\n# Overall verdict\nax2.text(0.5, -0.05, \n         'OVERALL VERDICT: OVER-ANNOTATED (High Confidence)\\n'\n         'Recommended action: Remove GO:0017099 IDA; retain GO:0004466 IDA',\n         fontsize=12, ha='center', va='top', transform=ax2.transAxes,\n         fontweight='bold', color='#C62828',\n         bbox=dict(boxstyle='round,pad=0.5', facecolor='#FFEBEE', edgecolor='#C62828'))\n\nplt.tight_layout(rect=[0.15, 0.05, 1, 0.97])\nplt.savefig('acad9_final_synthesis.png', dpi=150, bbox_inches='tight')\nplt.show()\nprint(\"Saved: acad9_final_synthesis.png\")\n"
}