{
  "filename": "iteration2_evidence.png",
  "iteration": 2,
  "description": "Create comprehensive Iteration 2 evidence figure with AlphaFold pLDDT, ortholog conservation, alignment, and updated verdict",
  "timestamp": "2026-07-01 03:13:06",
  "code": "\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as mpatches\nimport numpy as np\n\nfig, axes = plt.subplots(2, 2, figsize=(16, 13))\nfig.suptitle('Iteration 2: Deepened Evidence \u2014 Drosophila Acat1 Peroxisome Hypothesis\\n(Q9W3N9 | GO:0005777 | ISM from PMID:22758915)', \n             fontsize=13, fontweight='bold', y=0.99)\n\n# Panel A: AlphaFold pLDDT profile for N-terminal and C-terminal\nax1 = axes[0, 0]\n\n# N-terminal pLDDT values (from AlphaFold analysis)\nresidues_n = list(range(1, 41))\nplddt_n = [44.3, 44.9, 48.0, 51.7, 51.0, 49.3, 51.2, 53.9, 51.0, 46.7,\n           48.8, 52.7, 52.5, 51.6, 54.2, 54.4, 56.1, 53.7, 54.0, 64.1,\n           76.9, 86.9, 91.3, 96.4, 98.6, 98.8, 98.8, 98.6, 98.7, 98.8,\n           98.8, 98.9, 98.9, 98.8, 98.9, 98.8, 98.8, 98.7, 98.2, 98.1]\n\ncolors_n = ['#e74c3c' if p < 50 else '#f39c12' if p < 70 else '#3498db' if p < 90 else '#2ecc71' for p in plddt_n]\nax1.bar(residues_n, plddt_n, color=colors_n, width=0.8, edgecolor='none')\nax1.axhline(y=70, color='black', linestyle='--', alpha=0.3, linewidth=0.8)\nax1.axhline(y=90, color='black', linestyle='--', alpha=0.3, linewidth=0.8)\nax1.axvline(x=20.5, color='purple', linestyle='-', alpha=0.7, linewidth=2, label='Predicted MTS cleavage')\nax1.fill_between([0.5, 20.5], [0, 0], [100, 100], alpha=0.1, color='purple')\nax1.set_xlabel('Residue Position', fontsize=10)\nax1.set_ylabel('AlphaFold pLDDT', fontsize=10)\nax1.set_title('A. AlphaFold N-terminal Confidence\\n(Low pLDDT = disordered MTS)', fontsize=11, fontweight='bold')\nax1.set_ylim(0, 105)\nax1.set_xlim(0.5, 40.5)\nax1.legend(fontsize=9)\nax1.text(10, 35, 'MTS\\n(disordered)', ha='center', fontsize=9, color='purple', fontweight='bold')\nax1.text(30, 35, 'Mature\\nprotein', ha='center', fontsize=9, color='green', fontweight='bold')\n\n# Custom legend for pLDDT categories\nlegend_patches = [\n    mpatches.Patch(color='#e74c3c', label='Very low (<50)'),\n    mpatches.Patch(color='#f39c12', label='Low (50-70)'),\n    mpatches.Patch(color='#3498db', label='Confident (70-90)'),\n    mpatches.Patch(color='#2ecc71', label='Very high (>90)'),\n]\n\n# Panel B: C-terminal conservation across insect orders\nax2 = axes[0, 1]\n\norganisms = ['D. melanogaster', 'D. pseudoobscura', 'D. suzukii',\n             'F. arisanus', 'M. bicolor', 'C. glomerata',\n             'E. variegata', 'B. vosnesenskii', 'T. infestans',\n             'C. maculatus', 'T. ni', 'A. plantaginis',\n             'L. decemlineata', 'Human ACAT1', 'Yeast POT1']\n\nc_terms = ['-EKL', '-EKL', '-EKL', '-EKL', '-EKL', '-EKL',\n           '-EKL', '-EKL', '-EKL', '-EKL', '-EKL', '-EKL',\n           '-ERL', '-QKL', '-IKE']\n\norders = ['Diptera', 'Diptera', 'Diptera',\n          'Hymenoptera', 'Hymenoptera', 'Hymenoptera',\n          'Lepidoptera', 'Hymenoptera', 'Hemiptera',\n          'Coleoptera', 'Lepidoptera', 'Lepidoptera',\n          'Coleoptera', 'Mammalia', 'Fungi']\n\norder_colors = {\n    'Diptera': '#3498db', 'Hymenoptera': '#e67e22', 'Lepidoptera': '#9b59b6',\n    'Hemiptera': '#1abc9c', 'Coleoptera': '#e74c3c', 'Mammalia': '#34495e', 'Fungi': '#7f8c8d'\n}\n\ny_pos = np.arange(len(organisms))\nbar_colors = [order_colors[o] for o in orders]\n\nax2.barh(y_pos, [1]*len(organisms), color=bar_colors, alpha=0.6, edgecolor='black', linewidth=0.5)\nfor i, (org, ct) in enumerate(zip(organisms, c_terms)):\n    fontweight = 'bold' if ct == '-EKL' else 'normal'\n    color = 'darkgreen' if ct == '-EKL' else 'red'\n    ax2.text(0.5, i, ct, ha='center', va='center', fontsize=10, fontweight=fontweight, color=color)\n\nax2.set_yticks(y_pos)\nax2.set_yticklabels(organisms, fontsize=8)\nax2.set_xlim(0, 1)\nax2.set_xticks([])\nax2.set_title('B. C-terminal Tripeptide Conservation\\n(insect ACAT1 orthologs)', fontsize=11, fontweight='bold')\nax2.invert_yaxis()\n\n# Add order legend\nfor order, color in order_colors.items():\n    ax2.plot([], [], 's', color=color, alpha=0.6, label=order, markersize=8)\nax2.legend(fontsize=7, loc='lower right', ncol=2)\n\n# Panel C: N-terminal alignment showing MTS cleavage site\nax3 = axes[1, 0]\nax3.axis('off')\n\n# Show alignment with color coding\nalignment_text = \"\"\"\nN-terminal Alignment (MTS \u2192 Mature protein start):\n\n           MTS (disordered, cleaved)              Mature protein (conserved core)\n           \u2190\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2192              \u2190\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2192\n\nDmel:      MSARLLQATRRWSAHRNYSS \u2502 KIAEVVVVSAARTPIGSFQS...\nHuman:     MAVLAALLRSGARSRSPLLRRLVQEIRYVERSY \u2502 VSKPTLKVVVVSAARTPIGSFR...\n                                              ^^^^^^^^^^^^^^^^^^^^^^^^\n                                              Conserved: VVVVSAARTPIG\n\nC-terminal Context:\n\nDmel:      ...CASICNGGGG\u2502ASSILIEKL      \u2190 structured core (pLDDT >97)\nHuman:     ...CASICNGGGG\u2502ASAMLIQKL      \u2190 structured core\n                         ^^^^^^---\n                         Core fold, NOT an appended PTS1\n\nKey: \u2502 marks the MTS cleavage / domain boundary\n\"\"\"\nax3.text(0.02, 0.95, alignment_text, transform=ax3.transAxes, fontsize=9, \n         fontfamily='monospace', verticalalignment='top',\n         bbox=dict(boxstyle='round', facecolor='lightyellow', alpha=0.8))\nax3.set_title('C. Sequence Alignment: MTS and C-terminal Context', fontsize=11, fontweight='bold')\n\n# Panel D: Updated verdict summary\nax4 = axes[1, 1]\nax4.axis('off')\n\nverdict_text = \"\"\"VERDICT: OVER-ANNOTATED (strengthened)\n\nNew evidence from Iteration 2:\n\n1. C-terminal -EKL is part of catalytic fold\n   \u2022 Conserved in 15/16 insect orthologs (94%)\n   \u2022 Not an appended targeting signal\n   \u2022 AlphaFold pLDDT >97 \u2192 structured, buried\n\n2. N-terminal MTS confirmed by AlphaFold\n   \u2022 Residues 1-20: disordered (pLDDT 44-64)\n   \u2022 Matches human ACAT1 MTS pattern\n   \u2022 Shared 'VVVVSAARTPIG' mature start motif\n\n3. No insect ACAT1 has canonical PTS1\n   \u2022 None of 16 orthologs has -SKL/-AKL/-SRL\n   \u2022 All have -[EQR]KL (non-functional)\n\n4. Drosophila ScpX has canonical -SKL\n   \u2022 The genuine peroxisomal thiolase candidate\n\nRECOMMENDATION:\n  Remove GO:0005777 (peroxisome) ISM annotation\n  Retain GO:0005739 (mitochondrion) HDA annotation\n\"\"\"\n\nax4.text(0.05, 0.95, verdict_text, transform=ax4.transAxes, fontsize=9.5, \n         fontfamily='sans-serif', verticalalignment='top',\n         bbox=dict(boxstyle='round', facecolor='#fadbd8', alpha=0.9))\nax4.set_title('D. Updated Verdict', fontsize=11, fontweight='bold')\n\nplt.tight_layout(rect=[0, 0, 1, 0.96])\nplt.savefig('iteration2_evidence.png', dpi=150, bbox_inches='tight')\nplt.show()\nprint(\"Iteration 2 evidence figure saved.\")\n"
}