generated from gchure/reproducible_research
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Big update of material for the appendix
- Loading branch information
Showing
40 changed files
with
22,025 additions
and
21,960 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#%% | ||
import numpy as np | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
import size.viz | ||
cor, pal = size.viz.matplotlib_style() | ||
data = pd.read_csv('../../data/literature/collated_literature_size_data.csv') | ||
fit = pd.read_csv('../../data/mcmc/theory_growth_rate_prediction_summaries.csv') | ||
|
||
fig, ax = plt.subplots(1, 1, figsize=(3,2)) | ||
|
||
inter_colors = {'95%':'pale_', '75%':'light_', '25%':'primary_', 'median':''} | ||
|
||
for g, d in fit[fit['quantity']=='SA_fit'].groupby('interval', sort=False): | ||
ax.fill_between(d['growth_rate_hr'], d['lower'], d['upper'], color=cor[f'{inter_colors[g]}red'], alpha=0.5) | ||
|
||
for g, d in data.groupby('source'): | ||
fmt = size.viz.style_point(g) | ||
ax.plot(d['growth_rate_hr'], d['surface_area_um2'], **fmt) | ||
ax.set_ylim([0, 15]) | ||
ax.legend(fontsize=6, loc='upper left') | ||
ax.set_ylabel('$S_A$ [µm$^2$]\naverage cell surface area', fontsize=6) | ||
ax.set_xlabel('growth rate\n$\lambda$ [hr$^{-1}$]', fontsize=6) | ||
|
||
plt.savefig('../../figures/FigAX_sa_bayes.pdf') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#%% | ||
import numpy as np | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
import size.viz | ||
cor, pal = size.viz.matplotlib_style() | ||
|
||
size_data = pd.read_csv('../../data/literature/collated_literature_size_data.csv') | ||
size_data = size_data[~size_data['source'].isin(['Si et al. 2017', 'Taher-Araghi et al. 2015', 'Basan et al. 2015'])] | ||
wt_data = pd.read_csv('../../data/mcmc/wildtype_posterior_parameter_summaries.csv') | ||
|
||
fig, ax = plt.subplots(1, 2, figsize=(4, 1.5)) | ||
ax[0].set_xlim([0, 2.2]) | ||
ax[0].set_ylim([0.45, 1.2]) | ||
ax[1].set_ylim([1, 5]) | ||
for a in ax: | ||
a.set_xlabel('growth rate\n$\lambda$ [hr$^{-1}$]', fontsize=6) | ||
ax[0].set_ylabel('$w$ [µm]\naverage cell width', fontsize=6) | ||
ax[1].set_ylabel('$\ell$ [µm]\naverage cell length', fontsize=6) | ||
|
||
for g, d in size_data.groupby('source'): | ||
fmt = size.viz.style_point(g) | ||
ax[0].plot(d['growth_rate_hr'], d['width_um'], **fmt) | ||
ax[1].plot(d['growth_rate_hr'], d['length_um'], **fmt) | ||
|
||
|
||
x = 0 | ||
for g, d in wt_data[wt_data['quantity'].isin(['width', 'length', 'growth_rate'])].groupby('carbon_source'): | ||
lam = d[d['quantity']=='growth_rate'] | ||
w = d[d['quantity']=='width'] | ||
l = d[d['quantity']=='length'] | ||
if x == 0: | ||
label = 'This study' | ||
else: | ||
label = '__nolegend__' | ||
for i, p in enumerate([w, l]): | ||
ax[i].vlines(lam['median_value'], p['2.5%'], p['97.5%'], lw=1, color=cor['primary_black'], label='__nolegend__') | ||
ax[i].hlines(p['median_value'], lam['2.5%'], lam['97.5%'], lw=1, color=cor['primary_black'], label='__nolegend__') | ||
ax[i].plot(lam['median_value'], p['median_value'], 'o', ms=5, markeredgecolor=cor['primary_black'], | ||
markeredgewidth=1, markerfacecolor='w', label=label) | ||
x += 1 | ||
ax[1].legend(fontsize=5, bbox_to_anchor=(1,1)) | ||
plt.savefig('../../figures/FigAX_lit_size_comparison.pdf') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#%% | ||
#%% | ||
import numpy as np | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
import size.viz | ||
cor, pal = size.viz.matplotlib_style() | ||
data = pd.read_csv('../../data/literature/collated_mass_fractions_empirics.csv') | ||
data = data[data['localization']=='membrane'] | ||
fit = pd.read_csv('../../data/mcmc/theory_growth_rate_prediction_summaries.csv') | ||
|
||
fig, ax = plt.subplots(1, 1, figsize=(3,2)) | ||
ax.set_ylim([0, 0.2]) | ||
inter_colors = {'95%':'pale_', '75%':'light_', '25%':'primary_', 'median':''} | ||
|
||
|
||
for g, d in fit[fit['quantity']=='phi_mem_pred'].groupby('interval', sort=False): | ||
ax.fill_between(d['growth_rate_hr'], d['lower'], d['upper'], color=cor[f'{inter_colors[g]}red'], alpha=0.5) | ||
for g, d in data.groupby('dataset_name'): | ||
fmt = size.viz.style_point(g) | ||
ax.plot(d['growth_rate_hr'], d['mass_frac'], **fmt) | ||
|
||
ax.legend() | ||
ax.set_ylabel('$\phi_{mem}$ \nmembrane proteome fraction', fontsize=6) | ||
ax.set_xlabel('growth rate\n$\lambda$ [hr$^{-1}$]', fontsize=6) | ||
|
||
plt.savefig('../../figures/FigAX_phi_mem_bayes.pdf') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#%% | ||
import numpy as np | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
import size.viz | ||
cor, pal = size.viz.matplotlib_style() | ||
data = pd.read_csv('../../data/literature/collated_mass_fractions_empirics.csv') | ||
data = data[data['localization']=='periplasm'] | ||
fit = pd.read_csv('../../data/mcmc/theory_growth_rate_prediction_summaries.csv') | ||
|
||
fig, ax = plt.subplots(1, 1, figsize=(3,2)) | ||
|
||
inter_colors = {'95%':'pale_', '75%':'light_', '25%':'primary_', 'median':''} | ||
|
||
for g, d in fit[fit['quantity']=='phi_peri_lam_pred'].groupby('interval', sort=False): | ||
ax.fill_between(d['growth_rate_hr'], d['lower'], d['upper'], color=cor[f'{inter_colors[g]}red'], alpha=0.5) | ||
|
||
for g, d in data.groupby('dataset_name'): | ||
fmt = size.viz.style_point(g) | ||
ax.plot(d['growth_rate_hr'], d['mass_frac'], **fmt) | ||
ax.set_ylim([0, 0.12]) | ||
ax.legend(fontsize=5, loc='upper right') | ||
ax.set_ylabel('$\phi_{peri}$ \nperiplasmic proteome fraction', fontsize=6) | ||
ax.set_xlabel('growth rate\n$\lambda$ [hr$^{-1}$]', fontsize=6) | ||
|
||
plt.savefig('../../figures/FigAX_phi_peri_bayes.pdf') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#%% | ||
import numpy as np | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
import size.viz | ||
cor, pal = size.viz.matplotlib_style() | ||
data = pd.read_csv('../../data/literature/Chure2023/chure2023_collated_mass_fractions.csv') | ||
data = data[(data['source']!='Si et al. 2017') & (data['source']!='Taher-Araghi et al. 2015')] | ||
fit = pd.read_csv('../../data/mcmc/theory_growth_rate_prediction_summaries.csv') | ||
|
||
fig, ax = plt.subplots(1, 1, figsize=(3,2)) | ||
|
||
inter_colors = {'95%':'pale_', '75%':'light_', '25%':'primary_', 'median':''} | ||
|
||
for g, d in fit[fit['quantity']=='phi_Rb_pred'].groupby('interval', sort=False): | ||
ax.fill_between(d['growth_rate_hr'], d['lower'], d['upper'], color=cor[f'{inter_colors[g]}red'], alpha=0.5, zorder=1000) | ||
for g, d in data.groupby('source'): | ||
fmt = size.viz.style_point(g, alpha=0.5) | ||
ax.plot(d['growth_rate_hr'], d['mass_fraction'], **fmt,ms=5) | ||
|
||
ax.legend(fontsize=5, bbox_to_anchor=(1,1)) | ||
ax.set_ylabel('$\phi_{rib}$\nribosomal proteome fraction', fontsize=6) | ||
ax.set_xlabel('growth rate\n$\lambda$ [hr$^{-1}$]', fontsize=6) | ||
|
||
plt.savefig('../../figures/FigAX_phi_rib_bayes.pdf') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#%% | ||
import numpy as np | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
import size.viz | ||
cor, pal = size.viz.matplotlib_style() | ||
data = pd.read_csv('../../data/literature/collated_protein_per_cell.csv') | ||
fit = pd.read_csv('../../data/mcmc/theory_growth_rate_prediction_summaries.csv') | ||
|
||
fig, ax = plt.subplots(1, 1, figsize=(3,2)) | ||
|
||
inter_colors = {'95%':'pale_', '75%':'light_', '25%':'primary_', 'median':''} | ||
|
||
|
||
for g, d in fit[fit['quantity']=='pred_lam_prot'].groupby('interval', sort=False): | ||
ax.fill_between(d['growth_rate_hr'], d['lower'], d['upper'], color=cor[f'{inter_colors[g]}red'], alpha=0.5) | ||
for g, d in data.groupby('source'): | ||
fmt = size.viz.style_point(g) | ||
ax.plot(d['growth_rate_hr'], d['fg_protein_per_cell'], **fmt) | ||
|
||
ax.legend() | ||
ax.set_ylabel('$M_{prot}^{(tot)}$ [fg / cell]\ntotal protein', fontsize=6) | ||
ax.set_xlabel('growth rate\n$\lambda$ [hr$^{-1}$]', fontsize=6) | ||
|
||
plt.savefig('../../figures/FigAX_protein_bayes.pdf') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#%% | ||
import numpy as np | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
import size.viz | ||
cor, pal = size.viz.matplotlib_style() | ||
data = pd.read_csv('../../data/literature/collated_drymass_densities.csv') | ||
fit = pd.read_csv('../../data/mcmc/theory_growth_rate_prediction_summaries.csv') | ||
|
||
fig, ax = plt.subplots(1, 1, figsize=(3,2)) | ||
ax.set_ylim([150, 450]) | ||
|
||
inter_colors = {'95%':'pale_', '75%':'light_', '25%':'primary_', 'median':''} | ||
|
||
for g, d in fit[fit['quantity']=='rho_dry_pred'].groupby('interval', sort=False): | ||
ax.fill_between(d['growth_rate_hr'], d['lower'], d['upper'], color=cor[f'{inter_colors[g]}red'], alpha=0.5, zorder=1000) | ||
|
||
for g, d in data.groupby('source'): | ||
fmt = size.viz.style_point(g) | ||
ax.plot(d['growth_rate_hr'], d['drymass_density_fg_fL'], **fmt) | ||
|
||
ax.legend(fontsize=5, bbox_to_anchor=(1,1)) | ||
ax.set_ylabel(r'$\rho_{dry}$ [fg / fL]'+'\ndrymass density', fontsize=6) | ||
ax.set_xlabel('growth rate\n$\lambda$ [hr$^{-1}$]', fontsize=6) | ||
|
||
plt.savefig('../../figures/FigAX_rho_dry_bayes.pdf') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#%% | ||
import numpy as np | ||
import pandas as pd | ||
import matplotlib.pyplot as plt | ||
import size.viz | ||
cor, pal = size.viz.matplotlib_style() | ||
data = pd.read_csv('../../data/mcmc/mass_spec_empirical_summaries_wide.csv') | ||
fit = pd.read_csv('../../data/mcmc/theory_growth_rate_prediction_summaries.csv') | ||
|
||
fig, ax = plt.subplots(1, 1, figsize=(3,2)) | ||
ax.set_ylim([0, 6]) | ||
inter_colors = {'95%':'pale_', '75%':'light_', '25%':'primary_', 'median':''} | ||
|
||
for g, d in fit[fit['quantity']=='rho_mem_pred'].groupby('interval', sort=False): | ||
ax.fill_between(d['growth_rate_hr'], d['lower'], d['upper'], color=cor[f'{inter_colors[g]}red'], alpha=0.5) | ||
for g, d in data[data['quantity']=='ms_rho_mem'].groupby('source'): | ||
fmt = size.viz.style_point(g, alpha=0.5) | ||
ax.plot(d['growth_rate_hr'], d['median_value'], **fmt,ms=5) | ||
|
||
ax.legend(fontsize=5, bbox_to_anchor=(1,1)) | ||
ax.set_ylabel('$\sigma_{mem}$ [fg / µm$^2$\naverage membrane protein areal density', fontsize=6) | ||
ax.set_xlabel('growth rate\n$\lambda$ [hr$^{-1}$]', fontsize=6) | ||
|
||
plt.savefig('../../figures/FigAX_sigma_mem_bayes.pdf') |
Oops, something went wrong.