{
  "filename": "ascl1_evidence_summary.png",
  "iteration": 3,
  "description": "Summary visualization: evidence weight for heterodimer vs homodimer and GO annotation decision table",
  "timestamp": "2026-06-21 22:32:23",
  "code": "\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as mpatches\nimport numpy as np\n\nfig, axes = plt.subplots(1, 2, figsize=(16, 8))\n\n# Panel A: Evidence weight comparison\nax1 = axes[0]\ncategories = [\n    'Structural\\n(Zhou 2026)',\n    'Biochemical\\n(Vi\u00f1als 2004,\\nPersson 2000)',\n    'Evolutionary\\n(Cabrera 1991,\\nMurre 1989)',\n    'Regulatory\\n(J\u00f6gi 2002,\\nId proteins)',\n    'Motif/ChIP\\n(JASPAR,\\nWapinski 2013)',\n    'Database\\n(UniProt\\ncurated)',\n]\n\n# Evidence strength for heterodimer (positive) vs homodimer (negative)\nheterodimer_scores = [5, 5, 5, 4.5, 4, 4.5]\nhomodimer_scores = [0, 0, -5, 0, 0, -3]  # Negative = evidence against homodimer\n\ncolors_het = ['#2196F3'] * 6\ncolors_hom = ['#FF5722'] * 6\n\ny_pos = np.arange(len(categories))\nbar_width = 0.35\n\nbars1 = ax1.barh(y_pos + bar_width/2, heterodimer_scores, bar_width, \n                  color='#2196F3', alpha=0.85, label='Supports E-protein heterodimer', edgecolor='white')\nbars2 = ax1.barh(y_pos - bar_width/2, homodimer_scores, bar_width,\n                  color='#FF5722', alpha=0.85, label='Against homodimer', edgecolor='white')\n\nax1.set_yticks(y_pos)\nax1.set_yticklabels(categories, fontsize=10)\nax1.set_xlabel('Evidence Strength (0-5 scale)', fontsize=11)\nax1.set_title('Evidence Weight: ASCL1 DNA-Binding Mode', fontsize=13, fontweight='bold')\nax1.axvline(x=0, color='black', linewidth=0.8)\nax1.set_xlim(-6, 6)\nax1.legend(loc='lower right', fontsize=9)\nax1.grid(axis='x', alpha=0.3)\n\n# Panel B: GO annotation decision table\nax2 = axes[1]\nax2.axis('off')\n\ntable_data = [\n    ['GO Term', 'Current\\nEvidence', 'Assessment', 'Action'],\n    ['GO:0042802\\nidentical protein\\nbinding', 'IEA\\n(Ensembl\\nCompara)', 'Over-\\nannotated', 'REMOVE'],\n    ['GO:0046983\\nprotein dimerization\\nactivity', 'IEA\\n(InterPro)', 'Imprecise', 'REPLACE\\nwith\\nGO:0046982'],\n    ['GO:0046982\\nprotein hetero-\\ndimerization', 'Not yet\\nannotated', 'Strongly\\nsupported', 'ADD\\n(IDA/IPI)'],\n    ['GO:0043425\\nbHLH TF binding', 'IPI\\n(UniProt)', 'Correct', 'RETAIN'],\n    ['GO:0070888\\nE-box binding', 'IDA\\n(UniProt)', 'Correct', 'RETAIN'],\n]\n\ncolors_map = {\n    'REMOVE': '#FFCDD2',\n    'REPLACE\\nwith\\nGO:0046982': '#FFE0B2', \n    'ADD\\n(IDA/IPI)': '#C8E6C9',\n    'RETAIN': '#E8F5E9',\n}\n\ntable = ax2.table(cellText=table_data, loc='center', cellLoc='center',\n                   colWidths=[0.28, 0.18, 0.18, 0.18])\ntable.auto_set_font_size(False)\ntable.set_fontsize(9)\ntable.scale(1, 2.2)\n\n# Style header\nfor j in range(4):\n    table[0, j].set_facecolor('#1565C0')\n    table[0, j].set_text_props(color='white', fontweight='bold', fontsize=10)\n\n# Style action cells\nfor i in range(1, 6):\n    action = table_data[i][3]\n    if action in colors_map:\n        table[i, 3].set_facecolor(colors_map[action])\n        if action == 'REMOVE':\n            table[i, 3].set_text_props(fontweight='bold', color='#C62828')\n        elif action.startswith('ADD'):\n            table[i, 3].set_text_props(fontweight='bold', color='#2E7D32')\n    # Assessment column\n    assessment = table_data[i][2]\n    if 'Over' in assessment:\n        table[i, 2].set_facecolor('#FFCDD2')\n    elif 'Correct' in assessment:\n        table[i, 2].set_facecolor('#E8F5E9')\n    elif 'supported' in assessment:\n        table[i, 2].set_facecolor('#C8E6C9')\n\nax2.set_title('GO Annotation Decision Table for ASCL1', fontsize=13, fontweight='bold', pad=20)\n\nplt.tight_layout()\nplt.savefig('ascl1_evidence_summary.png', dpi=150, bbox_inches='tight')\nplt.show()\nprint(\"Figure saved: ascl1_evidence_summary.png\")\n"
}