Quantifying electrostatic control of docking and binding energetics in functional Cx36 gap junctions.
The 6 matches
- [1] § Results › ESI number at the E2–E2 interface governs GJ formation ↔ cx36_mut_corr.ipynb, lines 1–57 · score 0.82 · K238Q, K238A, K238E, E241A, E230K, E239K
- [2] § Results › ESI number at the E2–E2 interface governs GJ formation ↔ cx36_mut_corr.ipynb, lines 1–57 · score 0.82 · K238Q, K238A, K238E, E241A, E230K, E239K
- [3] § Results › E241K-containing variants could not form functional GJs ↔ cx36_mut_corr.ipynb, lines 1–57 · score 0.70 · K238E, E241A, E230K, E239K, E241K, hetero
- [4] § Results › E241K-containing variants could not form functional GJs ↔ cx36_mut_corr.ipynb, lines 1–57 · score 0.70 · K238E, E241A, E230K, E239K, E241K, hetero
- [5] § Methods › Free energy calculation on designed Cx36 variants ↔ cx36_het_dock.ipynb, lines 39–69 · score 0.61 · van der Waals, interaction energies, backbone, bonding, solvation, docking
- [6] § Results › The essential role of K238 in forming functional GJs ↔ cx36_het_dock.ipynb, lines 39–69 · score 0.52 · van der Waals, interaction energy, bonds, docked, electrostatic, Cx36
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Jupyter notebook · 869 lines · 29 KB · no license · 2 matches
- # %%
- cx36_mut = {
- 'hetero': {
- 'mut_type':
- [
- 'K238A', # L -3-2=-5
- 'E239K;E230K,E239K', # N 0+2=2
- 'K238E,E239K', # O 0+0=0
- 'E230K;E230K,E239K', # Q 0+2=2
- 'E241A;E230K,E239K', # P -1+2=1
- 'K238E,E230K', # R -2-2=-4
- 'E230K,E239K', # D 2-2 = 0
- 'E230K', # B 0-2 =-2
- 'E239K', # C -2
- 'E230K,E239K;K238E,E230K', # E 2-2 = 0
- 'E230K;K238E', # F 0-4 = -4
- 'E239K;K238E', # G 0-4 = -4
- 'K238Q', # M -3 - 2 = -5
- 'E239K;E230K,E239K', # N 0+2=2
- 'K238E;K238E,E230K', # V -4 -2 = -6
- 'K238E;K238E,E239K', # W -4 -2 = -6
- 'K238E;E230K,E239K,E241K', # a -4 + 4 = 0
- 'K238E;E241K', #b -4 + 0 = -4
- ],
- 'label': ['L', 'N', 'O', 'Q', 'P', 'R', 'D' ,'B', 'C', 'E', 'F', 'G', 'M', 'N', 'V', 'W', 'a', 'b'],
- 'ESIs': [3, 3, 3, 3, 3, 2, 4, 5, 5, 4, 4, 4, 3, 3, 1, 1, 2, 2],
- 'net_charge' :[-5, 2, 0, 2, 1, -4, 0, -2, -2, 0, -4, -4, -5, 2, -6, -6, 0, -4],
- 'Functional': [True, True, True, False, False, False, True, True, True, True, True, True, True, True, False, False, False, False]
- },
- 'homo': {
- 'mut_type':
- [
- 'E241A;E241A', # J -1*2 = -2
- 'E239K;E239K', # I 0*2 = 0
- 'E230K;E230K', # H 0*2 = 0
- 'K238E,E230K,E239K;K238E,E230K,E239K', # K -2*2 = -4
- 'E230K,E239K;E230K,E239K', # S 2*2=4
- 'K238E,E230K;K238E,E230K', # T -2*2 = -4
- 'K238E,E239K;K238E,E239K', # U -2*2 = -4
- 'K238Q;K238Q', # Z -3*2 = -6
- 'K238A;K238A', # X -3*2 = -6
- 'K238E;K238E', # Y -4*2 = -8
- 'E241K;E241K', # c 0*2 = 0
- 'E241K,E239K,E230K;E241K,E239K,E230K', # d 2*4 = 8
- 'E241K,E239K,E230K,K238E;E241K,E239K,E230K,K238E', # e 2*2 = 4
- ],
- 'label': ['J', 'I', 'H', 'K','S', 'T', 'U', 'Z', 'X', 'Y', 'c', 'd', 'e'],
- 'ESIs': [4, 4, 4, 4, 2, 2, 2, 0, 0, 0, 4, 0, 6],
- 'net_charge' : [-2, 0, 0, -4, 4, -4, -4, -6, -6, -8, 0, 8, 4],
- 'Functional': [True, True, True, True, False, False, False, False, False, False, False, False, False]
- }
- }
- stru = ['8xgd','8iyg']
- for key in cx36_mut:
- for ter in cx36_mut[key]:
- print(key, ter, len(cx36_mut[key][ter]))
- # %%
- import pandas as pd
- import matplotlib.pyplot as plt
- import seaborn as sns
- import numpy as np
- from scipy.stats import linregress
- def pval_to_stars(p):
- if p < 0.001:
- return '***'
- elif p < 0.01:
- return '**'
- elif p < 0.05:
- return '*'
- else:
- return 'ns'
- # %% [markdown]
- # # Dataset Combine for difference to WT
- # %%
- #pdb = '8xgd' # '8xgd','8iyg'
- pdb = '8xgd'
- file = 'Dif' #Average, Dif, Raw
- # %%
- all_diff_df = []
- use_e241k = True
- for mut_sym in ['hetero', 'homo']:
- fdx_df = pd.read_csv(f'./{pdb}_{mut_sym}/{file}_{pdb}.fxout', sep='\t', skiprows=8)
- e241k_mut_df = pd.read_csv(f'./{pdb}_{mut_sym}/{file}_{pdb}_e241k.fxout', sep='\t', skiprows=8)
- #drop_cols
- drop_cols = ['Van der Waals clashes', 'cis_bond', 'torsional clash', 'backbone clash', 'disulfide',
- 'electrostatic kon', 'helix dipole', 'Sidechain Hbond'] #'Backbone Hbond', ,'Solvation Hydrophobic', 'energy Ionisation'
- fdx_df = fdx_df.drop(drop_cols, axis=1)
- e241k_mut_df = e241k_mut_df.drop(drop_cols, axis=1)
- drop_cols = fdx_df.columns[~(fdx_df != 0).all()]
- fdx_df = fdx_df.drop(drop_cols, axis=1)
- e241k_mut_df = e241k_mut_df.drop(drop_cols, axis=1)
- if use_e241k:
- fdx_df = pd.concat([fdx_df, e241k_mut_df], ignore_index=True)
- fdx_df['label'] = [lb for lb in cx36_mut[mut_sym]['label'] for i in range(10)]
- fdx_df['ESI'] = [esi for esi in cx36_mut[mut_sym]['ESIs'] for i in range(10)]
- fdx_df['net_charge'] = [nc for nc in cx36_mut[mut_sym]['net_charge'] for i in range(10)]
- fdx_df['mut'] = [mt for mt in cx36_mut[mut_sym]['mut_type'] for i in range(10)]
- fdx_df['mut_type'] = [mut_sym for i in range(len(fdx_df))]
- fdx_df['functional'] = [fn for fn in cx36_mut[mut_sym]['Functional'] for i in range(10)]
- drop_cols = ['Pdb']
- fdx_df = fdx_df.drop(drop_cols, axis=1)
- all_diff_df.append(fdx_df)
- all_diff_df = pd.concat(all_diff_df, ignore_index=True)
- # %%
- all_diff_df
- # %% [markdown]
- # ## Direct statitics
- # %%
- from sklearn.metrics import silhouette_score
- import numpy as np
- from scipy.stats import mannwhitneyu
- # %% [markdown]
- # ### All pairs
- # %% [markdown]
- # Check sample size
- # %%
- len(all_diff_df[all_diff_df['functional'] == True]), len(all_diff_df[all_diff_df['functional'] == False])
- # %% [markdown]
- # plot figure
- # %%
- # Prepare data
- all_diff_df['functional_label'] = all_diff_df['functional'].map({True: 'Functional', False: 'Non-functional'})
- feature_cols = [col for col in all_diff_df.columns if all_diff_df[col].dtype != 'O' and col not in\
- ['functional', 'ESI','functional_label', 'mut','mut_type', 'label', 'net_charge']]
- labels = all_diff_df['functional_label']
- font_label = 18
- # Create PairGrid
- g = sns.PairGrid(
- all_diff_df,
- vars=feature_cols,
- hue='functional_label',
- palette={'Functional': 'green', 'Non-functional': 'red'},
- )
- # Map scatter plots
- g.map_lower(sns.scatterplot, edgecolor='k', s=60, alpha=0.8)
- g.map_diag(sns.kdeplot, fill=True, alpha=0.5) # KDE on diagonal, like pairplot
- # Compute and annotate silhouette scores
- for i, x_var in enumerate(feature_cols):
- for j, y_var in enumerate(feature_cols):
- if j > i: # Upper triangle (blank by default)
- g.axes[i, j].set_axis_off()
- if j < i:
- ax = g.axes[i, j]
- X = all_diff_df[[y_var, x_var]].values # Note: y_var first for rows, x_var for columns
- score = silhouette_score(X, labels)
- # Linear regression on all data
- slope, intercept, r_val, p_val, _ = linregress(X[:,0], X[:,1])
- # Plot the regression line
- x_fit = pd.Series(sorted(X[:,0]))
- y_fit = slope * x_fit + intercept
- ax.plot(x_fit, y_fit, color='grey', linestyle='-', linewidth=1)
- ax.set_title(f"S. score: {score:.2f}; R: {r_val:.2f} ({pval_to_stars(p_val)})", fontsize=font_label-3)
- if j == i:
- ax = g.axes[i, j]
- # Compute silhouette score for the diagonal (self-comparison)
- X = all_diff_df[[x_var]].values
- score = silhouette_score(X, labels)
- # Compute p-value (Mann-Whitney U test, non-parametric) for Non-functional vs Functional
- #elec_func = all_diff_df[all_diff_df['functional']==True][x_var]
- #elec_nonfunc = all_diff_df[all_diff_df['functional']==False][x_var]
- #stat, pval = mannwhitneyu(elec_func, elec_nonfunc, alternative='two-sided')
- ax.set_title(f"S. score: {score:.2f}", fontsize=font_label-3)
- g.add_legend(fontsize=30)
- g._legend.set_title("") # Access the legend directly from the PairGrid
- #plt.suptitle("Pairwise Scatter Plots with Silhouette Scores", y=1.02, fontsize=30)
- for i, feature in enumerate(feature_cols):
- if feature == 'total energy':
- # Set y-label for the first feature
- g.axes[i, 0].set_ylabel('∆∆G', fontsize=font_label-4)
- # Set x-label for the first feature
- g.axes[-1, i].set_xlabel('∆∆G', fontsize=font_label-2)
- elif feature == 'Electrostatics':
- # Set y-labels for the first column (leftmost)
- g.axes[i, 0].set_ylabel('∆∆Ψ ', fontsize=font_label-4)
- # Set x-labels for the bottom row
- g.axes[-1, i].set_xlabel('∆∆Ψ', fontsize=font_label-2)
- else:
- # Set y-labels for the first column (leftmost)
- g.axes[i, 0].set_ylabel(f'∆{feature}', fontsize=font_label-4)
- # Set x-labels for the bottom row
- g.axes[-1, i].set_xlabel(f'∆{feature}', fontsize=font_label-2)
- plt.tight_layout()
- plt.savefig(f"{pdb}_Pairwise_Plots.svg", format="svg")
- # %% [markdown]
- # Output Excel for the figure
- # %%
- if pdb == '8xgd':
- all_diff_df[feature_cols+['functional_label']].to_csv(f"Fig_S4A.csv", index=False)
- else:
- all_diff_df[feature_cols+['functional_label']].to_csv(f"Fig_S5C.csv", index=False)
- # %% [markdown]
- # ### Single figure of a quantity vs ∆∆G
- # %%
- all_diff_df_reduced = all_diff_df[~all_diff_df['mut'].isin(['E241A;E241A', 'E241K,E239K,E230K;E241K,E239K,E230K'])]
- # %% [markdown]
- # Plot data
- # %%
- from scipy.stats import linregress
- # Prepare data
- X = all_diff_df_reduced[all_diff_df_reduced['mut_type']=='homo'][['Electrostatics', 'total energy']].values
- x = X[:, 0] # Electrostatics
- y = X[:, 1] # Total Energy
- # Scatter plot
- plt.figure(figsize=(6, 5))
- plt.scatter(x, y, color='darkcyan', edgecolor='k', s=60, alpha=0.8)
- # Linear fit
- slope, intercept, r_val, p_val, _ = linregress(x, y)
- x_fit = np.linspace(x.min(), x.max(), 100)
- y_fit = slope * x_fit + intercept
- plt.plot(x_fit, y_fit, color='Grey', linestyle='-', linewidth=2, label='Linear fit')
- # Annotation
- stats_text = f"Rp = {r_val:.2f} ({pval_to_stars(p_val)})"
- # Labels and formatting
- plt.xlabel('∆∆ϕ, kcal/mol', fontsize=14)
- plt.ylabel('∆∆G, kcal/mol', fontsize=14)
- plt.ylim(-21, 41) #(-15, 32)
- plt.xlim(-9, 18) #(-20, 22)
- ax = plt.gca()
- #ax.tick_params(labelbottom=False, labelleft=False)
- plt.tight_layout()
- print(len(X))
- #plt.savefig(f"{pdb}_∆E_vs_∆∆G.svg", format="svg")
- # %%
- r_val, p_val
- # %% [markdown]
- # output csv file for the plot
- # %%
- if pdb == '8xgd':
- (all_diff_df_reduced[all_diff_df_reduced['mut_type']=='homo'][['Electrostatics', 'total energy']]).to_csv(f"Fig_1B.csv", index=False)
- # %% [markdown]
- # ### Multiple quantities vs ∆∆G
- # %% [markdown]
- # Plot
- # %%
- from scipy.stats import linregress
- # Scatter plot
- fig, axes = plt.subplots(figsize=(16, 10), ncols=3, nrows=2)
- axes = axes.flatten()
- ener_terms = ['Backbone Hbond', 'Van der Waals', 'Solvation Polar', 'Solvation Hydrophobic', 'entropy sidechain', 'entropy mainchain']
- ener_term_short = ['BB Hbond', 'VdW', 'Solv Polar', 'Solv Hydrophobic', 'Ent Sidechain', 'Ent Mainchain']
- # Prepare elestrostaics data
- X_e = all_diff_df_reduced[all_diff_df_reduced['mut_type']=='homo'][['Electrostatics', 'total energy']].values
- x_e = X_e[:, 0] # Electrostatics
- y_e = X_e[:, 1] # Total Energy
- # Scatter plot
- #plt.figure(figsize=(6, 5))
- #plt.scatter(x, y, color='darkcyan', edgecolor='k', s=60, alpha=0.8)
- # Linear fit
- slope_e, intercept_e, r_val_e, p_val_e, _ = linregress(x_e, y_e)
- x_e_fit = np.linspace(x_e.min(), x_e.max(), 100)
- y_e_fit = slope_e * x_e_fit + intercept_e
- for i, ax in enumerate(axes):
- # Prepare data
- X = all_diff_df_reduced[all_diff_df_reduced['mut_type']=='homo'][[ener_terms[i], 'total energy']].values
- x = X[:, 0]
- y = X[:, 1]
- ax.scatter(x, y, color='darkcyan', edgecolor='k', s=60, alpha=0.8)
- ax.scatter(x_e, y_e, color='Grey', edgecolor='k', s=20, alpha=0.3)
- # Linear fit
- slope, intercept, r_val, p_val, _ = linregress(x, y)
- x_fit = np.linspace(x.min(), x.max(), 100)
- y_fit = slope * x_fit + intercept
- ax.plot(x_fit, y_fit, color='k', linestyle='-', linewidth=2, label='Linear fit')
- ax.plot(x_e_fit, y_e_fit, color='Grey', linestyle='-', linewidth=2, label='Linear fit (Electrostatics)')
- ax.set_xlabel('∆'+ener_term_short[i]+' (kcal/mol)', fontsize=14)
- ax.set_ylim(-15, 32)
- ax.set_xlim(-20, 22)
- if i == 0 or i == 3:
- ax.set_ylabel('∆∆G (kcal/mol)', fontsize=14)
- # Annotation
- stats_text = f"Rp={r_val:.2f}"
- ax.set_title('∆∆G vs ∆'+ener_terms[i]+' '+stats_text, fontsize=16)
- plt.tight_layout()
- plt.savefig(f"{pdb}_∆E_vs_other_SI.svg", format="svg")
- # %% [markdown]
- # Ouput figure csv file
- # %%
- all_diff_df_reduced[all_diff_df_reduced['mut_type']=='homo']\
- [['total energy','Backbone Hbond', 'Van der Waals', 'Solvation Polar', 'Solvation Hydrophobic', 'entropy sidechain', 'entropy mainchain']].to_csv(f"Fig_S1.csv", index=False)
- # %% [markdown]
- # ### ∆phi distribution
- # %% [markdown]
- # Plot
- # %%
- import seaborn as sns
- from scipy.stats import mannwhitneyu
- # Prepare data
- df = all_diff_df.copy()
- df['functional_label'] = df['functional'].map({True: 'Functional', False: 'Non-functional'})
- # Extract values
- elec_func = df[df['functional_label'] == 'Functional']['Electrostatics']
- elec_nonfunc = df[df['functional_label'] == 'Non-functional']['Electrostatics']
- # Compute p-value (Mann-Whitney U test, non-parametric)
- stat, pval = mannwhitneyu(elec_func, elec_nonfunc, alternative='two-sided')
- # Plot
- plt.figure(figsize=(7, 5))
- sns.histplot(elec_func, color='g', label='Functional', kde=True, stat='density',
- bins=12, alpha=0.35, edgecolor=None, kde_kws={'bw_adjust': 1})
- sns.histplot(elec_nonfunc, color='r', label='Non-functional', kde=True, stat='density',
- bins=12, alpha=0.35, edgecolor=None, kde_kws={'bw_adjust': 1})
- #plt.xlabel('∆Electrostatics', fontsize=14)
- #plt.ylabel('Frequency', fontsize=14)
- plt.yticks([0.0, 0.05, 0.1,0.15,0.2])
- ax = plt.gca()
- ax.tick_params(labelbottom=False, labelleft=False)
- ax.set_xlabel('')
- ax.set_ylabel('')
- plt.tight_layout()
- print(len(df[df['functional']==True]), len(df[df['functional']==False]))
- #plt.savefig(f"{pdb}_∆Electrostatics_dist.svg", format="svg")
- # %% [markdown]
- # Output plot data csv file
- # %%
- if pdb == '8xgd':
- df[['functional_label','Electrostatics']].to_csv(f"Fig_4C.csv", index=False)
- # %% [markdown]
- # ## ESI vs some energy
- # %%
- grouped_df = all_diff_df.groupby(['label', 'mut']).agg({
- 'net_charge': 'first',
- 'ESI': 'first',
- 'mut_type': 'first',
- 'functional': 'first',
- 'total energy': ['mean', 'std'],
- 'Electrostatics': ['mean', 'std'],
- 'Solvation Polar': ['mean', 'std'],
- })
- # Flatten the column MultiIndex
- grouped_df.columns = ['_'.join(col).strip() if col[1] != 'first' else col[0] for col in grouped_df.columns] #[col[0] if isinstance(col, tuple) else col for col in grouped_df.columns] or ['_'.join(col).strip() if isinstance(col, tuple) else col for col in grouped_df.columns]
- grouped_df = grouped_df.reset_index()
- grouped_df
- # %%
- grouped_df_homo = grouped_df[grouped_df['mut_type']=='homo']
- grouped_df_homo
- # %% [markdown]
- # ### Homo samples ESI vs ∆phi
- # %%
- # drop mut == 'E241A;E241A' and E241K,E239K,E230K;E241K,E239K,E230K
- grouped_df_homo_reduced = grouped_df_homo[~grouped_df_homo['mut'].isin(['E241A;E241A', 'E241K,E239K,E230K;E241K,E239K,E230K'])]
- # %% [markdown]
- # plot
- # %%
- # ====== USER CONFIGURATION ======
- x_col = 'ESI' # x-axis
- y_base = 'Electrostatics' # or 'Electrostatics' 'total energy', 'Solvation Polar'
- group_col = 'functional' # now using functional: True / False
- font_size = 16
- font_style = 'Arial'
- x_label = 'ESI'
- y_label = '∆∆G' if y_base == 'total energy' else '∆Electrostatics'
- error_capsize = 10
- # =================================
- # Derived columns
- y_col = f'{y_base}_mean'
- y_err = f'{y_base}_std'
- # Color mapping by functional
- colors = {True: '#00A859', False: 'red'}
- # Plot setup
- plt.figure(figsize=(8, 6))
- # Scatter with error bars colored by functional
- for func_value in [True, False]:
- sub_df = grouped_df_homo_reduced[grouped_df_homo_reduced[group_col] == func_value]
- plt.errorbar(
- sub_df[x_col], sub_df[y_col], yerr=sub_df[y_err],
- fmt='o', color=colors[func_value], ecolor=colors[func_value],
- capsize=error_capsize, capthick=2, markersize=10,
- label='Functional' if func_value else 'Non-functional'
- )
- # Linear regression on all data
- x_all = grouped_df_homo_reduced[x_col]
- y_all = grouped_df_homo_reduced[y_col]
- slope, intercept, r_val, p_val, _ = linregress(x_all, y_all)
- # Plot the regression line (optional)
- x_fit = pd.Series(sorted(x_all))
- y_fit = slope * x_fit + intercept
- label_fit = f"Linear fitting"
- #plt.plot(x_fit, y_fit, color='darkgrey', linestyle='-', linewidth=1.5, label=label_fit)
- ax = plt.gca()
- ax.tick_params(labelbottom=False, labelleft=False)
- plt.gca().invert_xaxis()
- plt.ylim(-7, 18) # 8igy
- #plt.ylim(-7, 16) #8xgd
- plt.tight_layout()
- #plt.savefig(f"{pdb}_{y_label}_vs_ESI.svg", format="svg")
- # %% [markdown]
- # Output plot data csv file
- # %%
- if pdb == '8xgd':
- grouped_df_homo_reduced[['label','mut','ESI', 'Electrostatics_mean', 'Electrostatics_std', 'total energy_mean','total energy_std','functional']].to_csv(f"Fig_2E.csv", index=False)
- # %% [markdown]
- # ### Homo samples ESI vs ∆phi Demo version
- # %%
- # ====== USER CONFIGURATION ======
- x_col = 'ESI' # x-axis
- y_base = 'Electrostatics' # or 'Electrostatics' 'total energy', 'Solvation Polar'
- group_col = 'functional' # now using functional: True / False
- font_size = 16
- font_style = 'Arial'
- plot_title = f'{y_base} vs ESI'
- x_label = 'ESI'
- y_label = '∆∆G' if y_base == 'total energy' else '∆Electrostatics' + ' (kcal/mol)'
- error_capsize = 3
- # =================================
- # Derived columns
- y_col = f'{y_base}_mean'
- y_err = f'{y_base}_std'
- # Colors by functional
- colors = {True: '#00A859', False: 'red'}
- # Marker settings for 'functional' True/False
- marker_style = {
- True: {'marker': 'o', 'facecolors': colors[True], 'edgecolors': 'black', 'label': 'Functional'},
- False: {'marker': 'o', 'facecolors': colors[False], 'edgecolors': 'black', 'label': 'Non-functional'}
- }
- # Plot setup
- plt.figure(figsize=(8, 6))
- # Scatter plot with error bars
- for functional_value in [True, False]:
- sub_df = grouped_df_homo_reduced[grouped_df_homo_reduced[group_col] == functional_value]
- x = sub_df[x_col]
- y = sub_df[y_col]
- y_std = sub_df[y_err]
- style = marker_style[functional_value]
- plt.errorbar(x, y, yerr=y_std, fmt=style['marker'],
- markerfacecolor=style['facecolors'], markeredgecolor=style['edgecolors'],
- ecolor=style['facecolors'],
- markersize=6, capsize=error_capsize, linestyle='none',
- label=style['label'])
- # Add label text near each point
- for i, row in sub_df.iterrows():
- plt.text(row[x_col] + 0.2, row[y_col]+1, str(row['mut'].split(';')[0]),
- fontsize=font_size-2, color=style['edgecolors'],
- ha='left', va='center')
- # Linear regression on all data
- x_all = grouped_df_homo_reduced[x_col]
- y_all = grouped_df_homo_reduced[y_col]
- slope, intercept, r_val, p_val, _ = linregress(x_all, y_all)
- # Plot the regression line
- x_fit = pd.Series(sorted(x_all))
- y_fit = slope * x_fit + intercept
- label_fit = f"Linear fitting"
- plt.plot(x_fit, y_fit, color='black', linestyle='-', linewidth=1.5, label=label_fit)
- # Add horizontal line at y=0
- plt.axhline(0, color='grey', linestyle='--', linewidth=1.5, label='y=0')
- # Add stats textbox
- stats_text = f"$R^2$ = {r_val:.3f}\np = {p_val:.1e} ({pval_to_stars(p_val)})"
- plt.text(0.7, 0.15, stats_text,
- transform=plt.gca().transAxes,
- fontsize=font_size,
- verticalalignment='top',
- bbox=dict(boxstyle="round,pad=0.3", facecolor='lightgrey', alpha=0.5))
- # Axis formatting
- plt.xlabel(x_label, fontsize=font_size, fontname=font_style)
- plt.ylabel(y_label, fontsize=font_size, fontname=font_style)
- plt.xticks(fontsize=font_size-1, fontname=font_style)
- plt.yticks(fontsize=font_size-1, fontname=font_style)
- plt.legend(fontsize=font_size-1)
- plt.gca().invert_xaxis()
- plt.tight_layout()
- # %% [markdown]
- # ### ALl samples ESI vs ∆phi excluding E241K-related mutants Demo version
- # %%
- # drop mut that include 'E241K' samples
- grouped_df_reduced = grouped_df[~grouped_df['mut'].str.contains('E241K')]
- # %% [markdown]
- # Plot
- # %%
- # ====== USER CONFIGURATION ======
- x_col = 'ESI' # x-axis
- y_base = 'Electrostatics' # or 'Electrostatics' 'total energy', 'Solvation Polar'
- group_col = 'functional' # now using functional: True / False
- font_size = 16
- font_style = 'Arial'
- plot_title = f'{y_base} vs ESI'
- x_label = 'ESI'
- y_label = '∆∆G' if y_base == 'total energy' else '∆Electrostatics' + ' (kcal/mol)'
- error_capsize = 10
- # =================================
- # Derived columns
- y_col = f'{y_base}_mean'
- y_err = f'{y_base}_std'
- # Colors by functional
- colors = {True: '#00A859', False: 'red'}
- # Marker settings for 'functional' True/False
- marker_style = {
- True: {'marker': 'o', 'facecolors': colors[True], 'edgecolors': 'black', 'label': 'Functional'},
- False: {'marker': 'o', 'facecolors': colors[False], 'edgecolors': 'black', 'label': 'Non-functional'}
- }
- # Plot setup
- plt.figure(figsize=(8, 6))
- # Scatter with error bars colored by functional
- for func_value in [True, False]:
- sub_df = grouped_df_reduced[grouped_df_reduced[group_col] == func_value]
- plt.errorbar(
- sub_df[x_col], sub_df[y_col], yerr=sub_df[y_err],
- fmt='o', color=colors[func_value], ecolor=colors[func_value],
- capsize=error_capsize, capthick=2, markersize=10,
- label='Functional' if func_value else 'Non-functional'
- )
- # Add label text near each point
- for i, row in sub_df.iterrows():
- plt.text(row[x_col] + 0.2, row[y_col]+1, str(row['label']),
- fontsize=font_size-2, color=marker_style[func_value]['edgecolors'],
- ha='left', va='center')
- # Linear regression on all data
- x_all = grouped_df_reduced[x_col]
- y_all = grouped_df_reduced[y_col]
- slope, intercept, r_val, p_val, _ = linregress(x_all, y_all)
- # Plot the regression line
- x_fit = pd.Series(sorted(x_all))
- y_fit = slope * x_fit + intercept
- label_fit = f"Linear fitting"
- plt.plot(x_fit, y_fit, color='darkgrey', linestyle='-', linewidth=2, label=label_fit)
- # Add stats textbox
- stats_text = f"$R$ = {r_val:.3f}\np = {p_val:.1e} ({pval_to_stars(p_val)})"
- plt.text(0.7, 0.15, stats_text,
- transform=plt.gca().transAxes,
- fontsize=font_size,
- verticalalignment='top',
- bbox=dict(boxstyle="round,pad=0.3", facecolor='lightgrey', alpha=0.5))
- # Axis formatting
- plt.xlabel(x_label, fontsize=font_size, fontname=font_style)
- plt.ylabel(y_label, fontsize=font_size, fontname=font_style)
- plt.xticks(fontsize=font_size-1, fontname=font_style)
- plt.yticks(fontsize=font_size-1, fontname=font_style)
- plt.legend(fontsize=font_size-1)
- plt.gca().invert_xaxis()
- plt.tight_layout()
- # %% [markdown]
- # Output plot data csv file
- # %%
- if pdb == '8xgd':
- grouped_df_reduced\
- [['label','mut','ESI', 'Electrostatics_mean', 'Electrostatics_std', 'total energy_mean','total energy_std','functional']].to_csv(f"Fig_4D_and_Fig_S4B.csv", index=False)
- else:
- grouped_df_reduced\
- [['label','mut','ESI', 'Electrostatics_mean', 'Electrostatics_std', 'total energy_mean','total energy_std','functional']].to_csv(f"Fig_S5A_and_Fig_S5B.csv", index=False)
- # %% [markdown]
- # ### ALl samples ESI vs ∆phi excluding E241K-related mutants
- # %%
- # ====== USER CONFIGURATION ======
- x_col = 'ESI' # x-axis
- y_base = 'Electrostatics' # or 'Electrostatics' 'total energy', 'Solvation Polar'
- group_col = 'functional' # now using functional: True / False
- font_size = 16
- font_style = 'Arial'
- plot_title = f'{y_base} vs ESI'
- x_label = 'ESI'
- y_label = '∆∆G' if y_base == 'total energy' else '∆Electrostatics'
- error_capsize = 10
- # =================================
- # Derived columns
- y_col = f'{y_base}_mean'
- y_err = f'{y_base}_std'
- # Colors by functional
- colors = {True: '#00A859', False: 'red'}
- # Marker settings for 'functional' True/False
- marker_style = {
- True: {'marker': 'o', 'facecolors': colors[True], 'edgecolors': 'black', 'label': 'Functional'},
- False: {'marker': 'o', 'facecolors': colors[False], 'edgecolors': 'black', 'label': 'Non-functional'}
- }
- # Plot setup
- plt.figure(figsize=(8, 6))
- # Scatter with error bars colored by functional
- for func_value in [True, False]:
- sub_df = grouped_df_reduced[grouped_df_reduced[group_col] == func_value]
- plt.errorbar(
- sub_df[x_col], sub_df[y_col], yerr=sub_df[y_err],
- fmt='o', color=colors[func_value], ecolor=colors[func_value],
- capsize=error_capsize, capthick=2, markersize=10,
- label='Functional' if func_value else 'Non-functional'
- )
- # Linear regression on all data
- x_all = grouped_df_reduced[x_col]
- y_all = grouped_df_reduced[y_col]
- slope, intercept, r_val, p_val, _ = linregress(x_all, y_all)
- # Plot the regression line
- x_fit = pd.Series(sorted(x_all))
- y_fit = slope * x_fit + intercept
- label_fit = f"Linear fitting"
- plt.plot(x_fit, y_fit, color='darkgrey', linestyle='-', linewidth=2, label=label_fit)
- # Add stats textbox
- stats_text = f"$R^2$ = {r_val:.3f}\np = {p_val:.1e} ({pval_to_stars(p_val)})"
- # Axis formatting
- ax = plt.gca()
- ax.tick_params(labelbottom=False, labelleft=False)
- plt.gca().invert_xaxis()
- #plt.ylim(-7, 16) #8xgd
- plt.ylim(-7, 18) #8iyg
- plt.tight_layout()
- plt.savefig(f"{pdb}_{y_label}_vs_ESI_homo_hetero.svg", format="svg")
- # %% [markdown]
- # ### All samples ESI vs ∆∆G Demo version
- # %%
- # ====== USER CONFIGURATION ======
- x_col = 'ESI' # x-axis
- y_base = 'total energy'
- group_col = 'functional' # now using functional: True / False
- font_size = 16
- font_style = 'Arial'
- plot_title = f'{y_base} vs ESI'
- x_label = 'ESI'
- y_label = '∆∆G' if y_base == 'total energy' else '∆Electrostatics' + ' (kcal/mol)'
- error_capsize = 10
- # =================================
- # Derived columns
- y_col = f'{y_base}_mean'
- y_err = f'{y_base}_std'
- # Colors by functional
- colors = {True: '#00A859', False: 'red'}
- # Marker settings for 'functional' True/False
- marker_style = {
- True: {'marker': 'o', 'facecolors': colors[True], 'edgecolors': 'black', 'label': 'Functional'},
- False: {'marker': 'o', 'facecolors': colors[False], 'edgecolors': 'black', 'label': 'Non-functional'}
- }
- # Plot setup
- plt.figure(figsize=(8, 6))
- # Scatter with error bars colored by functional
- for func_value in [True, False]:
- sub_df = grouped_df_reduced[grouped_df_reduced[group_col] == func_value]
- plt.errorbar(
- sub_df[x_col], sub_df[y_col], yerr=sub_df[y_err],
- fmt='o', color=colors[func_value], ecolor=colors[func_value],
- capsize=error_capsize, capthick=2, markersize=10,
- label='Functional' if func_value else 'Non-functional'
- )
- # Add label text near each point
- for i, row in sub_df.iterrows():
- plt.text(row[x_col] + 0.2, row[y_col]+1, str(row['label']),
- fontsize=font_size-2, color=marker_style[func_value]['edgecolors'],
- ha='left', va='center')
- # Linear regression on all data
- x_all = grouped_df_reduced[x_col]
- y_all = grouped_df_reduced[y_col]
- slope, intercept, r_val, p_val, _ = linregress(x_all, y_all)
- # Plot the regression line
- x_fit = pd.Series(sorted(x_all))
- y_fit = slope * x_fit + intercept
- label_fit = f"Linear fitting"
- plt.plot(x_fit, y_fit, color='darkgrey', linestyle='-', linewidth=2, label=label_fit)
- # Add stats textbox
- stats_text = f"$R$ = {r_val:.3f}\np = {p_val:.1e} ({pval_to_stars(p_val)})"
- plt.text(0.7, 0.15, stats_text,
- transform=plt.gca().transAxes,
- fontsize=font_size,
- verticalalignment='top',
- bbox=dict(boxstyle="round,pad=0.3", facecolor='lightgrey', alpha=0.5))
- # Axis formatting
- plt.xlabel(x_label, fontsize=font_size, fontname=font_style)
- plt.ylabel(y_label, fontsize=font_size, fontname=font_style)
- plt.xticks(fontsize=font_size-1, fontname=font_style)
- plt.yticks(fontsize=font_size-1, fontname=font_style)
- plt.legend(fontsize=font_size-1)
- plt.gca().invert_xaxis()
- plt.ylim(-21, 41)
- plt.tight_layout()
- # %% [markdown]
- # ### All samples ESI vs ∆∆G
- # %%
- # ====== USER CONFIGURATION ======
- x_col = 'ESI' # x-axis
- y_base = 'total energy'
- group_col = 'functional' # now using functional: True / False
- font_style = 'Arial'
- plot_title = f'{y_base} vs ESI'
- x_label = 'ESI'
- y_label = '∆∆G' if y_base == 'total energy' else '∆Electrostatics'
- error_capsize = 10
- # =================================
- # Derived columns
- y_col = f'{y_base}_mean'
- y_err = f'{y_base}_std'
- # Colors by functional
- colors = {True: '#00A859', False: 'red'}
- # Marker settings for 'functional' True/False
- marker_style = {
- True: {'marker': 'o', 'facecolors': colors[True], 'edgecolors': 'black', 'label': 'Functional'},
- False: {'marker': 'o', 'facecolors': colors[False], 'edgecolors': 'black', 'label': 'Non-functional'}
- }
- # Plot setup
- plt.figure(figsize=(8, 6))
- # Scatter with error bars colored by functional
- for func_value in [True, False]:
- sub_df = grouped_df_reduced[grouped_df_reduced[group_col] == func_value]
- plt.errorbar(
- sub_df[x_col], sub_df[y_col], yerr=sub_df[y_err],
- fmt='o', color=colors[func_value], ecolor=colors[func_value],
- capsize=error_capsize, capthick=2, markersize=10,
- label='Functional' if func_value else 'Non-functional'
- )
- # Linear regression on all data
- x_all = grouped_df_reduced[x_col]
- y_all = grouped_df_reduced[y_col]
- slope, intercept, r_val, p_val, _ = linregress(x_all, y_all)
- # Plot the regression line
- x_fit = pd.Series(sorted(x_all))
- y_fit = slope * x_fit + intercept
- label_fit = f"Linear fitting"
- plt.plot(x_fit, y_fit, color='darkgrey', linestyle='-', linewidth=2, label=label_fit)
- # Add stats textbox
- stats_text = f"$R^2$ = {r_val:.3f}\np = {p_val:.1e} ({pval_to_stars(p_val)})"
- # Axis formatting
- ax = plt.gca()
- ax.tick_params(labelbottom=False, labelleft=False)
- plt.gca().invert_xaxis()
- plt.ylim(-21, 41)
- plt.tight_layout()
- plt.savefig(f"{pdb}_{y_label}_vs_ESI.svg", format="svg")
cx36_mut_corr.ipynb at commit faf83f4, no license · at the source
Overview
- Department of Physiology and Pharmacology, University of Western Ontario, London, ON Canada
- Department of Biochemistry and Molecular Biology; Sealy Center for Structural Biology and Molecular Biophysics, University of Texas Medical Branch, Galveston, TX USA
Abstract
Connexin36 (Cx36) is broadly expressed in neurons and serves as the principal protein that forms interneuronal gap junctions (GJs), also known as electrical synapses. Recent high-resolution structures of human Cx36 GJ have revealed crucial electrostatic interactions (ESIs) of charged residues between two docked Cx36 hemichannels at the second extracellular (E2) loops. Despite their structural importance, the mechanistic roles of these ESIs remain poorly understood. To investigate their significance, we systematically designed and tested a series of missense variants targeting key E2 interface residues, aiming to disrupt or modulate the electrostatic landscape at the docking interface. Based on the ESI pairs defined from the crystal structure, our combined computational calculations and dual patch-clamp experiments in engineered HEK293 cell pairs suggest that at least three ESI residual pairs per E2–E2 interface are required to support functional GJ formation. Furthermore, we found that these unique ESIs of Cx36 could play a role in its docking specificity to itself, as they rarely form heterotypic GJs with other brain connexins. Overall, these findings provide essential molecular and functional insights into the mechanisms governing Cx36 GJ formation and partner specificity, paving the way for future therapeutic approaches targeting connexin dysfunction in human diseases.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above, with 6 matches between paragraphs and lines of code.
Zenodo 20303481
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
3 files
- cx36_het_dock.ipynb, Jupyter, 72 lines
- cx36_mut_corr.ipynb, Jupyter, 806 lines, 2 matches
- README.md, Text, 206 lines
zhaolabutmb/Cx36_Channel_Electrostatics
faf83f4505591cf0c499e3533d7ae0991a06646e, 29 May 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
3 files
- cx36_het_dock.ipynb, Jupyter, 72 lines, 2 matches
- cx36_mut_corr.ipynb, Jupyter, 869 lines, 2 matches
- README.md, Text, 206 lines
Code availability
All codes and scripts used for computational calculations and plotting are available at GitHub (https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 4 scripts, each with its path and the digest of its content;
- 6 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data availability
Numerical source data underlying patch clamp, computational data, and percentage of morphological GJ plaque figures are provided in Supplementary Data 1. Raw patch clamp recordings are available upon reasonable request to the corresponding author. Computational data including all the calculated datasets can be accessed through Zenodo at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 2 keywords, 7 MeSH terms, 1 funder, 58 references.
Cite
This paper
Wong, R. S., Song, Z., Zheng, Y. T., Chen, H., Zhao, H., & Bai, D. (2026). Quantifying electrostatic control of docking and binding energetics in functional Cx36 gap junctions. Communications biology, 9(1), 815. https://
BibTeX
@article{wong2026quantif
author = {Wong, Robert S and Song, Zhiyuan and Zheng, Yu T and Chen, Honghong and Zhao, Haiqing and Bai, Donglin},
title = {{Quantifying electrostatic control of docking and binding energetics in functional Cx36 gap junctions}},
journal = {Communications biology},
year = {2026},
month = jun,
volume = {9},
number = {1},
pages = {815},
publisher = {Nature Publishing Group},
issn = {2399-3642},
doi = {10.1038/
url = {https://
pmid = {42277350},
pmcid = {PMC13269782}
}
RIS
TY - JOUR
AU - Wong, Robert S
AU - Song, Zhiyuan
AU - Zheng, Yu T
AU - Chen, Honghong
AU - Zhao, Haiqing
AU - Bai, Donglin
TI - Quantifying electrostatic control of docking and binding energetics in functional Cx36 gap junctions
T2 - Communications biology
J2 - Commun Biol
PY - 2026
DA - 2026/
VL - 9
IS - 1
SP - 815
SN - 2399-3642
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Quantifying electrostatic control of docking and binding energetics in functional Cx36 gap junctions",
"container-title": "Communications biology",
"author": [
{
"family": "Wong",
"given": "Robert S"
},
{
"family": "Song",
"given": "Zhiyuan"
},
{
"family": "Zheng",
"given": "Yu T"
},
{
"family": "Chen",
"given": "Honghong"
},
{
"family": "Zhao",
"given": "Haiqing"
},
{
"family": "Bai",
"given": "Donglin"
}
],
"container-title-short":
"volume": "9",
"issue": "1",
"page": "815",
"DOI": "10.1038/
"PMID": "42277350",
"PMCID": "PMC13269782",
"ISSN": "2399-3642",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
11
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1038/s41586-026-10501-y [code]
- Long-term editing of brain circuits using an engineered electrical synapse.Journal: NatureIn common: seaborn, scikit-learn, pandas, 3 other tools, cellular / molecular, 10 references
- [2] doi:10.1126/sciadv.aeg3223 [code]
- The extreme diversity of retinal amacrine cells has deep evolutionary roots.Journal: Science advancesIn common: seaborn, scikit-learn, pandas, 3 other tools, cellular / molecular, 1 reference
- [3] doi:10.7554/elife.103046 [code]
- Dichotomy between extracellular signatures of active dendritic chemical synapses and gap junctions.Journal: eLifeIn common: Matplotlib, NumPy, cellular / molecular, 3 references
- [4] doi:10.1038/s41467-026-76676-0 [code]
- Determinants of functional burden pleiotropy and gene dosage responses across human traits.Journal: Nature communicationsIn common: seaborn, scikit-learn, pandas, 3 other tools, cellular / molecular, 1 reference
- [5] doi:10.1038/s41467-026-76675-1 [code]
- Long-read proteogenomic atlas of human neuronal differentiation reveals isoform diversity informing neurodevelopmental risk mechanisms.Journal: Nature communicationsIn common: seaborn, scikit-learn, pandas, 3 other tools, 1 reference
- [6] doi:10.3389/fgene.2026.1799530 [code]
- Sex-dependent prediction of autism.Journal: Frontiers in geneticsIn common: seaborn, scikit-learn, pandas, 3 other tools, 1 reference
- [7] doi:10.7554/elife.105935
- Uncovering the electrical synapse proteome in retinal neurons via in vivo proximity labeling.Journal: eLifeIn common: cellular / molecular, 3 references
- [8] doi:10.3389/fnsys.2026.1753562
- When the gatekeeper falls: developmental vulnerability of the thalamic reticular nucleus in neonatal and pediatric hypoxic-ischemic brain injury.Journal: Frontiers in systems neuroscienceIn common: 3 references
- [9] doi:10.1038/s41398-026-04018-1
- Loss of connexin 36 elicits abnormalities in thalamocortical network activity relevant to neuropsychiatric disorders.Journal: Translational psychiatryIn common: 3 references
- [10] doi:10.1016/j.xgen.2026.101280 [code]
- BMI-genome interactions regulate global gene expression with emphasis in brain and gut.Journal: Cell genomicsIn common: scikit-learn, pandas, SciPy, 1 other tool, cellular / molecular, 1 reference
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 2 repositories of the authors' code, each at its verified commit and with its license, 4 scripts, and 6 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:fbcc9717bccbaa59…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
