{
  "filename": "dcaf12l2_interface_analysis.png",
  "iteration": 1,
  "description": "Visualize DDB1-binding interface conservation analysis showing the H-box helix divergence",
  "timestamp": "2026-07-06 20:39:11",
  "code": "\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as mpatches\nimport numpy as np\n\nfig, axes = plt.subplots(1, 2, figsize=(16, 7))\nfig.suptitle('DCAF12L2 DDB1-Binding Interface Conservation Analysis', fontsize=13, fontweight='bold')\n\n# Panel A: Interface residue conservation by region\nax = axes[0]\n\n# Data from the analysis\nregions = ['N-terminal\\nhelix (H-box)\\n27 residues', 'WD1-2\\n3 residues', 'WD3-6\\n1 residue', 'WD7/C-term\\n5 residues']\nidentical_counts = [15, 2, 1, 2]\nconservative_counts = [1, 0, 0, 0]\nnoncons_counts = [11, 1, 0, 3]\n\nx = np.arange(len(regions))\nwidth = 0.25\n\nbars1 = ax.bar(x - width, identical_counts, width, label='Identical', color='#2ecc71')\nbars2 = ax.bar(x, conservative_counts, width, label='Conservative', color='#f39c12')\nbars3 = ax.bar(x + width, noncons_counts, width, label='Non-conservative', color='#e74c3c')\n\nax.set_xlabel('Interface Region')\nax.set_ylabel('Number of residues')\nax.set_title('A. DDB1-Contacting Residue Conservation by Region')\nax.set_xticks(x)\nax.set_xticklabels(regions, fontsize=8)\nax.legend()\n\n# Add percentage annotation\nfor i, (ident, cons, nc) in enumerate(zip(identical_counts, conservative_counts, noncons_counts)):\n    total = ident + cons + nc\n    pct = (ident + cons) / total * 100 if total > 0 else 0\n    ax.text(i, max(ident, cons, nc) + 0.5, f'{pct:.0f}% conserved', ha='center', fontsize=8, fontweight='bold')\n\n# Panel B: Schematic of interface mapping\nax = axes[1]\nax.axis('off')\n\n# Create a schematic showing DCAF12 structure with highlighted interface\ntext = \"\"\"\nDDB1-DCAF12 Interface Analysis (from PDB 8AJN, cryo-EM 3.0\u00c5)\n\nKEY FINDINGS:\n\n1. DDB1-binding interface has 36 contact residues\n   \u2022 56% identical (20/36)\n   \u2022 3% conservative (1/36)  \n   \u2022 42% non-conservative (15/36)\n   Overall: 58% conserved (< 66.6% global identity)\n\n2. N-terminal H-box helix (res 42-80) is the MAJOR interface\n   \u2022 27 of 36 contact residues are in this region\n   \u2022 Several disruptive substitutions:\n     Y48\u2192H  (aromatic \u2192 imidazole)\n     L57\u2192P  (helix \u2192 helix-breaker!)  \n     E60\u2192L  (charged \u2192 hydrophobic)\n     H68\u2192R  (imidazole \u2192 guanidinium)\n     \n3. YDIR motif (Y365-R368) is NOT at the direct interface\n   \u2022 Mutagenesis R368 affects DDB1 binding (allosteric?)\n   \u2022 YDIR is perfectly conserved in DCAF12L2\n\n4. WD40 propeller periphery: mixed conservation\n   \u2022 H100\u2192A (loss of histidine at WD1 contact)\n   \u2022 S428\u2192W, S429\u2192P, T431\u2192M (WD7 changes)\n\nIMPLICATION: DCAF12L2 DDB1 binding is UNCERTAIN\ndespite YDIR conservation, because the actual\ncontact surface (H-box) shows significant divergence.\n\"\"\"\nax.text(0.05, 0.95, text, transform=ax.transAxes, fontsize=9,\n        verticalalignment='top', fontfamily='monospace',\n        bbox=dict(boxstyle='round', facecolor='lightyellow', alpha=0.8))\nax.set_title('B. Interface Analysis Summary', fontsize=11, fontweight='bold')\n\nplt.tight_layout()\nplt.savefig('dcaf12l2_interface_analysis.png', dpi=150, bbox_inches='tight')\nplt.show()\nprint(\"Figure saved\")\n"
}