{
  "filename": "plot_1.png",
  "iteration": 1,
  "description": "Create comprehensive evidence summary visualization for Mcad GO:0070991 evaluation",
  "timestamp": "2026-07-01 07:00:13",
  "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))\nfig.suptitle('Evidence Summary: Drosophila Mcad (Q9VSA3) \u2014 GO:0070991\\nMedium-chain fatty acyl-CoA dehydrogenase activity', \n             fontsize=14, fontweight='bold', y=0.98)\n\n# Panel 1: Active site conservation bar chart\nax1 = axes[0, 0]\ncategories = ['Catalytic\\nGlu', 'FAD\\nbinding', 'Substrate\\nbinding', 'Overall\\nkey residues']\nidentical = [1, 7, 12, 20]\ntotal = [1, 7, 13, 21]\npct = [i/t*100 for i, t in zip(identical, total)]\n\nbars = ax1.bar(categories, pct, color=['#2ecc71', '#3498db', '#e67e22', '#9b59b6'], \n               edgecolor='black', linewidth=0.5)\nax1.set_ylim(0, 110)\nax1.set_ylabel('% Identical', fontsize=11)\nax1.set_title('Active Site / Key Residue Conservation\\n(vs Human ACADM P11310)', fontsize=11, fontweight='bold')\nfor bar, i, t in zip(bars, identical, total):\n    ax1.text(bar.get_x() + bar.get_width()/2., bar.get_height() + 2, \n             f'{i}/{t}', ha='center', va='bottom', fontweight='bold', fontsize=10)\nax1.axhline(y=100, color='green', linestyle='--', alpha=0.3)\nax1.axhline(y=50, color='red', linestyle='--', alpha=0.3)\n\n# Panel 2: Domain classifier agreement\nax2 = axes[0, 1]\nclassifiers = ['CDD\\ncd01157', 'InterPro\\nIPR034180', 'PANTHER\\nPTHR48083:SF2', 'Pfam\\nAcyl-CoA_dh', 'EC\\n1.3.8.7']\nclassifications = ['MCAD', 'MCAD', 'MCAD', 'ACAD family', 'MCAD']\ncolors = ['#2ecc71' if c == 'MCAD' else '#f1c40f' for c in classifications]\n\nbars2 = ax2.barh(classifiers, [1]*5, color=colors, edgecolor='black', linewidth=0.5)\nax2.set_xlim(0, 1.5)\nax2.set_xlabel('')\nax2.set_title('Domain Classifier Agreement\\n(All classify as MCAD subfamily)', fontsize=11, fontweight='bold')\nfor i, (bar, cls) in enumerate(zip(bars2, classifications)):\n    ax2.text(0.5, bar.get_y() + bar.get_height()/2., cls, \n             ha='center', va='center', fontweight='bold', fontsize=11, color='black')\nax2.set_xticks([])\n\nlegend_elements = [mpatches.Patch(facecolor='#2ecc71', label='MCAD-specific'),\n                   mpatches.Patch(facecolor='#f1c40f', label='ACAD family (compatible)')]\nax2.legend(handles=legend_elements, loc='lower right', fontsize=9)\n\n# Panel 3: Evidence lines for GO:0070991\nax3 = axes[1, 0]\nevidence_types = ['IBA\\n(Phylogenetic)', 'IMP\\n(Mutant phenotype)', 'IEA\\n(InterPro/EC)', \n                  'Sequence\\nconservation', 'Domain\\nclassification']\nevidence_strength = [4, 3.5, 3, 5, 5]  # 1-5 scale\nevidence_colors = ['#3498db', '#e74c3c', '#95a5a6', '#2ecc71', '#2ecc71']\n\nbars3 = ax3.barh(evidence_types, evidence_strength, color=evidence_colors, \n                  edgecolor='black', linewidth=0.5)\nax3.set_xlim(0, 6)\nax3.set_xlabel('Evidence Strength (1-5)', fontsize=11)\nax3.set_title('Lines of Evidence for GO:0070991', fontsize=11, fontweight='bold')\nfor bar, val in zip(bars3, evidence_strength):\n    ax3.text(val + 0.1, bar.get_y() + bar.get_height()/2., \n             f'{val:.1f}', ha='left', va='center', fontweight='bold', fontsize=10)\n\nlegend3 = [mpatches.Patch(facecolor='#3498db', label='GO annotation'),\n           mpatches.Patch(facecolor='#e74c3c', label='Experimental'),\n           mpatches.Patch(facecolor='#95a5a6', label='Electronic'),\n           mpatches.Patch(facecolor='#2ecc71', label='Computational (this study)')]\nax3.legend(handles=legend3, loc='lower right', fontsize=8)\n\n# Panel 4: Drosophila ACAD family paralogs\nax4 = axes[1, 1]\nparalogs = ['Mcad\\n(Q9VSA3)', 'Arc42\\n(SCAD)', 'CG4860\\n(SCAD)', 'Acadvl\\n(VLCAD)', \n            'GH07925p\\n(SB-CAD)', 'Ivd\\n(IVD)', 'CG9547\\n(GCDH)']\nchain_pref = ['C6-C12\\nMedium', 'C4-C6\\nShort', 'C4-C6\\nShort', 'C14-C20\\nVery long', \n              'C4-C6\\nShort/branch', 'Branched\\nchain', 'Glutaryl\\n-CoA']\ncolors4 = ['#e74c3c', '#3498db', '#3498db', '#f39c12', '#9b59b6', '#1abc9c', '#95a5a6']\n\ny_pos = np.arange(len(paralogs))\nbars4 = ax4.barh(y_pos, [1]*len(paralogs), color=colors4, edgecolor='black', linewidth=0.5)\nax4.set_yticks(y_pos)\nax4.set_yticklabels(paralogs, fontsize=9)\nax4.set_title('Drosophila ACAD Family Paralogs\\n(distinct substrate preferences)', fontsize=11, fontweight='bold')\nax4.set_xticks([])\n\nfor i, (bar, pref) in enumerate(zip(bars4, chain_pref)):\n    ax4.text(0.5, bar.get_y() + bar.get_height()/2., pref, \n             ha='center', va='center', fontweight='bold', fontsize=9, color='white')\n\n# Highlight Mcad\nbars4[0].set_edgecolor('red')\nbars4[0].set_linewidth(3)\n\nplt.tight_layout(rect=[0, 0, 1, 0.95])\nplt.savefig('evidence_summary.png', dpi=150, bbox_inches='tight')\nplt.show()\nprint(\"Evidence summary figure saved.\")\n",
  "plot_number": 1
}