{
  "filename": "plot_1.png",
  "iteration": 1,
  "description": "Evidence summary visualization for Echs1 GO:0004300 annotation support",
  "timestamp": "2026-07-01 07:01:07",
  "code": "\nimport matplotlib\nmatplotlib.use('Agg')\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n# Create a visualization of the evidence supporting the hypothesis\n\nfig, axes = plt.subplots(1, 2, figsize=(14, 7))\n\n# Panel 1: Catalytic residue conservation heatmap\nax1 = axes[0]\nresidue_labels = ['Glu144\\n(cat. acid)', 'Glu164\\n(cat. base)', 'Ala98\\n(binding)', 'Asp99\\n(binding)', \n                   'Ile100\\n(binding)', 'Lys101\\n(binding)', 'Gly141\\n(binding)']\nhuman_residues = ['E', 'E', 'A', 'D', 'I', 'K', 'G']\ndrome_residues = ['E', 'E', 'A', 'D', 'I', 'K', 'G']\nconservation = [1 if h == d else 0.5 for h, d in zip(human_residues, drome_residues)]\n\ndata_matrix = np.array([conservation]).reshape(1, -1)\nim = ax1.imshow(data_matrix, cmap='RdYlGn', vmin=0, vmax=1, aspect='auto')\nax1.set_xticks(range(len(residue_labels)))\nax1.set_xticklabels(residue_labels, rotation=45, ha='right', fontsize=9)\nax1.set_yticks([0])\nax1.set_yticklabels(['Conservation'])\nax1.set_title('Catalytic/Binding Residue Conservation\\n(Human ECHS1 numbering)', fontsize=11, fontweight='bold')\n\n# Add text annotations\nfor j in range(len(residue_labels)):\n    label = f\"H:{human_residues[j]}\\nD:{drome_residues[j]}\"\n    color = 'white' if conservation[j] == 1 else 'black'\n    ax1.text(j, 0, label, ha='center', va='center', fontsize=10, fontweight='bold', color=color)\n\n# Panel 2: Evidence strength summary\nax2 = axes[1]\nevidence_types = [\n    'Catalytic residue\\nconservation',\n    'Domain architecture\\n(Pfam/InterPro)',\n    'PROSITE active\\nsite match',\n    'Cross-species\\nrescue (in vivo)',\n    'Metabolic phenotype\\n(methacrylation)',\n    'PANTHER subfamily\\nclassification',\n    'ISS annotation\\n(FlyBase manual)',\n]\nevidence_strength = [5, 5, 5, 4.5, 4, 5, 4]\ncolors = ['#2d8a4e' if s >= 4.5 else '#6db56d' if s >= 4 else '#a8d4a8' for s in evidence_strength]\n\nbars = ax2.barh(range(len(evidence_types)), evidence_strength, color=colors, edgecolor='#333333', linewidth=0.5)\nax2.set_yticks(range(len(evidence_types)))\nax2.set_yticklabels(evidence_types, fontsize=9)\nax2.set_xlabel('Evidence Strength (1-5)', fontsize=10)\nax2.set_title('Evidence Supporting GO:0004300\\n(enoyl-CoA hydratase activity)', fontsize=11, fontweight='bold')\nax2.set_xlim(0, 5.5)\nax2.axvline(x=4, color='gray', linestyle='--', alpha=0.5, label='Strong threshold')\n\n# Add value labels\nfor bar, val in zip(bars, evidence_strength):\n    ax2.text(val + 0.1, bar.get_y() + bar.get_height()/2, f'{val}', \n             va='center', fontsize=10, fontweight='bold')\n\nplt.tight_layout()\nplt.savefig('evidence_summary.png', dpi=150, bbox_inches='tight')\nplt.show()\nprint(\"Figure saved: evidence_summary.png\")\n",
  "plot_number": 1
}