MATE1 Inhibition: Total Safety Compliance Dashboard

DrugBank database
MolPort database
Python script number 32 to build the frequency distribution graph of the MATE1_inhibitor parameter on DrugBank molecules.
import matplotlib.pyplot as plt
from matplotlib.patches import Patch
import numpy as np
from scipy.interpolate import make_interp_spline

# 1. MATE1 Inhibitor Data
bin_centers = [0.02, 0.04, 0.06, 0.08, 0.10, 0.12, 0.14, 0.16, 0.18, 0.20, 
               0.22, 0.24, 0.26, 0.28, 0.30, 0.32, 0.34, 0.36, 0.38, 0.40, 
               0.42, 0.44, 0.46, 0.48]

frequencies = [4.81, 14.56, 16.30, 13.15, 11.08, 8.94, 7.52, 5.22, 3.96, 2.91, 
               2.71, 2.02, 2.06, 1.42, 1.42, 0.65, 0.44, 0.36, 0.16, 0.12, 
               0.0, 0.08, 0.0, 0.08]

# 2. Smoothing
x_smooth = np.linspace(min(bin_centers), max(bin_centers), 300)
spl = make_interp_spline(bin_centers, frequencies, k=3)
y_smooth = spl(x_smooth)
y_smooth = [val if val > 0 else 0 for val in y_smooth] 

# 3. Colors (Everything is green/safe)
colors = []
for val in bin_centers:
    colors.append('mediumseagreen')

# 4. Create the chart
plt.figure(figsize=(7, 6))

# Bars
plt.bar(bin_centers, frequencies, width=0.015, color=colors, edgecolor='black', alpha=0.8, label='Data Frequency')

# 5. Tags and Titles
plt.xlabel('Probability of MATE1 Inhibition (Threshold usually 0.5)', fontsize=12)
plt.ylabel('% Frequency', fontsize=12)
plt.title('MATE1 Inhibition: Total Safety Compliance', fontsize=14)

# Axle settings
plt.xticks(np.arange(0.0, 0.6, 0.05))
plt.xlim(0.0, 0.55)
plt.ylim(0, 18)

# 6. Legend
legend_elements = [
    Patch(facecolor='mediumseagreen', edgecolor='black', label='Safe Zone (Non-Inhibitor)'),
]

plt.legend(handles=legend_elements, loc='upper right', framealpha=0.95)

plt.grid(axis='y', linestyle='--', alpha=0.5)
plt.tight_layout()

plt.show()