Exemplo n.º 1
0
                if np.any(mask[s]):
                    a.set_visible(False)
                else:
                    mask[s] = True
            else:
                mask[s] = True 
#%%  
outliers = ['ORPT_reverse', 'PPKr_reverse', 'GLUTRR', 
                      'PGCD', 'FCLT', 'CPPPGO']

too_low_E = ['FCLT', 'GLUTRR', 'ORPT_reverse']
fig = plt.figure(figsize=(7,7))
ax = plt.axes()
lowerlim=1e-4
upperlim=1e5
y = cu.kmax_per_sec()
y.replace(0, np.nan, inplace=True)
reactions = cu.kcat.dropna().index & y.dropna().index - too_low_E #- outliers
x = cu.kcat[reactions]
y = y[reactions]
ax.scatter(x, y, color='#be9b7b')
ax.plot([lowerlim, upperlim], [lowerlim, upperlim], 'b')
configure_plot(ax, 
               x_label=r"$k_\mathrm{cat}\left[ s^{-1} \right]$",
               y_label=r"$k_\mathrm{max}^{vivo}\left[ s^{-1} \right]$")

labels = pd.DataFrame.from_csv('../data/kcat_data.csv').loc[reactions,'gene name']

add_labels(x,y,labels,ax, fig, hide_overlap=True)
ax.scatter(x[outliers], y[outliers], color='darkred')