{
  "filename": "plot_1.png",
  "iteration": 1,
  "description": "Compare domain architectures of ACD6 vs A0A804UIX9 and analyze the 6-TM topology significance",
  "timestamp": "2026-06-22 09:51:21",
  "code": "\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as mpatches\nimport numpy as np\n\nfig, axes = plt.subplots(2, 1, figsize=(14, 6))\n\n# ACD6 (Q8LPS2) - 670 aa\nax1 = axes[0]\nax1.set_xlim(0, 700)\nax1.set_ylim(-1, 3)\nax1.set_title('ACD6 (Q8LPS2) - Arabidopsis thaliana - 670 aa', fontsize=12, fontweight='bold')\n\n# Background bar\nax1.barh(1, 670, height=0.5, color='lightgray', edgecolor='black', linewidth=0.5)\n\n# Ankyrin repeats region (~100-450)\nax1.barh(1, 350, left=100, height=0.5, color='#4CAF50', alpha=0.7, edgecolor='black')\nax1.text(275, 1, 'Ankyrin repeats\\n(PF12796)', ha='center', va='center', fontsize=8)\n\n# TM helices\ntm_acd6 = [(457,477), (493,513), (538,558), (578,598), (603,623), (639,659)]\nfor i, (s, e) in enumerate(tm_acd6):\n    ax1.barh(1, e-s, left=s, height=0.5, color='#FF5722', alpha=0.9, edgecolor='black', linewidth=0.5)\n    ax1.text((s+e)/2, 0.3, f'TM{i+1}', ha='center', va='center', fontsize=6, rotation=90)\n\n# PGG domain region (within TM region)\nax1.barh(2.2, 200, left=450, height=0.3, color='#2196F3', alpha=0.5, edgecolor='blue')\nax1.text(550, 2.2, 'PGG domain (PF13962)', ha='center', va='center', fontsize=8, color='blue')\n\nax1.set_yticks([])\nax1.set_xlabel('')\n\n# A0A804UIX9 - 375 aa\nax2 = axes[1]\nax2.set_xlim(0, 700)\nax2.set_ylim(-1, 3)\nax2.set_title('A0A804UIX9 - Zea mays - 375 aa', fontsize=12, fontweight='bold')\n\n# Background bar\nax2.barh(1, 375, height=0.5, color='lightgray', edgecolor='black', linewidth=0.5)\n\n# Disordered N-term\nax2.barh(1, 44, left=0, height=0.5, color='#FFE0B2', alpha=0.7, edgecolor='black')\nax2.text(22, 1, 'Disordered\\nN-term', ha='center', va='center', fontsize=7)\n\n# TM helices\ntm_maize = [(54,73), (102,123), (135,154), (166,189), (222,239), (269,290)]\nfor i, (s, e) in enumerate(tm_maize):\n    ax2.barh(1, e-s, left=s, height=0.5, color='#FF5722', alpha=0.9, edgecolor='black', linewidth=0.5)\n    ax2.text((s+e)/2, 0.3, f'TM{i+1}', ha='center', va='center', fontsize=6, rotation=90)\n\n# PGG domains\nax2.barh(2.2, 107, left=50, height=0.3, color='#2196F3', alpha=0.5, edgecolor='blue')\nax2.text(103, 2.2, 'PGG domain 1', ha='center', va='center', fontsize=8, color='blue')\nax2.barh(2.2, 77, left=217, height=0.3, color='#2196F3', alpha=0.5, edgecolor='blue')\nax2.text(255, 2.2, 'PGG domain 2', ha='center', va='center', fontsize=8, color='blue')\n\n# C-terminal region\nax2.barh(1, 80, left=295, height=0.5, color='#E1BEE7', alpha=0.7, edgecolor='black')\nax2.text(335, 1, 'C-term', ha='center', va='center', fontsize=7)\n\nax2.set_yticks([])\nax2.set_xlabel('Residue position')\n\n# Legend\nlegend_elements = [\n    mpatches.Patch(color='#4CAF50', alpha=0.7, label='Ankyrin repeats'),\n    mpatches.Patch(color='#FF5722', alpha=0.9, label='TM helices'),\n    mpatches.Patch(color='#2196F3', alpha=0.5, label='PGG domain'),\n    mpatches.Patch(color='#FFE0B2', alpha=0.7, label='Disordered'),\n    mpatches.Patch(color='lightgray', label='Uncharacterized regions'),\n]\nfig.legend(handles=legend_elements, loc='lower center', ncol=5, fontsize=9, bbox_to_anchor=(0.5, -0.02))\n\nplt.tight_layout()\nplt.savefig('domain_architecture_comparison.png', dpi=150, bbox_inches='tight')\nplt.show()\nprint(\"Domain architecture comparison saved.\")\n",
  "plot_number": 1
}