{
  "filename": "plot_3.png",
  "iteration": 2,
  "description": "Comprehensive 4-panel figure: substrate channel architecture, key residue comparison, GO term assessment, and evidence summary",
  "timestamp": "2026-07-01 05:59:50",
  "code": "\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as mpatches\nimport numpy as np\n\nfig, axes = plt.subplots(2, 2, figsize=(16, 12))\n\n# Panel A: Substrate channel schematic\nax1 = axes[0, 0]\nax1.set_xlim(0, 10)\nax1.set_ylim(0, 10)\nax1.axis('off')\nax1.set_title('A. Substrate Binding Channel Architecture\\n(Based on VLCAD crystal structure, PMID:18227065)',\n              fontsize=11, fontweight='bold')\n\n# Draw MCAD channel\ny_mcad = 7.5\nax1.text(0.5, y_mcad + 0.7, 'MCAD', fontsize=11, fontweight='bold', color='#795548')\n# Channel walls\nax1.plot([1.5, 5.5], [y_mcad + 0.3, y_mcad + 0.3], color='#795548', linewidth=3)\nax1.plot([1.5, 5.5], [y_mcad - 0.3, y_mcad - 0.3], color='#795548', linewidth=3)\n# Blocking residues (Q120, E124)\nax1.add_patch(plt.Rectangle((5.2, y_mcad - 0.5), 0.8, 1.0, color='#D32F2F', alpha=0.8))\nax1.text(5.6, y_mcad, 'Q/E\\nBLOCKS', fontsize=7, ha='center', va='center', color='white', fontweight='bold')\n# Substrate\nax1.plot([1.8, 5.0], [y_mcad, y_mcad], color='#FFC107', linewidth=6, solid_capstyle='round')\nax1.text(3.4, y_mcad + 0.6, 'C10-C12 max', fontsize=9, ha='center', color='#795548')\n\n# Draw ACAD9 channel\ny_acad9 = 5.0\nax1.text(0.5, y_acad9 + 0.7, 'ACAD9', fontsize=11, fontweight='bold', color='#2196F3')\nax1.plot([1.5, 7.0], [y_acad9 + 0.3, y_acad9 + 0.3], color='#2196F3', linewidth=3)\nax1.plot([1.5, 7.0], [y_acad9 - 0.3, y_acad9 - 0.3], color='#2196F3', linewidth=3)\n# Intermediate residues (T139, A143)\nax1.add_patch(plt.Rectangle((6.7, y_acad9 - 0.4), 0.6, 0.8, color='#FF9800', alpha=0.8))\nax1.text(7.0, y_acad9, 'T/A', fontsize=8, ha='center', va='center', color='white', fontweight='bold')\n# Substrate\nax1.plot([1.8, 6.5], [y_acad9, y_acad9], color='#FFC107', linewidth=6, solid_capstyle='round')\nax1.text(4.2, y_acad9 + 0.6, 'C14-C20 max', fontsize=9, ha='center', color='#2196F3')\n\n# Draw VLCAD channel\ny_vlcad = 2.5\nax1.text(0.5, y_vlcad + 0.7, 'VLCAD', fontsize=11, fontweight='bold', color='#F44336')\nax1.plot([1.5, 8.5], [y_vlcad + 0.3, y_vlcad + 0.3], color='#F44336', linewidth=3)\nax1.plot([1.5, 8.5], [y_vlcad - 0.3, y_vlcad - 0.3], color='#F44336', linewidth=3)\n# Open residues (G175, G179)\nax1.add_patch(plt.Circle((8.5, y_vlcad), 0.15, color='#4CAF50', alpha=0.8))\nax1.text(8.8, y_vlcad, 'G/G\\nOPEN', fontsize=7, ha='left', va='center', color='#4CAF50', fontweight='bold')\n# Substrate\nax1.plot([1.8, 8.3], [y_vlcad, y_vlcad], color='#FFC107', linewidth=6, solid_capstyle='round')\nax1.text(5.1, y_vlcad + 0.6, 'C14-C24 max', fontsize=9, ha='center', color='#F44336')\n\n# Add C-terminal extension label for VLCAD\nax1.annotate('C-terminal\\nextension\\n(+34 aa)', xy=(8.5, y_vlcad - 0.5), fontsize=8, \n             ha='center', va='top', color='#F44336', fontstyle='italic')\n\n# Cavity base label\nax1.text(9.5, 5.0, 'Cavity\\nbase\\nresidues', fontsize=9, ha='center', va='center',\n         bbox=dict(boxstyle='round,pad=0.3', facecolor='lightyellow', edgecolor='gray'))\n\n# Panel B: Residue comparison table\nax2 = axes[0, 1]\nax2.axis('off')\nax2.set_title('B. Key Cavity Base Residues\\n(Determinants of Chain Length Specificity)',\n              fontsize=11, fontweight='bold')\n\ntable_data = [\n    ['Position\\n(structural)', 'MCAD', 'ACAD9', 'VLCAD', 'Effect on\\nchannel'],\n    ['Cavity base 1\\n(MCAD Q95*)', 'Q120\\n(Gln, 5 atoms)\\nBLOCKS', 'T139\\n(Thr, 3 atoms)\\nPARTIAL', 'G175\\n(Gly, 0 atoms)\\nOPEN', 'ACAD9 more\\nrestricted\\nthan VLCAD'],\n    ['Cavity base 2\\n(MCAD E99*)', 'E124\\n(Glu, 5 atoms)\\nBLOCKS', 'A143\\n(Ala, 1 atom)\\nMOSTLY OPEN', 'G179\\n(Gly, 0 atoms)\\nOPEN', 'ACAD9 nearly\\nas open\\nas VLCAD'],\n    ['Net effect', 'Channel short\\n(C10-C12)', 'Channel medium\\n(C14-C20)', 'Channel long\\n(C14-C24)', 'ACAD9 cannot\\naccommodate\\n>C22 saturated'],\n]\n\ncolors = [['#BBDEFB']*5]\ncolors.append(['white', '#FFCDD2', '#FFF9C4', '#C8E6C9', 'white'])\ncolors.append(['white', '#FFCDD2', '#E8F5E9', '#C8E6C9', 'white'])\ncolors.append(['#E0E0E0', '#FFCDD2', '#FFF9C4', '#C8E6C9', '#FFECB3'])\n\ntable = ax2.table(cellText=table_data, cellLoc='center', loc='center',\n                  cellColours=colors)\ntable.auto_set_font_size(False)\ntable.set_fontsize(8.5)\ntable.scale(1, 3.0)\n\nfor j in range(5):\n    table[0, j].set_text_props(fontweight='bold')\n\nax2.text(0.5, -0.02, '* Paper numbering (mature protein)', fontsize=8, \n         ha='center', transform=ax2.transAxes, fontstyle='italic')\n\n# Panel C: GO term decision summary\nax3 = axes[1, 0]\nax3.axis('off')\nax3.set_title('C. GO Term Assessment Summary', fontsize=11, fontweight='bold')\n\ngo_data = [\n    ['GO Term', 'Definition', 'ACAD9\\nEvidence', 'Verdict'],\n    ['GO:0003995\\nacyl-CoA DH', 'Any acyl-CoA DH\\nactivity', 'IDA (multiple)\\nStrong', 'RETAIN'],\n    ['GO:0004466\\nlong-chain\\nacyl-CoA DH', 'C13-C22\\nsubstrates', 'IDA PMID:16020546\\nStrong', 'RETAIN\\n(correct term)'],\n    ['GO:0017099\\nvery-long-chain\\nacyl-CoA DH', '>C22\\nsubstrates', 'IDA PMID:33320993\\nNo assay data!', 'REMOVE\\n(over-annotated)'],\n]\n\ngo_colors = [['#BBDEFB']*4]\ngo_colors.append(['white', 'white', '#C8E6C9', '#C8E6C9'])\ngo_colors.append(['white', 'white', '#C8E6C9', '#C8E6C9'])\ngo_colors.append(['white', 'white', '#FFCDD2', '#FFCDD2'])\n\ngo_table = ax3.table(cellText=go_data, cellLoc='center', loc='center',\n                     cellColours=go_colors)\ngo_table.auto_set_font_size(False)\ngo_table.set_fontsize(9)\ngo_table.scale(1, 2.8)\n\nfor j in range(4):\n    go_table[0, j].set_text_props(fontweight='bold')\ngo_table[3, 3].set_text_props(fontweight='bold', color='red')\n\n# Panel D: Evidence summary\nax4 = axes[1, 1]\nax4.axis('off')\nax4.set_title('D. Lines of Evidence Against GO:0017099', fontsize=11, fontweight='bold')\n\nevidence_lines = [\n    ('1. Enzymatic', 'Peak activity C16:1-C18:1 (long-chain)\\nNo tested activity on >C22 saturated substrates', '#2196F3'),\n    ('2. Structural', 'Thr-139 partially blocks channel vs\\nVLCAD Gly-175 (fully open)', '#4CAF50'),\n    ('3. EC Number', 'ACAD9: EC 1.3.8.8 (long-chain ACAD)\\nVLCAD: EC 1.3.8.8 + 1.3.8.9 (both)', '#FF9800'),\n    ('4. Reference', 'PMID:33320993 is CI assembly study\\nNo substrate specificity assay', '#F44336'),\n    ('5. In vivo', 'Produces C12-C14:1 metabolites\\n(long-chain products)', '#9C27B0'),\n    ('6. UniProt', 'Recommended name: \"Complex I\\nassembly factor ACAD9\"', '#607D8B'),\n]\n\ny = 0.92\nfor label, text, color in evidence_lines:\n    ax4.text(0.02, y, label, fontsize=10, fontweight='bold', color=color,\n             transform=ax4.transAxes, va='top')\n    ax4.text(0.22, y, text, fontsize=9, color='#333333',\n             transform=ax4.transAxes, va='top')\n    y -= 0.16\n\nplt.tight_layout()\nplt.savefig('acad9_comprehensive_analysis.png', dpi=150, bbox_inches='tight')\nplt.show()\nprint(\"Saved: acad9_comprehensive_analysis.png\")\n",
  "plot_number": 3
}