```python
import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib import ticker, cm
import numpy as np
import h5py
import pandas as pd
```

```python
f = h5py.File("/Users/glmarschmann/.julia/dev/DEBmicroTrait/files/generic_rate_yield_trade_off.jld", "r")
yield45 = f["yield_45"].value
rate45 = f["rate_45"].value
power45 = rate45*4.2
```

```python
fig_width = 3.0                         # inches
golden_mean = (np.sqrt(5)-1.0)/2.0      # Aesthetic ratio
fig_height = 2.8# height in inches
dpi = 300.0                             # Convert inch to pt

# Margins are specified as a fraction of axes size.
# May need to adjust (especially left and bottom) to accomodate axes labels/tickmarks
leftmargin = 0.15
bottommargin = 0.2
rightmargin = 0.05
topmargin = 0.1
# These two parameters are used for adjusting spacing between subplots (when used)
wspace = 0.2
hspace = 0.2

fig_size =  [fig_width,fig_height]
params = {'backend': 'svg',
          'axes.labelsize': 9,
          'axes.titlesize': 10,
          'legend.fontsize': 9,
          'xtick.labelsize': 9,
          'ytick.labelsize': 9,
          'figure.figsize': fig_size,
          'text.usetex': False,
          'font.family':'sans-serif',
          'font.sans-serif':'Arial',
          'svg.fonttype':'none'}
```

```python
plt.rcParams.update(params)
plt.figure(1)
plt.clf()
plt.axes([leftmargin,
            bottommargin,
            1.0 - rightmargin-leftmargin,
            1.0 - topmargin-bottommargin])
```

```python
plt.plot(yield45, rate45, '-', lw=2, color="k")
plt.axhline(y=max(rate45), linestyle='--',color="k")
#plt.axvline(x=max(yield45), linestyle='--',color="k")
plt.xscale('log',basex=10)
plt.yscale('log',basey=10)
#plt.xlabel(r"$\textnormal{Growth yield}\,\, [\,\textnormal{-}\,]$")
#plt.ylabel(r"$\textnormal{Growth power}\, \mathrm{[\Delta G\, C\textnormal{-} mol^{-1}h^{-1}]}$")
ax = plt.axes()
plt.xlabel("Growth yield []")
plt.ylabel("Growth power []")
#ax.set_xlim([0.25, 0.62])
#ax.set_ylim([5e-6, 1e0])
from matplotlib.ticker import StrMethodFormatter, NullFormatter
ax.xaxis.set_minor_formatter(StrMethodFormatter('{x:.1f}'))
ax.yaxis.set_tick_params(which='minor', bottom=False)
plt.savefig("/Users/glmarschmann/.julia/dev/DEBmicroTrait/plots/generic_power_yield.svg", format='svg')
```

```python
df_fcr = pd.read_csv("/Users/glmarschmann/.julia/dev/DEBmicroTrait/files/isolates_fcr.csv")
#
df_fcr_p = df_fcr.loc[(df_fcr.response == "positive")]
df_fcr_n = df_fcr.loc[(df_fcr.response == "negative")]
df_fcr_u = df_fcr.loc[(df_fcr.response == "undefined")]
```

```python
fig_width = 1.8                         # inches
golden_mean = (np.sqrt(5)-1.0)/2.0      # Aesthetic ratio
fig_height = 2.14      # height in inches
dpi = 300.0                             # Convert inch to pt

# Margins are specified as a fraction of axes size.
# May need to adjust (especially left and bottom) to accomodate axes labels/tickmarks
leftmargin = 0.15
bottommargin = 0.2
rightmargin = 0.05
topmargin = 0.1
# These two parameters are used for adjusting spacing between subplots (when used)
wspace = 0.2
hspace = 0.2

fig_size =  [fig_width,fig_height]
params = {'backend': 'svg',
          'axes.labelsize': 9,
          'axes.titlesize': 10,
          'legend.fontsize': 9,
          'xtick.labelsize': 9,
          'ytick.labelsize': 9,
          'figure.figsize': fig_size,
          'text.usetex': False,
          'font.family':'sans-serif',
          'font.sans-serif':'Arial'}
```

```python
plt.rcParams.update(params)
plt.figure(1)
plt.clf()
plt.axes([leftmargin,
            bottommargin,
            1.0 - rightmargin-leftmargin,
            1.0 - topmargin-bottommargin])
```

```python
plt.scatter(df_fcr_p.Vcell, df_fcr_p.FCR,  s=25, color='#007100', edgecolor='k', marker='^', label="")
plt.scatter(df_fcr_n.Vcell, df_fcr_n.FCR,  s=25, color='#bd5e8b', edgecolor='k', marker='v', label="")
plt.scatter(df_fcr_u.Vcell, df_fcr_u.FCR,  s=25, color='w', edgecolor='k', marker='s', label="Isolates")
ax = plt.gca()
ax = sns.regplot(x="Vcell", y="FCR", data=df_fcr, marker="", line_kws={"color":"k","alpha":1.0,"lw":1.5}, truncate=False)
ax.set_xscale("log")
ax.set_yscale("log")
ax.set_xlim([1e-19, 1e-16])
ax.set_ylim([3e-2, 5e-1])
ax.set_xticks([1e-19, 1e-18, 1e-17, 1e-16])
ax.set_yticks([1e-1])
ax.set_yticklabels(["0.1"])
plt.legend(loc="lower left")
ax.set(xlabel="Cell volume []", ylabel="FCR []")
plt.savefig("/Users/glmarschmann/.julia/dev/DEBmicroTrait/plots/isolates_fcr.svg", format='svg')
```

```python
df_bge = pd.read_csv("/Users/glmarschmann/.julia/dev/DEBmicroTrait/files/isolates_batch_model_BGE.csv")
df_bge = df_bge.dropna()
#
df_bge_p_sugars = df_bge.loc[(df_bge.response == "positive") & (df_bge.ontology == "Sugars")]
df_bge_p_organics = df_bge.loc[(df_bge.response == "positive") & (df_bge.ontology == "Organic acids")]
df_bge_p_aminos = df_bge.loc[(df_bge.response == "positive") & (df_bge.ontology == "Amino acids")]
df_bge_p_fattys = df_bge.loc[(df_bge.response == "positive") & (df_bge.ontology == "Fatty acids")]
df_bge_p_nucleos = df_bge.loc[(df_bge.response == "positive") & (df_bge.ontology == "Nucleotides")]
df_bge_p_auxins = df_bge.loc[(df_bge.response == "positive") & (df_bge.ontology == "Auxins")]
df_bge_n_sugars = df_bge.loc[(df_bge.response == "negative") & (df_bge.ontology == "Sugars")]
df_bge_n_organics = df_bge.loc[(df_bge.response == "negative") & (df_bge.ontology == "Organic acids")]
df_bge_n_aminos = df_bge.loc[(df_bge.response == "negative") & (df_bge.ontology == "Amino acids")]
df_bge_n_fattys = df_bge.loc[(df_bge.response == "negative") & (df_bge.ontology == "Fatty acids")]
df_bge_n_nucleos = df_bge.loc[(df_bge.response == "negative") & (df_bge.ontology == "Nucleotides")]
df_bge_n_auxins = df_bge.loc[(df_bge.response == "negative") & (df_bge.ontology == "Auxins")]
df_bge_u_sugars = df_bge.loc[(df_bge.response == "undefined") & (df_bge.ontology == "Sugars")]
df_bge_u_organics = df_bge.loc[(df_bge.response == "undefined") & (df_bge.ontology == "Organic acids")]
df_bge_u_aminos = df_bge.loc[(df_bge.response == "undefined") & (df_bge.ontology == "Amino acids")]
df_bge_u_fattys = df_bge.loc[(df_bge.response == "undefined") & (df_bge.ontology == "Fatty acids")]
df_bge_u_nucleos = df_bge.loc[(df_bge.response == "undefined") & (df_bge.ontology == "Nucleotides")]
df_bge_u_auxins = df_bge.loc[(df_bge.response == "undefined") & (df_bge.ontology == "Auxins")]
#
bge_grouped = df_bge.groupby(["response", "ontology"]).median()
df_bge_high = bge_grouped[bge_grouped.rgrowth >  0.041]
df_bge_low = bge_grouped[bge_grouped.rgrowth <  0.0407]
```

```python
fig_width = 3.14                         # inches
golden_mean = (np.sqrt(5)-1.0)/2.0      # Aesthetic ratio
fig_height = fig_width*golden_mean      # height in inches
dpi = 300.0
# Margins are specified as a fraction of axes size.
# May need to adjust (especially left and bottom) to accomodate axes labels/tickmarks
leftmargin = 0.15
bottommargin = 0.2
rightmargin = 0.05
topmargin = 0.1
# These two parameters are used for adjusting spacing between subplots (when used)
wspace = 0.2
hspace = 0.2

fig_size =  [fig_width,fig_height]
params = {'backend': 'svg',
          'axes.labelsize': 8,
          'axes.titlesize': 10,
          'legend.fontsize': 6,
          'xtick.labelsize': 8,
          'ytick.labelsize': 8,
          'figure.figsize': fig_size}
```

```python
plt.rcParams.update(params)
plt.figure(1)
plt.clf()
plt.axes([leftmargin,
            bottommargin,
            1.0 - rightmargin-leftmargin,
            1.0 - topmargin-bottommargin])
```

```python
plt.scatter(np.median(df_bge_p_sugars.BGE), np.median(df_bge_p_sugars.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_p_organics.BGE), np.median(df_bge_p_organics.rgrowth), s=60, c='#1b9e77', edgecolor='k',marker='^', label="")
plt.scatter(np.median(df_bge_p_aminos.BGE), np.median(df_bge_p_aminos.rgrowth), s=60, c='#66a61e',edgecolor='k', marker='^',label="")
plt.scatter(np.median(df_bge_p_fattys.BGE), np.median(df_bge_p_fattys.rgrowth), s=60, c='#7570b3',edgecolor='k', marker='^',label="")
plt.scatter(np.median(df_bge_p_nucleos.BGE), np.median(df_bge_p_nucleos.rgrowth), s=60, c='#e7298a',edgecolor='k', marker='^',label="")
plt.scatter(np.median(df_bge_p_auxins.BGE), np.median(df_bge_p_auxins.rgrowth), s=60, c='#e6ab02',edgecolor='k', marker='^',label="")
plt.scatter(np.median(df_bge_n_sugars.BGE), np.median(df_bge_n_sugars.rgrowth), s=60, c='#d95f02',edgecolor='k', marker='v',label="")
plt.scatter(np.median(df_bge_n_organics.BGE), np.median(df_bge_n_organics.rgrowth), s=60, c='#1b9e77',edgecolor='k', marker='v',label="")
plt.scatter(np.median(df_bge_n_aminos.BGE), np.median(df_bge_n_aminos.rgrowth), s=60, c='#66a61e',edgecolor='k', marker='v',label="")
plt.scatter(np.median(df_bge_n_fattys.BGE), np.median(df_bge_n_fattys.rgrowth), s=60, c='#7570b3',edgecolor='k', marker='v',label="")
plt.scatter(np.median(df_bge_n_nucleos.BGE), np.median(df_bge_n_nucleos.rgrowth), s=60, c='#e7298a',edgecolor='k', marker='v',label="")
plt.scatter(np.median(df_bge_n_auxins.BGE), np.median(df_bge_n_auxins.rgrowth), s=60, c='#e6ab02',edgecolor='k', marker='v',label="")
plt.scatter(np.median(df_bge_u_sugars.BGE), np.median(df_bge_u_sugars.rgrowth), s=60, c='#d95f02',edgecolor='k', marker='s', label="Sugars")
plt.scatter(np.median(df_bge_u_organics.BGE), np.median(df_bge_u_organics.rgrowth), s=60, c='#1b9e77',edgecolor='k', marker='s', label="Organic acids")
plt.scatter(np.median(df_bge_u_aminos.BGE), np.median(df_bge_u_aminos.rgrowth), s=60, c='#66a61e',edgecolor='k', marker='s', label="Amino acids")
plt.scatter(np.median(df_bge_u_fattys.BGE), np.median(df_bge_u_fattys.rgrowth), s=60, c='#7570b3',edgecolor='k', marker='s', label="Fatty acids")
plt.scatter(np.median(df_bge_u_nucleos.BGE), np.median(df_bge_u_nucleos.rgrowth), s=60, c='#e7298a',edgecolor='k', marker='s', label="Nucleotides")
plt.scatter(np.median(df_bge_u_auxins.BGE), np.median(df_bge_u_auxins.rgrowth), s=60, c='#e6ab02',edgecolor='k', marker='s', label="Auxins")
plt.legend()

#
ax = plt.gca()
ax = sns.regplot(x="BGE", y="rgrowth", data=df_bge_high, marker="", line_kws={"color":"#a6761d","alpha":1.0,"lw":1.5})
ax = sns.regplot(x="BGE", y="rgrowth", data=df_bge_low, marker="", line_kws={"color":"#666666","alpha":1.0,"lw":1.5})
ax.set_xlim([0.3, 0.6])
ax.set_ylim([0.001, 0.085])
ax.set(ylabel=r'$\textnormal{Growth rate}\, [\mathrm{h^{-1}}]$', xlabel=r'$\textnormal{Carbon use efficiency}\, [\,\textnormal{-}\,]$')
ax.set_yticks([0.005, 0.02, 0.04, 0.06, 0.08])
ax.set_yticklabels(["0.01", "0.02", "0.04", "0.06", "0.08"])
ax.set_xticks([0.3, 0.4, 0.5, 0.6])
ax.set_xticklabels(["0.3", "0.4", "0.5", "0.6"])
from matplotlib.patches import Patch
from matplotlib.lines import Line2D
legend_elements = [
                   Line2D([0], [0], marker='_', color='#d95f02', label='Sugars',
                          markerfacecolor='#d95f02', markersize=6),
                   Line2D([0], [0], marker='_', color='#1b9e77', label='Organic acids',
                          markerfacecolor='#1b9e77', markersize=6),
                   Line2D([0], [0], marker='_', color='#66a61e', label='Amino acids',
                          markerfacecolor='#66a61e', markersize=6),
                   Line2D([0], [0], marker='_', color='#7570b3', label='Fatty acids',
                          markerfacecolor='#7570b3', markersize=6),
                   Line2D([0], [0], marker='_', color='#e7298a', label='Nucleotides',
                          markerfacecolor='#e7298a', markersize=6),
                   Line2D([0], [0], marker='_', color='#e6ab02', label='Auxins',
                          markerfacecolor='#e6ab02', markersize=6),
                   Line2D([0], [0], marker='^', color='w', label='Positive',
                          markerfacecolor='none', mec='k', markersize=6),
                   Line2D([0], [0], marker='v', color='w', label='Negative',
                          markerfacecolor='none', mec='k', markersize=6),
                   Line2D([0], [0], marker='s', color='w', label='Undefined',
                          markerfacecolor='none', mec='k', markersize=6),
]
ax.legend(handles=legend_elements)
plt.savefig("/Users/glmarschmann/.julia/dev/DEBmicroTrait/plots/batch_rate_cue_1.svg", format='svg')
```

```python
df_bge = pd.read_csv("/Users/glmarschmann/.julia/dev/DEBmicroTrait/files/isolates_batch_model_BGE_new.csv")
df_bge = df_bge.dropna()
df_bge['BP'] = df_bge['BP'].apply(lambda x: x*1e9)
df_bge['BR'] = df_bge['BR'].apply(lambda x: x*1e9)
df_bge['BP'] = df_bge['BP'].apply(lambda x: np.log(x))
df_bge['BR'] = df_bge['BR'].apply(lambda x: np.log(x))
#
df_bge_high = df_bge[df_bge.rgrowth >  0.041]
df_bge_low = df_bge[df_bge.rgrowth <  0.0407]
```

```python
df_bge
```

      BGE
      BP
      BR
      rgrowth
      renzyme
      rdreserve
      isolate
      class
      phylum
      response
      genomesize
      monomer
      ontology

      0
      0.591660
      2.065432
      1.085781
      0.059213
      0.000457
      0.081456
      Acidobacteriaceae bacterium URHE0068
      Acidobacteria
      Acidobacteria
      positive
      6679185
      2-aminoisobutyric acid
      Amino acids

      1
      0.380744
      3.463407
      2.824118
      0.127318
      0.000419
      0.136902
      Bacillus sp. URHB0009
      Bacilli
      Firmicutes
      negative
      5377210
      2-aminoisobutyric acid
      Amino acids

      2
      0.475350
      2.747519
      1.994283
      0.097510
      0.000225
      0.100524
      Blastococcus sp. URHD0036
      Actinobacteria
      Actinobacteria
      undefined
      5177578
      2-aminoisobutyric acid
      Amino acids

      3
      0.590325
      2.007878
      1.167279
      0.057814
      0.000085
      0.071506
      Bradyrhizobium sp. URHA0002
      Alphaproteobacteria
      Proteobacteria
      positive
      6972827
      2-aminoisobutyric acid
      Amino acids

      4
      0.590507
      2.063482
      1.209371
      0.060674
      0.000116
      0.072229
      Bradyrhizobium sp. URHA0013
      Alphaproteobacteria
      Proteobacteria
      positive
      7193102
      2-aminoisobutyric acid
      Amino acids

      5
      0.594059
      2.242458
      1.175757
      0.068539
      0.000116
      0.078030
      Bradyrhizobium sp. URHD0069
      Alphaproteobacteria
      Proteobacteria
      positive
      6793945
      2-aminoisobutyric acid
      Amino acids

      6
      0.441952
      2.640955
      2.422173
      0.094282
      0.000169
      0.097704
      Burkholderia sp. URHA0054
      Betaproteobacteria
      Proteobacteria
      positive
      7244804
      2-aminoisobutyric acid
      Amino acids

      7
      0.585579
      2.003536
      1.300741
      0.058165
      0.000421
      0.046366
      Caulobacter sp. URHA0033
      Alphaproteobacteria
      Proteobacteria
      positive
      5642219
      2-aminoisobutyric acid
      Amino acids

      8
      0.467225
      2.510839
      1.744679
      0.077970
      0.000420
      0.076006
      Cellulomonas sp. URHD0024
      Actinobacteria
      Actinobacteria
      undefined
      4210445
      2-aminoisobutyric acid
      Amino acids

      9
      0.523950
      2.184294
      1.303921
      0.063132
      0.000289
      0.063697
      Cellulomonas sp. URHE0023
      Actinobacteria
      Actinobacteria
      undefined
      4467545
      2-aminoisobutyric acid
      Amino acids

      10
      0.521408
      1.820388
      1.122329
      0.046847
      0.000100
      0.066016
      Comamonadaceae bacterium URHA0028
      Betaproteobacteria
      Proteobacteria
      positive
      4904121
      2-aminoisobutyric acid
      Amino acids

      11
      0.587601
      1.828784
      1.034715
      0.049179
      0.000121
      0.060271
      Dongia sp. URHE0060
      Alphaproteobacteria
      Proteobacteria
      positive
      6067264
      2-aminoisobutyric acid
      Amino acids

      12
      0.460151
      2.124181
      1.825397
      0.061232
      0.000440
      0.068010
      Flavobacterium sp. URHB0058
      Flavobacteria
      Bacteroidetes
      undefined
      5264264
      2-aminoisobutyric acid
      Amino acids

      13
      0.455100
      2.580963
      2.073083
      0.087686
      0.000338
      0.092304
      Geodermatophilaceae bacterium URHA0031
      Actinobacteria
      Actinobacteria
      negative
      5236918
      2-aminoisobutyric acid
      Amino acids

      14
      0.486012
      2.403285
      1.664408
      0.075301
      0.000195
      0.084321
      Geodermatophilaceae bacterium URHB0048
      Actinobacteria
      Actinobacteria
      negative
      4705879
      2-aminoisobutyric acid
      Amino acids

      15
      0.457955
      2.753510
      2.061920
      0.094876
      0.000283
      0.091633
      Geodermatophilaceae bacterium URHB0062
      Actinobacteria
      Actinobacteria
      negative
      5093035
      2-aminoisobutyric acid
      Amino acids

      16
      0.514939
      2.968759
      1.841446
      0.113314
      0.000414
      0.098422
      Intrasporangiaceae bacterium URHB0013
      Actinobacteria
      Actinobacteria
      undefined
      4567713
      2-aminoisobutyric acid
      Amino acids

      17
      0.527273
      2.145241
      1.157941
      0.063221
      0.000127
      0.080520
      Lysobacter sp. URHA0019
      Gammaproteobacteria
      Proteobacteria
      undefined
      3223982
      2-aminoisobutyric acid
      Amino acids

      18
      0.588165
      1.987440
      0.768199
      0.052754
      0.000144
      0.048710
      Marmoricola sp. URHB0036
      Actinobacteria
      Actinobacteria
      undefined
      4829548
      2-aminoisobutyric acid
      Amino acids

      19
      0.552718
      2.065015
      1.502691
      0.061662
      0.000149
      0.068997
      Mesorhizobium sp. URHA0056
      Alphaproteobacteria
      Proteobacteria
      positive
      6306952
      2-aminoisobutyric acid
      Amino acids

      20
      0.551454
      1.976170
      1.367017
      0.055992
      0.000156
      0.064959
      Mesorhizobium sp. URHB0007
      Alphaproteobacteria
      Proteobacteria
      positive
      6069513
      2-aminoisobutyric acid
      Amino acids

      21
      0.586961
      1.926301
      1.245585
      0.055593
      0.000146
      0.061168
      Mesorhizobium sp. URHC0008
      Alphaproteobacteria
      Proteobacteria
      positive
      7106298
      2-aminoisobutyric acid
      Amino acids

      22
      0.518012
      3.150013
      1.982026
      0.135039
      0.000417
      0.108641
      Microbacterium sp. URHA0036
      Actinobacteria
      Actinobacteria
      undefined
      4034872
      2-aminoisobutyric acid
      Amino acids

      23
      0.432920
      2.121576
      2.065226
      0.062752
      0.000375
      0.084939
      Micromonosporaceae bacterium URHE0070
      Actinobacteria
      Actinobacteria
      negative
      7372737
      2-aminoisobutyric acid
      Amino acids

      24
      0.455358
      1.822589
      1.865494
      0.052412
      0.000089
      0.067319
      Mycobacterium sp. URHB0044
      Actinobacteria
      Actinobacteria
      positive
      7485871
      2-aminoisobutyric acid
      Amino acids

      25
      0.479228
      2.104116
      1.936418
      0.065297
      0.000090
      0.075205
      Mycobacterium sp. URHD0025
      Actinobacteria
      Actinobacteria
      positive
      6657122
      2-aminoisobutyric acid
      Amino acids

      26
      0.397854
      1.461378
      1.664956
      0.036587
      0.000107
      0.066730
      Nocardioides sp. URHA0020
      Actinobacteria
      Actinobacteria
      undefined
      4684622
      2-aminoisobutyric acid
      Amino acids

      27
      0.525800
      2.131112
      1.285531
      0.061974
      0.000189
      0.074590
      Nocardioides sp. URHA0032
      Actinobacteria
      Actinobacteria
      undefined
      4560838
      2-aminoisobutyric acid
      Amino acids

      28
      0.318096
      2.276770
      2.844998
      0.076363
      0.000764
      0.088136
      Paenibacillus sp. URHA0014
      Bacilli
      Firmicutes
      negative
      7371174
      2-aminoisobutyric acid
      Amino acids

      29
      0.512436
      3.991608
      2.454664
      0.171381
      0.000261
      0.125006
      Pseudomonas sp. URHB0015
      Gammaproteobacteria
      Proteobacteria
      positive
      6208105
      2-aminoisobutyric acid
      Amino acids

      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...

      3206
      0.549010
      0.946762
      0.693966
      0.024743
      0.000133
      0.023387
      Cellulomonas sp. URHD0024
      Actinobacteria
      Actinobacteria
      undefined
      4210445
      linoleic acid
      Fatty acids

      3207
      0.478752
      -1.246794
      -1.142805
      0.005465
      0.000025
      0.005305
      Cellulomonas sp. URHE0023
      Actinobacteria
      Actinobacteria
      undefined
      4467545
      linoleic acid
      Fatty acids

      3208
      0.502482
      -1.128907
      -1.130725
      0.005524
      0.000012
      0.007497
      Comamonadaceae bacterium URHA0028
      Betaproteobacteria
      Proteobacteria
      positive
      4904121
      linoleic acid
      Fatty acids

      3210
      0.482597
      -0.354254
      -0.284605
      0.009096
      0.000065
      0.009778
      Flavobacterium sp. URHB0058
      Flavobacteria
      Bacteroidetes
      undefined
      5264264
      linoleic acid
      Fatty acids

      3211
      0.546631
      1.538291
      1.242648
      0.040693
      0.000157
      0.041641
      Geodermatophilaceae bacterium URHA0031
      Actinobacteria
      Actinobacteria
      negative
      5236918
      linoleic acid
      Fatty acids

      3212
      0.577170
      0.993889
      0.630836
      0.025720
      0.000067
      0.027831
      Geodermatophilaceae bacterium URHB0048
      Actinobacteria
      Actinobacteria
      negative
      4705879
      linoleic acid
      Fatty acids

      3213
      0.533411
      1.116080
      0.918792
      0.028678
      0.000086
      0.026707
      Geodermatophilaceae bacterium URHB0062
      Actinobacteria
      Actinobacteria
      negative
      5093035
      linoleic acid
      Fatty acids

      3214
      0.576772
      0.395918
      0.083295
      0.016342
      0.000060
      0.013451
      Intrasporangiaceae bacterium URHB0013
      Actinobacteria
      Actinobacteria
      undefined
      4567713
      linoleic acid
      Fatty acids

      3215
      0.620559
      0.456699
      -0.045396
      0.016620
      0.000033
      0.020332
      Lysobacter sp. URHA0019
      Gammaproteobacteria
      Proteobacteria
      undefined
      3223982
      linoleic acid
      Fatty acids

      3216
      0.731363
      1.199593
      0.116471
      0.030430
      0.000083
      0.027652
      Marmoricola sp. URHB0036
      Actinobacteria
      Actinobacteria
      undefined
      4829548
      linoleic acid
      Fatty acids

      3217
      0.395641
      -2.029831
      -0.746794
      0.010776
      0.000026
      0.011671
      Mesorhizobium sp. URHA0056
      Alphaproteobacteria
      Proteobacteria
      positive
      6306952
      linoleic acid
      Fatty acids

      3218
      0.545545
      -1.047769
      -1.218534
      0.005867
      0.000016
      0.006590
      Mesorhizobium sp. URHB0007
      Alphaproteobacteria
      Proteobacteria
      positive
      6069513
      linoleic acid
      Fatty acids

      3219
      0.367991
      -2.338657
      -1.175933
      0.008320
      0.000022
      0.008989
      Mesorhizobium sp. URHC0008
      Alphaproteobacteria
      Proteobacteria
      positive
      7106298
      linoleic acid
      Fatty acids

      3220
      0.553940
      0.048867
      -0.167735
      0.012683
      0.000039
      0.009584
      Microbacterium sp. URHA0036
      Actinobacteria
      Actinobacteria
      undefined
      4034872
      linoleic acid
      Fatty acids

      3221
      0.491527
      0.474527
      0.504254
      0.017053
      0.000102
      0.022469
      Micromonosporaceae bacterium URHE0070
      Actinobacteria
      Actinobacteria
      negative
      7372737
      linoleic acid
      Fatty acids

      3222
      0.573434
      1.703097
      1.258785
      0.046090
      0.000078
      0.058942
      Mycobacterium sp. URHB0044
      Actinobacteria
      Actinobacteria
      positive
      7485871
      linoleic acid
      Fatty acids

      3223
      0.601480
      1.917820
      1.356439
      0.056955
      0.000079
      0.065212
      Mycobacterium sp. URHD0025
      Actinobacteria
      Actinobacteria
      positive
      6657122
      linoleic acid
      Fatty acids

      3224
      0.481043
      0.757125
      0.787896
      0.020784
      0.000061
      0.037339
      Nocardioides sp. URHA0020
      Actinobacteria
      Actinobacteria
      undefined
      4684622
      linoleic acid
      Fatty acids

      3225
      0.630252
      0.749867
      0.188143
      0.021058
      0.000064
      0.024513
      Nocardioides sp. URHA0032
      Actinobacteria
      Actinobacteria
      undefined
      4560838
      linoleic acid
      Fatty acids

      3226
      0.171789
      -1.602066
      0.093727
      0.006186
      0.000062
      0.007046
      Paenibacillus sp. URHA0014
      Bacilli
      Firmicutes
      negative
      7371174
      linoleic acid
      Fatty acids

      3227
      0.556944
      1.573024
      1.279309
      0.044785
      0.000068
      0.030938
      Pseudomonas sp. URHB0015
      Gammaproteobacteria
      Proteobacteria
      positive
      6208105
      linoleic acid
      Fatty acids

      3228
      0.478563
      -1.380580
      -1.161755
      0.006124
      0.000011
      0.008742
      Rhodospirillales bacterium URHD0017
      Alphaproteobacteria
      Proteobacteria
      positive
      8179139
      linoleic acid
      Fatty acids

      3229
      0.206241
      -2.520846
      -0.067319
      0.011487
      0.000024
      0.021254
      Rhodospirillales bacterium URHD0088
      Alphaproteobacteria
      Proteobacteria
      undefined
      6646877
      linoleic acid
      Fatty acids

      3230
      0.662916
      -0.378633
      -1.054942
      0.008721
      0.000037
      0.010442
      Solirubrobacter sp. URHD0082
      Thermoleophilia
      Actinobacteria
      negative
      6640086
      linoleic acid
      Fatty acids

      3231
      0.697773
      0.220896
      -0.616514
      0.013836
      0.000046
      0.014069
      Solirubrobacterales bacterium URHD0059
      Thermoleophilia
      Actinobacteria
      negative
      6572728
      linoleic acid
      Fatty acids

      3232
      0.713178
      0.431383
      -0.487065
      0.016264
      0.000066
      0.019770
      Sphingomonas sp. URHD0007
      Alphaproteobacteria
      Proteobacteria
      positive
      2934896
      linoleic acid
      Fatty acids

      3233
      0.716805
      0.515560
      -0.428731
      0.017318
      0.000036
      0.022120
      Sphingomonas sp. URHD0057
      Alphaproteobacteria
      Proteobacteria
      positive
      2785891
      linoleic acid
      Fatty acids

      3234
      0.460247
      1.307089
      1.370322
      0.035134
      0.000062
      0.026912
      Staphylococcus sp. URHA0057
      Bacilli
      Firmicutes
      undefined
      2549675
      linoleic acid
      Fatty acids

      3235
      0.432945
      0.500082
      0.766935
      0.017457
      0.000098
      0.025535
      Streptomyces sp. URHA0041
      Actinobacteria
      Actinobacteria
      positive
      8015544
      linoleic acid
      Fatty acids

      3236
      0.327147
      -1.313032
      -0.550513
      0.005166
      0.000011
      0.011322
      Variovorax sp. URHB0020
      Betaproteobacteria
      Proteobacteria
      positive
      6632341
      linoleic acid
      Fatty acids

2773 rows × 13 columns

```python
df_bge_high_p = df_bge_high.loc[(df_bge_high.response == "positive")]
df_bge_high_n = df_bge_high.loc[(df_bge_high.response == "negative")]
df_bge_high_u = df_bge_high.loc[(df_bge_high.response == "undefined")]
bge_high_grouped_p = df_bge_high_p.groupby(["isolate"]).median()
bge_high_grouped_n = df_bge_high_n.groupby(["isolate"]).median()
bge_high_grouped_u = df_bge_high_u.groupby(["isolate"]).median()
df_bge_low_p = df_bge_low.loc[(df_bge_low.response == "positive")]
df_bge_low_n = df_bge_low.loc[(df_bge_low.response == "negative")]
df_bge_low_u = df_bge_low.loc[(df_bge_low.response == "undefined")]
bge_low_grouped_p = df_bge_low_p.groupby(["isolate"]).median()
bge_low_grouped_n = df_bge_low_n.groupby(["isolate"]).median()
bge_low_grouped_u = df_bge_low_u.groupby(["isolate"]).median()
```

```python
bge_high_iso = bge_high_grouped_p.append([bge_high_grouped_n, bge_high_grouped_u])
bge_low_iso = bge_low_grouped_p.append([bge_low_grouped_n, bge_low_grouped_u])
```

```python
import matplotlib.ticker

class OOMFormatter(matplotlib.ticker.ScalarFormatter):
    def __init__(self, order=0, fformat="%1.1f", offset=True, mathText=True):
        self.oom = order
        self.fformat = fformat
        matplotlib.ticker.ScalarFormatter.__init__(self,useOffset=offset,useMathText=mathText)
    def _set_order_of_magnitude(self):
        self.orderOfMagnitude = self.oom
    def _set_format(self, vmin=None, vmax=None):
        self.format = self.fformat
        if self._useMathText:
            self.format = r'$\mathdefault{%s}$' % self.format

```

```python
plt.rcParams.update(params)
plt.figure(1)
plt.clf()
plt.axes([leftmargin,
            bottommargin,
            1.0 - rightmargin-leftmargin,
            1.0 - topmargin-bottommargin])
```

```python
plt.scatter(bge_high_grouped_p.BR, bge_high_grouped_p.BP, s=bge_high_grouped_p.BGE*50, marker='^', color='#007100', edgecolor='k', label="")
plt.scatter(bge_high_grouped_n.BR, bge_high_grouped_n.BP, s=bge_high_grouped_n.BGE*50, marker='v', color='#bd5e8b', edgecolor='k', label="")
plt.scatter(bge_high_grouped_u.BR, bge_high_grouped_u.BP, s=bge_high_grouped_u.BGE*50, marker='s', color='w', edgecolor='k', label="")
plt.scatter(bge_low_grouped_p.BR, bge_low_grouped_p.BP, s=bge_low_grouped_p.BGE*50, marker='^', color='#007100', edgecolor='k', label="Positive")
plt.scatter(bge_low_grouped_n.BR, bge_low_grouped_n.BP, s=bge_low_grouped_n.BGE*50, marker='v', color='#bd5e8b', edgecolor='k', label="Negative")
plt.scatter(bge_low_grouped_u.BR, bge_low_grouped_u.BP, s=bge_low_grouped_u.BGE*50, marker='s', color='w', edgecolor='k', label="Undefined")
ax = plt.gca()
ax.set_xlim([0.2, 3.5])
ax.set_ylim([0.001, 3.5])
ax.set_yticks([0.1,1,2,3])
ax.set_yticklabels(["1","10", "20", "30"])
ax.set_xticks([0.5,1,2,3])
ax.set_xticklabels(["1","10", "20", "30"])
ax = sns.regplot(x="BR", y="BP", data=bge_high_iso, marker="", line_kws={"color":"#a6761d","alpha":1.0,"lw":1.5}, ci=95, truncate=False)
ax = sns.regplot(x="BR", y="BP", data=bge_low_iso, marker="", line_kws={"color":"#666666","alpha":1.0,"lw":1.5},ci=95, truncate=True)
ax.set(xlabel=r"$\textnormal{Biomass respiration}\, [\mathrm{nmol\, C\, cell^{-1}h^{-1}}]$", ylabel=r"$\textnormal{Biomass production}\, [\mathrm{nmol\, C\, cell^{-1}h^{-1}}]$")
plt.legend(loc="lower right")
plt.savefig("/Users/glmarschmann/.julia/dev/DEBmicroTrait/plots/batch_resp_1.svg", format='svg')
```

```python
np.lo
```

    0.0

```python
df_levin = pd.read_csv("/Users/glmarschmann/.julia/dev/DEBmicroTrait/files/isolates_batch_model_bge_growth_levin.csv")
df_levin_p = df_levin.loc[(df_levin.response == "positive")]
df_levin_n = df_levin.loc[(df_levin.response == "negative")]
df_levin_u = df_levin.loc[(df_levin.response == "undefined")]
```

```python
plt.rcParams.update(params)
plt.figure(1)
plt.clf()
plt.axes([leftmargin,
            bottommargin,
            1.0 - rightmargin-leftmargin,
            1.0 - topmargin-bottommargin])
```

```python
plt.scatter(df_levin_p.levins,df_levin_p.BGE_med, s=df_levin_p.rgrowth_med*800, marker='^', color='w', edgecolor='k', label="Positive")
plt.scatter(df_levin_n.levins, df_levin_n.BGE_med, s=df_levin_n.rgrowth_med*800, marker='v', color='w', edgecolor='k', label="Negative")
plt.scatter(df_levin_u.levins, df_levin_u.BGE_med, s=df_levin_u.rgrowth_med*800, marker='s', color='w', edgecolor='k', label="Undefined")
plt.legend()
ax = plt.gca()
ax = sns.regplot(x="levins", y="BGE_med", data=df_levin, marker="", line_kws={"color":"k","alpha":1.0,"lw":1.5})
ax.set(xlabel="Levins index [-]", ylabel="Carbon use efficieny [-]")
plt.savefig("/Users/glmarschmann/.julia/dev/DEBmicroTrait/plots/batch_levins.svg", format='svg')
```

```python
var = [6,5,4,3,2,1]
rel_inf = [39.47, 18.71, 14.93, 12.18, 10.33, 3.71]
```

```python
fig_height = 3.14                         # inches
golden_mean = (np.sqrt(5)-1.0)/2.0      # Aesthetic ratio
fig_wifth = fig_height*golden_mean      # height in inches
dpi = 300.0                             # Convert inch to pt

# Margins are specified as a fraction of axes size.
# May need to adjust (especially left and bottom) to accomodate axes labels/tickmarks
leftmargin = 0.15
bottommargin = 0.2
rightmargin = 0.05
topmargin = 0.1
# These two parameters are used for adjusting spacing between subplots (when used)
wspace = 0.2
hspace = 0.2

fig_size =  [fig_width,fig_height]
params = {'backend': 'svg',
          'axes.labelsize': 8,
          'axes.titlesize': 10,
          'legend.fontsize': 6,
          'xtick.labelsize': 8,
          'ytick.labelsize': 8,
          'figure.figsize': fig_size}
```

```python
plt.rcParams.update(params)
plt.figure(1)
plt.clf()
plt.axes([leftmargin,
            bottommargin,
            1.0 - rightmargin-leftmargin,
            1.0 - topmargin-bottommargin])
```

```python
plt.scatter(x=rel_inf, y=var, s=40, marker='x', color='k', edgecolor='k')
plt.grid(True)
plt.ylabel("")
plt.xlabel("Mean decrease accuracy")
ax = plt.gca()
ax.invert_xaxis()
plt.savefig("/Users/glmarschmann/.julia/dev/DEBmicroTrait/plots/rf_batch_cue.svg", format='svg')
```

```python
var = [6,5,4,3,2,1]
rel_inf = [45.34, 21.21, 16.43, 7.64, 5.34, 1.72]
```

```python
plt.rcParams.update(params)
plt.figure(1)
plt.clf()
plt.axes([leftmargin,
            bottommargin,
            1.0 - rightmargin-leftmargin,
            1.0 - topmargin-bottommargin])
```

```python
plt.scatter(x=rel_inf, y=var, s=40, marker='x', color='k', edgecolor='k')
plt.grid(True)
plt.ylabel("")
plt.xlabel("Mean decrease accuracy")
ax = plt.gca()
ax.invert_xaxis()
plt.savefig("/Users/glmarschmann/.julia/dev/DEBmicroTrait/plots/rf_batch_growth.svg", format='svg')
```

```python
df = pd.read_csv("/Users/glmarschmann/.julia/dev/DEBmicroTrait/first_manuscript/files_pub/benchmark_protein_synthesis.csv")
df.head()
```

      V_P
      V_R
      gmax
      V_cell
      k_E
      V_cell_model
      V_P_model
      V_R_model
      tRNA_model
      mRNA_model
      V_mtR_model
      k_E_model
      diff

      0
      2.101147e-19
      6.097366e-20
      0.941429
      2.752857e-18
      3.244155
      1.909016e-16
      1.745318e-19
      6.414248e-20
      1.144949e-21
      6.133402e-21
      7.142083e-20
      2.561630
      -0.682525

      1
      3.240876e-19
      8.603352e-20
      0.677500
      4.450000e-18
      2.552137
      3.977441e-16
      2.442745e-19
      6.905343e-20
      1.601941e-21
      8.581470e-21
      7.923684e-20
      2.396636
      -0.155501

      2
      1.003650e-19
      1.536313e-20
      0.333500
      1.950000e-18
      2.178704
      2.431404e-18
      1.371041e-19
      2.378735e-20
      8.987359e-22
      4.814456e-21
      2.950054e-20
      1.922207
      -0.256497

      3
      6.861314e-20
      1.284916e-20
      0.545000
      2.400000e-18
      2.910241
      3.761208e-20
      1.585528e-19
      3.812387e-20
      1.039610e-21
      5.569108e-21
      4.473259e-20
      2.266593
      -0.643648

      4
      9.489051e-20
      1.620112e-20
      0.470000
      2.300000e-18
      2.752806
      3.761208e-20
      1.538989e-19
      3.334090e-20
      1.009001e-21
      5.405136e-21
      3.975503e-20
      2.169482
      -0.583324

```python
plt.rcParams.update(params)
plt.figure(1)
plt.clf()
plt.axes([leftmargin,
            bottommargin,
            1.0 - rightmargin-leftmargin,
            1.0 - topmargin-bottommargin])
```

```python
plt.plot(df["k_E_model"], df["k_E"], 'o', mfc='none', mec='k', ms=5, label="Dethlefsen and Schmidt (2007)")
x = np.linspace(1e-1,1e1,100)
y = x
y1 = np.exp(0.023)*x**1.13
plt.plot(x, y, '--', c='k', label="")
plt.plot(x, y1, '-', c='k', label="")
plt.grid(True)
plt.xscale('log')
plt.yscale('log')
plt.ylabel(r"Translation power $[h^{-1}]$")
plt.xlabel(r"Translation power predicted $[h^{-1}]$")
plt.legend()
plt.savefig("/Users/glmarschmann/.julia/dev/DEBmicroTrait/first_manuscript/plots/benchmark_protein_synthesis.svg", format='svg')
```

```python
from sympy import *
```

```python
kE, yEV, y, kM, yEM = symbols('kE yEV y kM yEM', positive=True)
```

```python
r_plus = -kE*(yEV*y-1) + 2*kE*kM*yEM*y/(kE*(yEV*y-1))
```

```python
drdy = -kE*yEV*(y*yEV-1)**2-2*kM*yEM
```

```python
ymax = (sqrt(2*kM*yEM/(kE*yEV))+1)*1/yEV
```

```python
rmax = symbols('rmax', positive=True)
```

```python
yrmax,b = solve(rmax + (-kE*(yEV*y-1) + 2*kE*kM*yEM*y/(kE*(yEV*y-1))) , y)
```

```python
yrmax.subs([(kM, 0.001),(yEM,1), (kE, 0.1), (yEV, 1.01), (rmax, 0.3)])
```

    0.983620594576853

```python
expr = drdy.subs([(kM, 0.001),(yEM,1), (kE, 0.1), (yEV, 1.01)])
```

```python
integrate(expr,(y,1.0,0.6) )
```

    0.00283879946666668

```python
f = h5py.File("/Users/glmarschmann/.julia/dev/DEBmicroTrait/files/power_yield_tradeoff.jld", "r")
kEval = f["kE"].value
yEVval = f["yEV"].value
rmaxval = f["gmax"].value
kMval = f["kM"].value
```

```python
kMvalmed = np.median(kMval)
kMvalmed = 0.2
```

```python

```

```python
L = np.zeros((len(kEval),len(yEVval)))
for i in range(0,len(kEval)):
    for j in range(0,len(yEVval)):
        y2 = yrmax.subs([(kM, kMvalmed),(yEM,1), (kE, kEval[i]), (yEV, yEVval[j]), (rmax, rmaxval[i])])
        y1 = ymax.subs([(kM, kMvalmed),(yEM,1), (kE, kEval[i]), (yEV, yEVval[j])])
        expr = drdy.subs([(kM, kMvalmed),(yEM,1), (kE, kEval[i]), (yEV, yEVval[j])])
        L[i,j] = integrate(expr,(y,y1,y2) )
```

```python
df_ps = pd.read_csv("/Users/glmarschmann/.julia/dev/DEBmicroTrait/files/isolates_protein_synthesis.csv")
df_ps_p = df_ps.loc[(df_ps.response == "positive")]
df_ps_n = df_ps.loc[(df_ps.response == "negative")]
df_ps_u = df_ps.loc[(df_ps.response == "undefined")]
```

```python
fig_width = 2.14                         # inches
golden_mean = (np.sqrt(5)-1.0)/2.0      # Aesthetic ratio
fig_height = 1.94062672467467     # height in inches
dpi = 300.0                             # Convert inch to pt

# Margins are specified as a fraction of axes size.
# May need to adjust (especially left and bottom) to accomodate axes labels/tickmarks
leftmargin = 0.15
bottommargin = 0.2
rightmargin = 0.05
topmargin = 0.1
# These two parameters are used for adjusting spacing between subplots (when used)
wspace = 0.2
hspace = 0.2

fig_size =  [fig_width,fig_height]
params = {'backend': 'svg',
          'axes.labelsize': 8,
          'axes.titlesize': 10,
          'legend.fontsize': 6,
          'xtick.labelsize': 8,
          'ytick.labelsize': 8,
          'figure.figsize': fig_size}
```

```python
plt.rcParams.update(params)
plt.figure(1)
plt.clf()
plt.axes([leftmargin,
            bottommargin,
            1.0 - rightmargin-leftmargin,
            1.0 - topmargin-bottommargin])
```

```python
from numpy import ma
L = ma.masked_where(L <= 0, L)
from matplotlib import ticker, cm
lev_exp = np.arange(np.floor(np.log10(L.min())),
                    np.ceil(np.log10(L.max())))
levs = [0.005,0.01,0.05, 0.1, 0.15, 0.2, 0.3]
ax = plt.gca()
cs = ax.contourf(kEval, yEVval, L, levs, cmap=cm.Greys)
ax.scatter(df_ps_p.k_E, df_ps_p.y_EV, s=df_ps_p.Vcell*1e18, color='#e41a1c', edgecolor='k',marker='^', label="")
ax.scatter(df_ps_n.k_E, df_ps_n.y_EV, s=df_ps_n.Vcell*1e18, color='#e41a1c', edgecolor='k',marker='v', label="")
ax.scatter(df_ps_u.k_E, df_ps_u.y_EV, s=df_ps_u.Vcell*1e18, color='#e41a1c', edgecolor='k',marker='s', label="Isolates")
ax.set_xlim([0.6, 4])
ax.set_ylim([1.0, 3])
ax.set_xticks([1,2,3,4])
ax.set_xticklabels(["1","2", "3", "4"])
cbar = plt.colorbar(cs)
ax.set(xlabel=r"$k_E [h^{-1}]$", ylabel=r"y_{EV} [-]")
plt.savefig("/Users/glmarschmann/.julia/dev/DEBmicroTrait/plots/protein_synthesis_contour.svg", format='svg')
```

```python
kEiso
```

    array([0.99075779, 2.24772861, 1.69596609, 1.08847819, 1.13266374,
           1.18755672, 1.80188288, 1.66242637, 1.77342271, 1.49693686,
           1.07106695, 1.08847819, 1.5523212 , 1.71324223, 1.49028861,
           1.86501058, 1.86158026, 1.19603821, 1.43095686, 1.28143903,
           1.23271808, 1.2163062 , 2.02109971, 1.37614597, 1.33948686,
           1.44120482, 1.06651747, 1.26213074, 2.1902445 , 2.43160947,
           0.98589388, 0.94506319, 1.08612411, 1.27493784, 1.06425717,
           1.01274099, 2.55341518, 1.39911616, 0.87580869])

```python
plt.scatter(kEiso, yEViso)
```

```python
yEViso
```

    array([1.26877628, 2.27098117, 1.64383562, 1.26877628, 1.26877628,
           1.26877628, 1.76235789, 1.26877628, 1.64383562, 1.4398745 ,
           1.4398745 , 1.26877628, 1.64383562, 1.7043362 , 1.58023989,
           1.7043362 , 1.51268153, 1.4398745 , 1.26877628, 1.35977337,
           1.35977337, 1.26877628, 1.51268153, 1.76235789, 1.64383562,
           1.58023989, 1.87267899, 1.4398745 , 2.41130031, 1.64383562,
           1.26877628, 1.7043362 , 1.26877628, 1.26877628, 1.26877628,
           1.26877628, 1.92559827, 1.97733195, 1.87267899])

```python
kMiso
```

```python
df_low = pd.read_csv("/Users/glmarschmann/.julia/dev/DEBmicroTrait/files/isolates_batch_model_bge_low.csv")
df_high = pd.read_csv("/Users/glmarschmann/.julia/dev/DEBmicroTrait/files/isolates_batch_model_bge_high.csv")
#df_low['yields'] = df_low['yields'].apply(lambda x: np.log(x))
#df_low['rho'] = df_low['rho'].apply(lambda x: np.log(x))
#df_high['yields'] = df_high['yields'].apply(lambda x: np.log(x))
#df_high['rho'] = df_high['rho'].apply(lambda x: np.log(x))
```

```python
np.median(df_high["KD"])
```

    0.0033903609999999997

```python
plt.rcParams.update(params)
plt.figure(1)
plt.clf()
plt.axes([leftmargin,
            bottommargin,
            1.0 - rightmargin-leftmargin,
            1.0 - topmargin-bottommargin])
```

```python
plt.scatter(df_low.yields,df_low.rho,s=12, marker='o', color='w', edgecolor='k')
ax = plt.gca()
#ax.set(yscale='log')
#ax.set(xscale='log')
ax.set_xlim([-1.3, -0.25])
ax.set_ylim([-11, -1])
ax = sns.regplot(x="yields", y="rho", data=df_low, marker="", line_kws={"color":"k","alpha":1.0,"lw":1.5}, order=1)
ax.set(xlabel="Assimilation yield [-]", ylabel="Transporter density [-]")
```

```python
plt.scatter(df_high.yields,df_high.rho,s=12, marker='o', color='w', edgecolor='k')
ax = plt.gca()
#ax.set(yscale='log')
#ax.set(xscale='log')
#ax.set_xlim([-1.3, -0.25])
#ax.set_ylim([-11, -1])
ax = sns.regplot(x="yields", y="rho", data=df_high, marker="", line_kws={"color":"k","alpha":1.0,"lw":1.5}, order=2)
ax.set(xlabel="Assimilation yield [-]", ylabel="Transporter density [-]")
```

```python
df_bge = pd.read_csv("/Users/glmarschmann/.julia/dev/DEBmicroTrait/files/isolates_batch_model_bge_all.csv")
df_bge = df_bge.dropna()
df_bge["yields"] = df_bge['yield']
```

```python
#
df_bge_p_sugars = df_bge.loc[(df_bge.response == "positive") & (df_bge.ontology == "Sugars")]
df_bge_p_organics = df_bge.loc[(df_bge.response == "positive") & (df_bge.ontology == "Organic acids")]
df_bge_p_aminos = df_bge.loc[(df_bge.response == "positive") & (df_bge.ontology == "Amino acids")]
df_bge_p_fattys = df_bge.loc[(df_bge.response == "positive") & (df_bge.ontology == "Fatty acids")]
df_bge_p_nucleos = df_bge.loc[(df_bge.response == "positive") & (df_bge.ontology == "Nucleotides")]
df_bge_p_auxins = df_bge.loc[(df_bge.response == "positive") & (df_bge.ontology == "Auxins")]
df_bge_n_sugars = df_bge.loc[(df_bge.response == "negative") & (df_bge.ontology == "Sugars")]
df_bge_n_organics = df_bge.loc[(df_bge.response == "negative") & (df_bge.ontology == "Organic acids")]
df_bge_n_aminos = df_bge.loc[(df_bge.response == "negative") & (df_bge.ontology == "Amino acids")]
df_bge_n_fattys = df_bge.loc[(df_bge.response == "negative") & (df_bge.ontology == "Fatty acids")]
df_bge_n_nucleos = df_bge.loc[(df_bge.response == "negative") & (df_bge.ontology == "Nucleotides")]
df_bge_n_auxins = df_bge.loc[(df_bge.response == "negative") & (df_bge.ontology == "Auxins")]
df_bge_u_sugars = df_bge.loc[(df_bge.response == "undefined") & (df_bge.ontology == "Sugars")]
df_bge_u_organics = df_bge.loc[(df_bge.response == "undefined") & (df_bge.ontology == "Organic acids")]
df_bge_u_aminos = df_bge.loc[(df_bge.response == "undefined") & (df_bge.ontology == "Amino acids")]
df_bge_u_fattys = df_bge.loc[(df_bge.response == "undefined") & (df_bge.ontology == "Fatty acids")]
df_bge_u_nucleos = df_bge.loc[(df_bge.response == "undefined") & (df_bge.ontology == "Nucleotides")]
df_bge_u_auxins = df_bge.loc[(df_bge.response == "undefined") & (df_bge.ontology == "Auxins")]
#
bge_grouped = df_bge.groupby(["response", "ontology"]).median()
df_bge_high = bge_grouped[bge_grouped.rgrowth >  0.055]
df_bge_low = bge_grouped[bge_grouped.rgrowth <  0.0407]
```

```python
df_bge.loc[df_bge['rgrowth'] >= 0.055, 'growthregime'] = 'high'
df_bge.loc[df_bge['rgrowth'] < 0.0407, 'growthregime'] = 'low'
```

```python
#plt.scatter(np.median(df_bge_p_sugars.rassim), np.median(df_bge_p_sugars.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_sugars.rassim), np.median(df_bge_n_sugars.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_sugars.rassim), np.median(df_bge_u_sugars.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_aminos.rassim), np.median(df_bge_p_aminos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_aminos.rassim), np.median(df_bge_n_aminos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_aminos.rassim), np.median(df_bge_u_aminos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='s', label="")
#plt.scatter(np.median(df_bge_p_fattys.rassim), np.median(df_bge_p_fattys.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_n_fattys.rassim), np.median(df_bge_n_fattys.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_u_fattys.rassim), np.median(df_bge_u_fattys.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_p_organics.rassim), np.median(df_bge_p_organics.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_n_organics.rassim), np.median(df_bge_n_organics.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_u_organics.rassim), np.median(df_bge_u_organics.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_p_nucleos.rassim), np.median(df_bge_p_nucleos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_n_nucleos.rassim), np.median(df_bge_n_nucleos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_u_nucleos.rassim), np.median(df_bge_u_nucleos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_p_auxins.rassim), np.median(df_bge_p_auxins.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_n_auxins.rassim), np.median(df_bge_n_auxins.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_u_auxins.rassim), np.median(df_bge_u_auxins.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
ax = plt.gca()
ax.set_ylim([5e-2, 8e-2])
ax = sns.regplot(x="rassim", y="rgrowth", data=df_bge_high, marker="", line_kws={"color":"#a6761d","alpha":1.0,"lw":1.5})
#ax = sns.regplot(x="rassim", y="rgrowth", data=df_bge_low, marker="", line_kws={"color":"#666666","alpha":1.0,"lw":1.5})
ax.set_xlim([1.2e-3, 1.6e-3])
#ax.set(yscale='log')
#ax.set(xscale='log')
```

```python
#plt.scatter(np.median(df_bge_p_sugars.rassim), np.median(df_bge_p_sugars.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_n_sugars.rassim), np.median(df_bge_n_sugars.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_u_sugars.rassim), np.median(df_bge_u_sugars.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_p_aminos.rassim), np.median(df_bge_p_aminos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_n_aminos.rassim), np.median(df_bge_n_aminos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_u_aminos.rassim), np.median(df_bge_u_aminos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_p_fattys.rassim), np.median(df_bge_p_fattys.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_fattys.rassim), np.median(df_bge_n_fattys.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_fattys.rassim), np.median(df_bge_u_fattys.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_p_organics.rassim), np.median(df_bge_p_organics.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_organics.rassim), np.median(df_bge_n_organics.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_organics.rassim), np.median(df_bge_u_organics.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_p_nucleos.rassim), np.median(df_bge_p_nucleos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_nucleos.rassim), np.median(df_bge_n_nucleos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_nucleos.rassim), np.median(df_bge_u_nucleos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_p_auxins.rassim), np.median(df_bge_p_auxins.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_auxins.rassim), np.median(df_bge_n_auxins.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_auxins.rassim), np.median(df_bge_u_auxins.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
ax = plt.gca()
ax.set_ylim([5e-3, 0.03])
#ax = sns.regplot(x="rassim", y="rgrowth", data=df_bge_high, marker="", line_kws={"color":"#a6761d","alpha":1.0,"lw":1.5})
ax = sns.regplot(x="rassim", y="rgrowth", data=df_bge_low, marker="", line_kws={"color":"#666666","alpha":1.0,"lw":1.5}, order=1)
ax.set_xlim([1e-7, 5e-3])
ax.set(yscale='log')
ax.set(xscale='log')
```

```python
plt.scatter(np.median(df_bge_p_sugars.rassim), np.median(df_bge_p_sugars.Vmax/df_bge_p_sugars.KD), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_sugars.rassim), np.median(df_bge_n_sugars.Vmax/df_bge_n_sugars.KD), s=60, color='#d95f02', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_sugars.rassim), np.median(df_bge_u_sugars.Vmax/df_bge_u_sugars.KD), s=60, color='#d95f02', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_aminos.rassim), np.median(df_bge_p_aminos.Vmax/df_bge_p_aminos.KD), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_aminos.rassim), np.median(df_bge_n_aminos.Vmax/df_bge_n_aminos.KD), s=60, color='#66a61e', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_aminos.rassim), np.median(df_bge_u_aminos.Vmax/df_bge_u_aminos.KD), s=60, color='#66a61e', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_fattys.rassim), np.median(df_bge_p_fattys.Vmax/df_bge_p_fattys.KD), s=60, color='#7570b3', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_fattys.rassim), np.median(df_bge_n_fattys.Vmax/df_bge_n_fattys.KD), s=60, color='#7570b3', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_fattys.rassim), np.median(df_bge_u_fattys.Vmax/df_bge_u_fattys.KD), s=60, color='#7570b3', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_organics.rassim), np.median(df_bge_p_organics.Vmax/df_bge_p_organics.KD), s=60, color='#1b9e77', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_organics.rassim), np.median(df_bge_n_organics.Vmax/df_bge_n_organics.KD), s=60, color='#1b9e77', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_organics.rassim), np.median(df_bge_u_organics.Vmax/df_bge_u_organics.KD), s=60, color='#1b9e77', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_nucleos.rassim), np.median(df_bge_p_nucleos.Vmax/df_bge_p_nucleos.KD), s=60, color='#e7298a', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_nucleos.rassim), np.median(df_bge_n_nucleos.Vmax/df_bge_n_nucleos.KD), s=60, color='#e7298a', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_nucleos.rassim), np.median(df_bge_u_nucleos.Vmax/df_bge_u_nucleos.KD), s=60, color='#e7298a', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_p_auxins.rassim), np.median(df_bge_p_auxins.Vmax/df_bge_p_auxins.KD), s=60, color='#e6ab02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_auxins.rassim), np.median(df_bge_n_auxins.Vmax/df_bge_n_auxins.KD), s=60, color='#e6ab02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_auxins.rassim), np.median(df_bge_u_auxins.Vmax/df_bge_u_auxins.KD), s=60, color='#e6ab02', edgecolor='k', marker='^', label="")
ax = plt.gca()
ax.set_ylim([1e-2, 8e1])
#ax = sns.regplot(x="rassim", y="KD", data=df_bge_high, marker="", line_kws={"color":"#a6761d","alpha":1.0,"lw":1.5})
#ax = sns.regplot(x="rassim", y="rgrowth", data=df_bge_low, marker="", line_kws={"color":"#666666","alpha":1.0,"lw":1.5})
ax.set_xlim([5e-4, 5e-3])
ax.set(yscale='log')
ax.set(xscale='log')
```

```python
plt.scatter(np.median(df_bge_p_sugars.ruptake), np.median(df_bge_p_sugars.Vmax/df_bge_p_sugars.KD), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_sugars.ruptake), np.median(df_bge_n_sugars.Vmax/df_bge_n_sugars.KD), s=60, color='#d95f02', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_sugars.ruptake), np.median(df_bge_u_sugars.Vmax/df_bge_u_sugars.KD), s=60, color='#d95f02', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_aminos.ruptake), np.median(df_bge_p_aminos.Vmax/df_bge_p_aminos.KD), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_aminos.ruptake), np.median(df_bge_n_aminos.Vmax/df_bge_n_aminos.KD), s=60, color='#66a61e', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_aminos.ruptake), np.median(df_bge_u_aminos.Vmax/df_bge_u_aminos.KD), s=60, color='#66a61e', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_fattys.ruptake), np.median(df_bge_p_fattys.Vmax/df_bge_p_fattys.KD), s=60, color='#7570b3', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_fattys.ruptake), np.median(df_bge_n_fattys.Vmax/df_bge_n_fattys.KD), s=60, color='#7570b3', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_fattys.ruptake), np.median(df_bge_u_fattys.Vmax/df_bge_u_fattys.KD), s=60, color='#7570b3', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_organics.ruptake), np.median(df_bge_p_organics.Vmax/df_bge_p_organics.KD), s=60, color='#1b9e77', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_organics.ruptake), np.median(df_bge_n_organics.Vmax/df_bge_n_organics.KD), s=60, color='#1b9e77', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_organics.ruptake), np.median(df_bge_u_organics.Vmax/df_bge_u_organics.KD), s=60, color='#1b9e77', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_nucleos.ruptake), np.median(df_bge_p_nucleos.Vmax/df_bge_p_nucleos.KD), s=60, color='#e7298a', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_nucleos.ruptake), np.median(df_bge_n_nucleos.Vmax/df_bge_n_nucleos.KD), s=60, color='#e7298a', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_nucleos.ruptake), np.median(df_bge_u_nucleos.Vmax/df_bge_u_nucleos.KD), s=60, color='#e7298a', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_p_auxins.ruptake), np.median(df_bge_p_auxins.Vmax/df_bge_p_auxins.KD), s=60, color='#e6ab02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_auxins.ruptake), np.median(df_bge_n_auxins.Vmax/df_bge_n_auxins.KD), s=60, color='#e6ab02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_auxins.ruptake), np.median(df_bge_u_auxins.Vmax/df_bge_u_auxins.KD), s=60, color='#e6ab02', edgecolor='k', marker='^', label="")
ax = plt.gca()
#ax.set_ylim([1e-2, 8e1])
#ax = sns.regplot(x="rassim", y="KD", data=df_bge_high, marker="", line_kws={"color":"#a6761d","alpha":1.0,"lw":1.5})
#ax = sns.regplot(x="rassim", y="rgrowth", data=df_bge_low, marker="", line_kws={"color":"#666666","alpha":1.0,"lw":1.5})
ax.set_xlim([5e-4, 5e-3])
ax.set(yscale='log')
ax.set(xscale='log')
```

```python
plt.scatter(np.median(df_bge_p_sugars.ruptake), np.median(df_bge_p_sugars.BGE), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_sugars.ruptake), np.median(df_bge_n_sugars.BGE), s=60, color='#d95f02', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_sugars.ruptake), np.median(df_bge_u_sugars.BGE), s=60, color='#d95f02', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_aminos.ruptake), np.median(df_bge_p_aminos.BGE), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_aminos.ruptake), np.median(df_bge_n_aminos.BGE), s=60, color='#66a61e', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_aminos.ruptake), np.median(df_bge_u_aminos.BGE), s=60, color='#66a61e', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_fattys.ruptake), np.median(df_bge_p_fattys.BGE), s=60, color='#7570b3', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_fattys.ruptake), np.median(df_bge_n_fattys.BGE), s=60, color='#7570b3', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_fattys.ruptake), np.median(df_bge_u_fattys.BGE), s=60, color='#7570b3', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_organics.ruptake), np.median(df_bge_p_organics.BGE), s=60, color='#1b9e77', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_organics.ruptake), np.median(df_bge_n_organics.BGE), s=60, color='#1b9e77', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_organics.ruptake), np.median(df_bge_u_organics.BGE), s=60, color='#1b9e77', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_nucleos.ruptake), np.median(df_bge_p_nucleos.BGE), s=60, color='#e7298a', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_nucleos.ruptake), np.median(df_bge_n_nucleos.BGE), s=60, color='#e7298a', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_nucleos.ruptake), np.median(df_bge_u_nucleos.BGE), s=60, color='#e7298a', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_p_auxins.ruptake), np.median(df_bge_p_auxins.BGE), s=60, color='#e6ab02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_auxins.ruptake), np.median(df_bge_n_auxins.BGE), s=60, color='#e6ab02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_auxins.ruptake), np.median(df_bge_u_auxins.BGE), s=60, color='#e6ab02', edgecolor='k', marker='^', label="")
ax = plt.gca()
#ax.set_ylim([1e-2, 8e1])
#ax = sns.regplot(x="rassim", y="KD", data=df_bge_high, marker="", line_kws={"color":"#a6761d","alpha":1.0,"lw":1.5})
#ax = sns.regplot(x="rassim", y="rgrowth", data=df_bge_low, marker="", line_kws={"color":"#666666","alpha":1.0,"lw":1.5})
ax.set_xlim([5e-4, 5e-3])
ax.set(yscale='log')
ax.set(xscale='log')
```

```python
plt.scatter(np.median(df_bge_p_sugars.rassim), np.median(df_bge_p_sugars.KD), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_sugars.rassim), np.median(df_bge_n_sugars.KD), s=60, color='#d95f02', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_sugars.rassim), np.median(df_bge_u_sugars.KD), s=60, color='#d95f02', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_aminos.rassim), np.median(df_bge_p_aminos.KD), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_aminos.rassim), np.median(df_bge_n_aminos.KD), s=60, color='#66a61e', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_aminos.rassim), np.median(df_bge_u_aminos.KD), s=60, color='#66a61e', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_fattys.rassim), np.median(df_bge_p_fattys.KD), s=60, color='#7570b3', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_fattys.rassim), np.median(df_bge_n_fattys.KD), s=60, color='#7570b3', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_fattys.rassim), np.median(df_bge_u_fattys.KD), s=60, color='#7570b3', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_organics.rassim), np.median(df_bge_p_organics.KD), s=60, color='#1b9e77', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_organics.rassim), np.median(df_bge_n_organics.KD), s=60, color='#1b9e77', edgecolor='k', marker='v', label="")
plt.scatter(np.median(df_bge_u_organics.rassim), np.median(df_bge_u_organics.KD), s=60, color='#1b9e77', edgecolor='k', marker='s', label="")
plt.scatter(np.median(df_bge_p_nucleos.rassim), np.median(df_bge_p_nucleos.KD), s=60, color='#e7298a', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_nucleos.rassim), np.median(df_bge_n_nucleos.KD), s=60, color='#e7298a', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_nucleos.rassim), np.median(df_bge_u_nucleos.KD), s=60, color='#e7298a', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_p_auxins.rassim), np.median(df_bge_p_auxins.KD), s=60, color='#e6ab02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_auxins.rassim), np.median(df_bge_n_auxins.KD), s=60, color='#e6ab02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_auxins.rassim), np.median(df_bge_u_auxins.KD), s=60, color='#e6ab02', edgecolor='k', marker='^', label="")
ax = plt.gca()
#ax.set_ylim([1e-2, 8e1])
#ax = sns.regplot(x="rassim", y="KD", data=df_bge_high, marker="", line_kws={"color":"#a6761d","alpha":1.0,"lw":1.5})
#ax = sns.regplot(x="rassim", y="rgrowth", data=df_bge_low, marker="", line_kws={"color":"#666666","alpha":1.0,"lw":1.5})
#ax.set_xlim([5e-4, 5e-3])
ax.set(yscale='log')
ax.set(xscale='log')
```

```python

```

```python
plt.scatter(np.median(df_bge_p_sugars.rdreserve), np.median(df_bge_p_sugars.BGE), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_sugars.rdreserve), np.median(df_bge_n_sugars.BGE), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_sugars.rdreserve), np.median(df_bge_u_sugars.BGE), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_p_aminos.rdreserve), np.median(df_bge_p_aminos.BGE), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_aminos.rdreserve), np.median(df_bge_n_aminos.BGE), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_aminos.rdreserve), np.median(df_bge_u_aminos.BGE), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_p_fattys.rdreserve), np.median(df_bge_p_fattys.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_n_fattys.rdreserve), np.median(df_bge_n_fattys.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_u_fattys.rdreserve), np.median(df_bge_u_fattys.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_p_organics.rdreserve), np.median(df_bge_p_organics.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_n_organics.rdreserve), np.median(df_bge_n_organics.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_u_organics.rdreserve), np.median(df_bge_u_organics.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_p_nucleos.rdreserve), np.median(df_bge_p_nucleos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_n_nucleos.rdreserve), np.median(df_bge_n_nucleos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_u_nucleos.rdreserve), np.median(df_bge_u_nucleos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_p_auxins.rdreserve), np.median(df_bge_p_auxins.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_n_auxins.rdreserve), np.median(df_bge_n_auxins.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_u_auxins.rdreserve), np.median(df_bge_u_auxins.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
ax = plt.gca()
#ax.set_ylim([5e-3, 0.03])
#ax = sns.regplot(x="rassim", y="rgrowth", data=df_bge_high, marker="", line_kws={"color":"#a6761d","alpha":1.0,"lw":1.5})
#ax = sns.regplot(x="rdreserve", y="BGE", data=df_bge_high, marker="", line_kws={"color":"#666666","alpha":1.0,"lw":1.5}, order=1)
#ax.set_xlim([1e-7, 5e-3])
ax.set(yscale='log')
ax.set(xscale='log')
```

```python
#plt.scatter(np.median(df_bge_p_sugars.rassim), np.median(df_bge_p_sugars.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_n_sugars.rassim), np.median(df_bge_n_sugars.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_u_sugars.rassim), np.median(df_bge_u_sugars.rgrowth), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_p_aminos.rassim), np.median(df_bge_p_aminos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_n_aminos.rassim), np.median(df_bge_n_aminos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
#plt.scatter(np.median(df_bge_u_aminos.rassim), np.median(df_bge_u_aminos.rgrowth), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_p_fattys.rdreserve), np.median(df_bge_p_fattys.BGE), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_fattys.rdreserve), np.median(df_bge_n_fattys.BGE), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_fattys.rdreserve), np.median(df_bge_u_fattys.BGE), s=60, color='#d95f02', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_p_organics.rdreserve), np.median(df_bge_p_organics.BGE), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_organics.rdreserve), np.median(df_bge_n_organics.BGE), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_organics.rdreserve), np.median(df_bge_u_organics.BGE), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_p_nucleos.rdreserve), np.median(df_bge_p_nucleos.BGE), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_nucleos.rdreserve), np.median(df_bge_n_nucleos.BGE), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_nucleos.rdreserve), np.median(df_bge_u_nucleos.BGE), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_p_auxins.rdreserve), np.median(df_bge_p_auxins.BGE), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_n_auxins.rdreserve), np.median(df_bge_n_auxins.BGE), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
plt.scatter(np.median(df_bge_u_auxins.rdreserve), np.median(df_bge_u_auxins.BGE), s=60, color='#66a61e', edgecolor='k', marker='^', label="")
ax = plt.gca()
#ax.set_ylim([5e-3, 0.03])
#ax = sns.regplot(x="rassim", y="rgrowth", data=df_bge_high, marker="", line_kws={"color":"#a6761d","alpha":1.0,"lw":1.5})
ax = sns.regplot(x="rdreserve", y="BGE", data=df_bge_low, marker="", line_kws={"color":"#666666","alpha":1.0,"lw":1.5}, order=1)
#ax.set_xlim([1e-7, 5e-3])
ax.set(yscale='log')
ax.set(xscale='log')
```

```python
fig_height = 1.95                       # inches
golden_mean = (np.sqrt(5)-1.0)/2.0      # Aesthetic ratio
fig_width = fig_height*golden_mean      # height in inches
dpi = 300.0                             # Convert inch to pt

# Margins are specified as a fraction of axes size.
# May need to adjust (especially left and bottom) to accomodate axes labels/tickmarks
leftmargin = 0.15
bottommargin = 0.2
rightmargin = 0.05
topmargin = 0.1
# These two parameters are used for adjusting spacing between subplots (when used)
wspace = 0.2
hspace = 0.2

fig_size =  [fig_width,fig_height]
params = {'backend': 'svg',
          'axes.labelsize': 8,
          'axes.titlesize': 10,
          'legend.fontsize': 8,
          'xtick.labelsize': 8,
          'ytick.labelsize': 8,
          'figure.figsize': fig_size}
```

```python
plt.rcParams.update(params)
plt.figure(1)
plt.clf()
plt.axes([leftmargin,
            bottommargin,
            1.0 - rightmargin-leftmargin,
            1.0 - topmargin-bottommargin])
```

```python
ax = plt.gca()
#ax = sns.stripplot(x="growthregime", y="Vmax", palette =["#a6761d", '#666666'], data=df_bge, dodge=True, size=3)
ax = sns.boxplot(x="growthregime", y="Vmax", data=df_bge, palette =["#a6761d", '#666666'], showfliers=False)
ax.set(yscale="log")
ax.set(ylabel=r'$\textnormal{Max. specific uptake rate}\, [\mathrm{h^{-1}}]$', xlabel='')
#ax.set_yticks([10,100])
#ax.set_yticklabels(["10","100"])
#ax.set_ylim([-3, 40])
#plt.title("Amino acids")
plt.savefig("/Users/glmarschmann/.julia/dev/DEBmicroTrait/plots/batch_Vmax.svg", format="svg")
```

```python
ax = plt.gca()
#ax = sns.stripplot(x="growthregime", y="Vmax", palette =["#a6761d", '#666666'], data=df_bge, dodge=True, size=3)
ax = sns.boxplot(x="growthregime", y="KD", data=df_bge, palette =["#a6761d", '#666666'], showfliers=False)
ax.set(yscale="log")
ax.set(ylabel=r'$\textnormal{Half-saturation constant}\, [\mathrm{\mu M}]$', xlabel='')
#ax.set_yticks([10,100])
#ax.set_yticklabels(["10","100"])
#ax.set_ylim([-3, 40])
#plt.title("Amino acids")
plt.savefig("/Users/glmarschmann/.julia/dev/DEBmicroTrait/plots/batch_KD.svg", format="svg")
```

```python
ax = plt.gca()
#ax = sns.stripplot(x="growthregime", y="Vmax", palette =["#a6761d", '#666666'], data=df_bge, dodge=True, size=3)
ax = sns.boxplot(x="growthregime", y="rmaint", data=df_bge, palette =["#a6761d", '#666666'], showfliers=False)
ax.set(yscale="log")
ax.set(ylabel=r'$\textnormal{Maintenance fraction}\, [\,\textnormal{-}\,]$', xlabel='')
#ax.set_yticks([10,100])
#ax.set_yticklabels(["10","100"])
#ax.set_ylim([-3, 40])
#plt.title("Amino acids")
plt.savefig("/Users/glmarschmann/.julia/dev/DEBmicroTrait/plots/batch_jM.svg", format="svg")
```

```python
ax = plt.gca()
#ax = sns.stripplot(x="growthregime", y="Vmax", palette =["#a6761d", '#666666'], data=df_bge, dodge=True, size=3)
ax = sns.boxplot(x="growthregime", y="rdreserve", data=df_bge, palette =["#a6761d", '#666666'], showfliers=False)
ax.set(yscale="log")
ax.set(ylabel=r'$\textnormal{Reserve density}\, [\,\mathnormal{-}\,]$', xlabel='')
#ax.set_yticks([10,100])
#ax.set_yticklabels(["10","100"])
#ax.set_ylim([-3, 40])
#plt.title("Amino acids")
plt.savefig("/Users/glmarschmann/.julia/dev/DEBmicroTrait/plots/batch_mE.svg", format="svg")
```

```python
ax = plt.gca()
#ax = sns.stripplot(x="growthregime", y="Vmax", palette =["#a6761d", '#666666'], data=df_bge, dodge=True, size=3)
ax = sns.boxplot(x="growthregime", y="rho", data=df_bge, palette =["#a6761d", '#666666'], showfliers=False)
ax.set(yscale="log")
ax.set(ylabel='Gene copy number normalized [-]', xlabel='')
#ax.set_yticks([10,100])
#ax.set_yticklabels(["10","100"])
#ax.set_ylim([-3, 40])
#plt.title("Amino acids")
#plt.savefig("/Users/glmarschmann/.julia/dev/DEBmicroTrait/plots/isolates_z_aminos.svg", format="svg")
```

```python
from scipy import stats
```

```python
df_bge_high = df_bge.loc[(df_bge.growthregime == "high")]
df_bge_low = df_bge.loc[(df_bge.growthregime == "low")]
```

```python
stats.kruskal(df_bge_high["KD"], df_bge_low["KD"])
```

    KruskalResult(statistic=1608.758650583947, pvalue=0.0)

```python
df_bge_low
```

      BGE
      BP
      BR
      rgrowth
      renzyme
      rmaint
      rassim
      rdreserve
      isolate
      class
      ...
      monomer
      ontology
      rho
      Vmax
      KD
      yield
      kE
      yEV
      aX
      growthregime

      26
      0.397854
      4.311898e-09
      5.285441e-09
      0.036587
      0.000107
      0.000322
      9.057918e-04
      0.066730
      Nocardioides sp. URHA0020
      Actinobacteria
      ...
      2-aminoisobutyric acid
      Amino acids
      0.002058
      0.026981
      0.003817
      0.250000
      1.066517
      1.872679
      0.002924
      low

      34
      0.569965
      2.724649e-09
      1.671878e-09
      0.024697
      0.000101
      0.000057
      1.338361e-03
      0.030265
      Sphingomonas sp. URHD0007
      Alphaproteobacteria
      ...
      2-aminoisobutyric acid
      Amino acids
      0.001045
      0.011795
      0.001701
      0.250000
      1.064257
      1.268776
      0.004073
      low

      35
      0.581052
      4.180042e-09
      1.985085e-09
      0.035936
      0.000074
      0.000027
      1.348910e-03
      0.046774
      Sphingomonas sp. URHD0057
      Alphaproteobacteria
      ...
      2-aminoisobutyric acid
      Amino acids
      0.001565
      0.017718
      0.001956
      0.250000
      1.012741
      1.268776
      0.002056
      low

      38
      0.398918
      4.092622e-09
      5.388464e-09
      0.035526
      0.000075
      0.005231
      8.743106e-04
      0.079536
      Variovorax sp. URHB0020
      Betaproteobacteria
      ...
      2-aminoisobutyric acid
      Amino acids
      0.002416
      0.025917
      0.006716
      0.250000
      0.875809
      1.872679
      0.002103
      low

      41
      0.255921
      1.623215e-10
      5.309174e-10
      0.005186
      0.000012
      0.006616
      1.951685e-07
      0.005067
      Blastococcus sp. URHD0036
      Actinobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000097
      0.001236
      0.001379
      0.164615
      1.695966
      1.643836
      0.002309
      low

      42
      0.629663
      2.291427e-09
      1.322630e-09
      0.022736
      0.000033
      0.037469
      1.550452e-03
      0.027330
      Bradyrhizobium sp. URHA0002
      Alphaproteobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000488
      0.005193
      0.002653
      0.164615
      1.088478
      1.268776
      0.001464
      low

      43
      0.622993
      2.010547e-09
      1.197374e-09
      0.020320
      0.000039
      0.052081
      1.468137e-03
      0.023492
      Bradyrhizobium sp. URHA0013
      Alphaproteobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000437
      0.004634
      0.002567
      0.164615
      1.132664
      1.268776
      0.001904
      low

      44
      0.628954
      2.232295e-09
      1.285241e-09
      0.022143
      0.000037
      0.031964
      1.566766e-03
      0.024316
      Bradyrhizobium sp. URHD0069
      Alphaproteobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000477
      0.005065
      0.002560
      0.164615
      1.187557
      1.268776
      0.001686
      low

      45
      0.440959
      2.288940e-09
      2.878688e-09
      0.023352
      0.000042
      0.017931
      1.115969e-03
      0.023364
      Burkholderia sp. URHA0054
      Betaproteobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000706
      0.007281
      0.003432
      0.164615
      1.801883
      1.762358
      0.001787
      low

      46
      0.639050
      3.382140e-09
      1.809315e-09
      0.031758
      0.000230
      0.005811
      1.808794e-03
      0.024920
      Caulobacter sp. URHA0033
      Alphaproteobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000702
      0.007439
      0.002692
      0.164615
      1.662426
      1.268776
      0.007238
      low

      49
      0.573303
      4.234057e-09
      2.535454e-09
      0.036305
      0.000077
      0.001083
      1.471977e-03
      0.050643
      Comamonadaceae bacterium URHA0028
      Betaproteobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000955
      0.010438
      0.002825
      0.164615
      1.071067
      1.439875
      0.002133
      low

      50
      0.335424
      1.092901e-10
      4.018177e-10
      0.009880
      0.000024
      0.038825
      3.019254e-07
      0.011753
      Dongia sp. URHE0060
      Alphaproteobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000074
      0.000791
      0.001374
      0.164615
      1.088478
      1.268776
      0.002463
      low

      51
      0.499413
      4.636829e-09
      3.897519e-09
      0.039304
      0.000283
      0.001170
      1.400757e-03
      0.043029
      Flavobacterium sp. URHB0058
      Flavobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.001214
      0.012996
      0.003512
      0.164615
      1.552321
      1.643836
      0.007190
      low

      52
      0.441384
      1.437970e-09
      1.814051e-09
      0.015773
      0.000061
      0.002173
      1.175303e-03
      0.015912
      Geodermatophilaceae bacterium URHA0031
      Actinobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000370
      0.004685
      0.001898
      0.164615
      1.713242
      1.704336
      0.003852
      low

      53
      0.390992
      4.106263e-10
      6.402838e-10
      0.006455
      0.000017
      0.002878
      2.157790e-07
      0.006900
      Geodermatophilaceae bacterium URHB0048
      Actinobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000136
      0.001757
      0.001415
      0.164615
      1.490289
      1.580240
      0.002593
      low

      54
      0.445811
      1.652281e-09
      2.041937e-09
      0.017787
      0.000053
      0.001585
      1.220410e-03
      0.016471
      Geodermatophilaceae bacterium URHB0062
      Actinobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000421
      0.005293
      0.001960
      0.164615
      1.865011
      1.704336
      0.002983
      low

      55
      0.512172
      1.846879e-09
      1.740535e-09
      0.019431
      0.000071
      0.000887
      1.479024e-03
      0.016019
      Intrasporangiaceae bacterium URHB0013
      Actinobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000408
      0.005162
      0.001818
      0.164615
      1.861580
      1.512682
      0.003653
      low

      56
      0.553865
      2.190528e-09
      1.660733e-09
      0.021233
      0.000043
      0.000082
      1.465405e-03
      0.026076
      Lysobacter sp. URHA0019
      Gammaproteobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000501
      0.005610
      0.001637
      0.164615
      1.196038
      1.439875
      0.002008
      low

      57
      0.478775
      2.791122e-10
      3.127540e-10
      0.005531
      0.000015
      0.008741
      1.796378e-07
      0.004945
      Marmoricola sp. URHB0036
      Actinobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000089
      0.001146
      0.001346
      0.164615
      1.430957
      1.268776
      0.002733
      low

      58
      0.445747
      3.242244e-10
      4.088685e-10
      0.005706
      0.000014
      0.052256
      5.538169e-07
      0.006186
      Mesorhizobium sp. URHA0056
      Alphaproteobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000124
      0.001323
      0.001513
      0.164615
      1.281439
      1.359773
      0.002409
      low

      59
      0.342893
      1.513219e-10
      5.026859e-10
      0.009399
      0.000026
      0.029820
      3.437082e-07
      0.010562
      Mesorhizobium sp. URHB0007
      Alphaproteobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000089
      0.000949
      0.001410
      0.164615
      1.232718
      1.359773
      0.002790
      low

      61
      0.493533
      1.330583e-09
      1.365455e-09
      0.015202
      0.000047
      0.000457
      3.490125e-06
      0.011501
      Microbacterium sp. URHA0036
      Actinobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000316
      0.003980
      0.001593
      0.164615
      2.021100
      1.512682
      0.003086
      low

      63
      0.417652
      7.628889e-10
      1.063733e-09
      0.009527
      0.000016
      0.052599
      2.009984e-06
      0.012052
      Mycobacterium sp. URHB0044
      Actinobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000221
      0.002765
      0.001934
      0.164615
      1.339487
      1.643836
      0.001697
      low

      64
      0.443487
      7.794380e-10
      9.780849e-10
      0.009728
      0.000013
      0.024664
      1.476381e-06
      0.010854
      Mycobacterium sp. URHD0025
      Actinobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000213
      0.002679
      0.001786
      0.164615
      1.441205
      1.580240
      0.001384
      low

      65
      0.352019
      5.790099e-10
      1.065939e-09
      0.007765
      0.000023
      0.001516
      2.864619e-07
      0.013785
      Nocardioides sp. URHA0020
      Actinobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000192
      0.002517
      0.001502
      0.164615
      1.066517
      1.872679
      0.002924
      low

      67
      0.291580
      1.416887e-09
      3.440646e-09
      0.016279
      0.000163
      0.013745
      7.152720e-04
      0.018385
      Paenibacillus sp. URHA0014
      Bacilli
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000586
      0.006908
      0.003103
      0.164615
      2.190244
      2.411300
      0.010000
      low

      69
      0.627961
      2.876288e-09
      1.622098e-09
      0.027151
      0.000050
      0.096344
      1.505161e-03
      0.036811
      Rhodospirillales bacterium URHD0017
      Alphaproteobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000618
      0.006507
      0.003570
      0.164615
      0.985894
      1.268776
      0.001857
      low

      70
      0.366880
      4.501509e-10
      7.774309e-10
      0.006575
      0.000014
      0.034582
      8.283306e-07
      0.012143
      Rhodospirillales bacterium URHD0088
      Alphaproteobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000183
      0.001963
      0.001704
      0.164615
      0.945063
      1.704336
      0.002098
      low

      73
      0.597349
      9.376176e-10
      6.320155e-10
      0.010983
      0.000045
      0.000129
      2.442670e-07
      0.013285
      Sphingomonas sp. URHD0007
      Alphaproteobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000214
      0.002420
      0.001360
      0.164615
      1.064257
      1.268776
      0.004073
      low

      74
      0.635693
      2.312354e-09
      1.202982e-09
      0.021957
      0.000045
      0.000044
      1.637246e-03
      0.028176
      Sphingomonas sp. URHD0057
      Alphaproteobacteria
      ...
      2,3-Dihydroxybenzoic acid
      Organic acids
      0.000459
      0.005194
      0.001516
      0.164615
      1.012741
      1.268776
      0.002056
      low

      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...
      ...

      3202
      0.663901
      8.060890e-10
      4.080829e-10
      0.009827
      0.000019
      0.102018
      2.454904e-06
      0.011393
      Bradyrhizobium sp. URHA0013
      Alphaproteobacteria
      ...
      linoleic acid
      Fatty acids
      0.000072
      0.000760
      0.001792
      0.055556
      1.132664
      1.268776
      0.001904
      low

      3203
      0.650332
      6.230431e-10
      3.350109e-10
      0.008205
      0.000014
      0.081816
      1.162375e-06
      0.009009
      Bradyrhizobium sp. URHD0069
      Alphaproteobacteria
      ...
      linoleic acid
      Fatty acids
      0.000059
      0.000630
      0.001723
      0.055556
      1.187557
      1.268776
      0.001686
      low

      3204
      0.466284
      1.124995e-09
      1.287474e-09
      0.013091
      0.000023
      0.031542
      1.329738e-03
      0.013102
      Burkholderia sp. URHA0054
      Betaproteobacteria
      ...
      linoleic acid
      Fatty acids
      0.000135
      0.001391
      0.002048
      0.055556
      1.801883
      1.762358
      0.001787
      low

      3206
      0.549010
      2.577352e-09
      2.001638e-09
      0.024743
      0.000133
      0.000301
      1.754417e-03
      0.023387
      Cellulomonas sp. URHD0024
      Actinobacteria
      ...
      linoleic acid
      Fatty acids
      0.000202
      0.002580
      0.001849
      0.055556
      1.773423
      1.643836
      0.005382
      low

      3207
      0.478752
      2.874249e-10
      3.189233e-10
      0.005465
      0.000025
      0.003044
      1.456695e-07
      0.005305
      Cellulomonas sp. URHE0023
      Actinobacteria
      ...
      linoleic acid
      Fatty acids
      0.000035
      0.000457
      0.001575
      0.055556
      1.496937
      1.439875
      0.004571
      low

      3208
      0.502482
      3.233866e-10
      3.227991e-10
      0.005524
      0.000012
      0.007074
      2.394373e-07
      0.007497
      Comamonadaceae bacterium URHA0028
      Betaproteobacteria
      ...
      linoleic acid
      Fatty acids
      0.000043
      0.000468
      0.001602
      0.055556
      1.071067
      1.439875
      0.002133
      low

      3210
      0.482597
      7.016969e-10
      7.523115e-10
      0.009096
      0.000065
      0.005035
      6.611224e-07
      0.009778
      Flavobacterium sp. URHB0058
      Flavobacteria
      ...
      linoleic acid
      Fatty acids
      0.000084
      0.000894
      0.001710
      0.055556
      1.552321
      1.643836
      0.007190
      low

      3211
      0.546631
      4.656626e-09
      3.464775e-09
      0.040693
      0.000157
      0.000843
      1.798672e-03
      0.041641
      Geodermatophilaceae bacterium URHA0031
      Actinobacteria
      ...
      linoleic acid
      Fatty acids
      0.000366
      0.004633
      0.002381
      0.055556
      1.713242
      1.704336
      0.003852
      low

      3212
      0.577170
      2.701720e-09
      1.879180e-09
      0.025720
      0.000067
      0.000724
      1.783969e-03
      0.027831
      Geodermatophilaceae bacterium URHB0048
      Actinobacteria
      ...
      linoleic acid
      Fatty acids
      0.000199
      0.002569
      0.001910
      0.055556
      1.490289
      1.580240
      0.002593
      low

      3213
      0.533411
      3.052863e-09
      2.506261e-09
      0.028678
      0.000086
      0.000983
      1.809986e-03
      0.026707
      Geodermatophilaceae bacterium URHB0062
      Actinobacteria
      ...
      linoleic acid
      Fatty acids
      0.000249
      0.003121
      0.002076
      0.055556
      1.865011
      1.704336
      0.002983
      low

      3214
      0.576772
      1.485747e-09
      1.086863e-09
      0.016342
      0.000060
      0.001054
      1.809650e-03
      0.013451
      Intrasporangiaceae bacterium URHB0013
      Actinobacteria
      ...
      linoleic acid
      Fatty acids
      0.000117
      0.001480
      0.001734
      0.055556
      1.861580
      1.512682
      0.003653
      low

      3215
      0.620559
      1.578853e-09
      9.556193e-10
      0.016620
      0.000033
      0.000105
      1.854612e-03
      0.020332
      Lysobacter sp. URHA0019
      Gammaproteobacteria
      ...
      linoleic acid
      Fatty acids
      0.000129
      0.001447
      0.001652
      0.055556
      1.196038
      1.439875
      0.002008
      low

      3216
      0.731363
      3.318765e-09
      1.123525e-09
      0.030430
      0.000083
      0.001597
      2.268311e-03
      0.027652
      Marmoricola sp. URHB0036
      Actinobacteria
      ...
      linoleic acid
      Fatty acids
      0.000193
      0.002496
      0.001914
      0.055556
      1.430957
      1.268776
      0.002733
      low

      3217
      0.395641
      1.313577e-10
      4.738834e-10
      0.010776
      0.000026
      0.035804
      3.759141e-07
      0.011671
      Mesorhizobium sp. URHA0056
      Alphaproteobacteria
      ...
      linoleic acid
      Fatty acids
      0.000030
      0.000315
      0.001604
      0.055556
      1.281439
      1.359773
      0.002409
      low

      3218
      0.545545
      3.507192e-10
      2.956634e-10
      0.005867
      0.000016
      0.038675
      5.070498e-07
      0.006590
      Mesorhizobium sp. URHB0007
      Alphaproteobacteria
      ...
      linoleic acid
      Fatty acids
      0.000044
      0.000471
      0.001642
      0.055556
      1.232718
      1.359773
      0.002790
      low

      3219
      0.367991
      9.645712e-11
      3.085309e-10
      0.008320
      0.000022
      0.109365
      5.190566e-07
      0.008989
      Mesorhizobium sp. URHC0008
      Alphaproteobacteria
      ...
      linoleic acid
      Fatty acids
      0.000026
      0.000278
      0.001611
      0.055556
      1.216306
      1.268776
      0.002628
      low

      3220
      0.553940
      1.050080e-09
      8.455777e-10
      0.012683
      0.000039
      0.000548
      1.135118e-06
      0.009584
      Microbacterium sp. URHA0036
      Actinobacteria
      ...
      linoleic acid
      Fatty acids
      0.000091
      0.001141
      0.001652
      0.055556
      2.021100
      1.512682
      0.003086
      low

      3221
      0.491527
      1.607254e-09
      1.655750e-09
      0.017053
      0.000102
      0.022790
      1.364533e-03
      0.022469
      Micromonosporaceae bacterium URHE0070
      Actinobacteria
      ...
      linoleic acid
      Fatty acids
      0.000146
      0.001830
      0.002109
      0.055556
      1.376146
      1.762358
      0.005978
      low

      3224
      0.481043
      2.132138e-09
      2.198766e-09
      0.020784
      0.000061
      0.000567
      1.379642e-03
      0.037339
      Nocardioides sp. URHA0020
      Actinobacteria
      ...
      linoleic acid
      Fatty acids
      0.000187
      0.002453
      0.001883
      0.055556
      1.066517
      1.872679
      0.002924
      low

      3225
      0.630252
      2.116718e-09
      1.207006e-09
      0.021058
      0.000064
      0.000915
      1.843310e-03
      0.024513
      Nocardioides sp. URHA0032
      Actinobacteria
      ...
      linoleic acid
      Fatty acids
      0.000144
      0.001875
      0.001784
      0.055556
      1.262131
      1.439875
      0.003058
      low

      3226
      0.171789
      2.014798e-10
      1.098260e-09
      0.006186
      0.000062
      0.035810
      8.733655e-07
      0.007046
      Paenibacillus sp. URHA0014
      Bacilli
      ...
      linoleic acid
      Fatty acids
      0.000067
      0.000792
      0.001785
      0.055556
      2.190244
      2.411300
      0.010000
      low

      3228
      0.478563
      2.514328e-10
      3.129364e-10
      0.006124
      0.000011
      0.325349
      1.206421e-06
      0.008742
      Rhodospirillales bacterium URHD0017
      Alphaproteobacteria
      ...
      linoleic acid
      Fatty acids
      0.000039
      0.000407
      0.001696
      0.055556
      0.985894
      1.268776
      0.001857
      low

      3229
      0.206241
      8.039153e-11
      9.348973e-10
      0.011487
      0.000024
      0.025803
      3.882273e-07
      0.021254
      Rhodospirillales bacterium URHD0088
      Alphaproteobacteria
      ...
      linoleic acid
      Fatty acids
      0.000032
      0.000338
      0.001619
      0.055556
      0.945063
      1.704336
      0.002098
      low

      3230
      0.662916
      6.847967e-10
      3.482128e-10
      0.008721
      0.000037
      0.055542
      1.056175e-06
      0.010442
      Solirubrobacter sp. URHD0082
      Thermoleophilia
      ...
      linoleic acid
      Fatty acids
      0.000052
      0.000668
      0.001691
      0.055556
      1.086124
      1.268776
      0.004200
      low

      3231
      0.697773
      1.247194e-09
      5.398231e-10
      0.013836
      0.000046
      0.033447
      1.957340e-03
      0.014069
      Solirubrobacterales bacterium URHD0059
      Thermoleophilia
      ...
      linoleic acid
      Fatty acids
      0.000083
      0.001057
      0.001794
      0.055556
      1.274938
      1.268776
      0.003334
      low

      3232
      0.713178
      1.539385e-09
      6.144272e-10
      0.016264
      0.000066
      0.000087
      2.107393e-03
      0.019770
      Sphingomonas sp. URHD0007
      Alphaproteobacteria
      ...
      linoleic acid
      Fatty acids
      0.000111
      0.001249
      0.001615
      0.055556
      1.064257
      1.268776
      0.004073
      low

      3233
      0.716805
      1.674577e-09
      6.513354e-10
      0.017318
      0.000036
      0.000056
      2.099264e-03
      0.022120
      Sphingomonas sp. URHD0057
      Alphaproteobacteria
      ...
      linoleic acid
      Fatty acids
      0.000118
      0.001340
      0.001613
      0.055556
      1.012741
      1.268776
      0.002056
      low

      3234
      0.460247
      3.695400e-09
      3.936617e-09
      0.035134
      0.000062
      0.000004
      2.657348e-03
      0.026912
      Staphylococcus sp. URHA0057
      Bacilli
      ...
      linoleic acid
      Fatty acids
      0.000380
      0.004434
      0.001798
      0.055556
      2.553415
      1.925598
      0.001758
      low

      3235
      0.432945
      1.648857e-09
      2.153156e-09
      0.017457
      0.000098
      0.032109
      1.063721e-03
      0.025535
      Streptomyces sp. URHA0041
      Actinobacteria
      ...
      linoleic acid
      Fatty acids
      0.000170
      0.002112
      0.002306
      0.055556
      1.399116
      1.977332
      0.005623
      low

      3236
      0.327147
      2.690032e-10
      5.766538e-10
      0.005166
      0.000011
      0.034887
      6.012740e-07
      0.011322
      Variovorax sp. URHB0020
      Betaproteobacteria
      ...
      linoleic acid
      Fatty acids
      0.000052
      0.000557
      0.001689
      0.055556
      0.875809
      1.872679
      0.002103
      low

1334 rows × 23 columns

```python

```