{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"run_control": {
"marked": true
}
},
"source": [
"# Effect of NO3 – limitation on the C4 mode\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"run_control": {
"marked": true
}
},
"source": [
"## 0. Initialization"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:23.083291Z",
"start_time": "2019-05-06T16:02:20.834577+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"//anaconda/lib/python2.7/site-packages/cryptography/hazmat/primitives/constant_time.py:26 \u001b[1;31mCryptographyDeprecationWarning\u001b[0m: Support for your Python version is deprecated. The next version of cryptography will remove support. Please upgrade to a 2.7.x release that supports hmac.compare_digest as soon as possible.\n"
]
},
{
"data": {
"text/html": [
" \n",
" "
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"#Import sys\n",
"import sys \n",
"sys.path.append(\"../src/\") \n",
"\n",
"#Import init for initialisation & loading user-defined functions\n",
"from init_fba import *\n",
"\n",
"#Initialize notebook settings\n",
"theNotebook = '2019-05-06-mb-genC4-N-Limitation-Effect'\n",
"init_notebook(theNotebook)\n",
"\n",
"#load sbml model\n",
"c3_model = load_sbml_model()"
]
},
{
"cell_type": "markdown",
"metadata": {
"run_control": {
"marked": true
}
},
"source": [
"## 1. C3 Model"
]
},
{
"cell_type": "markdown",
"metadata": {
"ExecuteTime": {
"end_time": "2017-06-20T12:42:07.597174",
"start_time": "2017-06-20T12:42:07.594879"
},
"run_control": {
"marked": true
}
},
"source": [
"### 1.1 Constraints"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:23.105744Z",
"start_time": "2019-05-06T16:02:23.084684+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [],
"source": [
"#CONSTRAINT: Set flux of all export reaction to zero\n",
"for r_obj in c3_model.reactions:\n",
" r_id = r_obj.id\n",
" if r_id[0:2] == \"Ex\":\n",
" r_obj.bounds = (0.,0.)\n",
"\n",
"#CONSTRAINT: Divergent fluxes of export and import reactions\n",
"set_bounds('Im_CO2', (-inf, inf), c3_model)\n",
"set_bounds('Im_H2O', (-inf, inf), c3_model)\n",
"set_bounds('Im_H2S', (0.,0.), c3_model)\n",
"set_bounds('Im_NH4', (0., 0.), c3_model)\n",
"set_bounds('Im_NO3', (0., inf), c3_model)\n",
"set_bounds('Im_Pi', (0., inf), c3_model)\n",
"set_bounds('Im_SO4', (0., inf), c3_model)\n",
"set_bounds('Ex_O2', (-inf, inf), c3_model)\n",
"set_bounds('Ex_Suc', (0., inf), c3_model)\n",
"set_bounds('Ex_starch', (0., inf), c3_model)\n",
"set_bounds('Ex_AA', (0., inf), c3_model)\n",
"\n",
"#CONSTRAINT: \n",
"set_bounds('G6PDH_h', (0.,0.), c3_model)\n",
"set_bounds('PPIF6PK_c', (0,0.), c3_model)\n",
"\n",
"#CONSTRAINT: max. photon consumption auf C4 plants 1000 μE\n",
"set_bounds('Im_hnu', (0, 1000), c3_model)\n",
"\n",
"#CONSTRAINT: CO2 uptake rate in C4 plants is higher, about 40 μmol/(m2*s)\n",
"f_CO2 = 40 #[μmol/(m2*s)] \n",
"set_bounds('Im_CO2', (0, f_CO2), c3_model)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:23.112463Z",
"start_time": "2019-05-06T16:02:23.107319+02:00"
},
"code_folding": [],
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [],
"source": [
"#CONSTRAINT: Maintenace cost\n",
"\n",
"atp_cost_L3_m = 0.009111187245501572 #Mitochondria-L3-ATP Cost [µmol*s-1*m-2]\n",
"atp_cost_L3_h = 0.15270708327974447 #Chloroplast-L3-ATP Cost [µmol*s-1*m-2]\n",
"atp_cost_L3_p = 0.0076669066992201855 #Peroxisome-L3-ATP Cost [µmol*s-1*m-2]\n",
"atp_cost_L3_c = 0.042683072918274702 #Cytosl/Other-L3-ATP Cost [µmol*s-1*m-2]\n",
"\n",
"set_fixed_flux('NGAM_c',atp_cost_L3_c + atp_cost_L3_p, c3_model)\n",
"set_fixed_flux('NGAM_m',atp_cost_L3_m, c3_model)\n",
"set_fixed_flux('NGAM_h',atp_cost_L3_h, c3_model)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:23.117641Z",
"start_time": "2019-05-06T16:02:23.114018+02:00"
},
"collapsed": true,
"run_control": {
"marked": true
}
},
"outputs": [],
"source": [
"#CONSTRAINT: fluxes through the chloroplastic NADPH dehydrogenase and plastoquinol oxidase were set to zero \n",
"#because the contributions of NADPH dehydrogenase (Yamamoto et al., 2011) and plastoquinol oxidase \n",
"#(Josse et al., 2000) to photosynthesis are thought to be minor.\n",
"set_bounds('AOX4_h',(0,0), c3_model)\n",
"set_bounds('iCitDHNADP_h',(0,0), c3_model)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:23.121690Z",
"start_time": "2019-05-06T16:02:23.119253+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [],
"source": [
"#CONSTRAINT: NTT is only active at night\n",
"set_fixed_flux('Tr_NTT',0, c3_model)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:23.126994Z",
"start_time": "2019-05-06T16:02:23.123819+02:00"
},
"collapsed": true,
"run_control": {
"marked": true
}
},
"outputs": [],
"source": [
"#CONSTRAINT: No uncoupled pyruvate transport\n",
"set_bounds('Tr_Pyr1',(0,0), c3_model)\n",
"set_bounds('Tr_Pyr2',(0,0), c3_model)"
]
},
{
"cell_type": "markdown",
"metadata": {
"run_control": {
"marked": true
}
},
"source": [
"## 2. C4 Model"
]
},
{
"cell_type": "markdown",
"metadata": {
"run_control": {
"marked": true
}
},
"source": [
"### 2.1 Compose Model"
]
},
{
"cell_type": "markdown",
"metadata": {
"ExecuteTime": {
"end_time": "2018-02-06T17:46:39.521620+01:00",
"start_time": "2018-02-06T17:46:39.518672"
},
"run_control": {
"marked": true
}
},
"source": [
"#### 2.1.1 Two copies of genC3 model and exchange reactions"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:24.047498Z",
"start_time": "2019-05-06T16:02:23.128954+02:00"
},
"collapsed": false,
"hide_input": false,
"run_control": {
"marked": true
}
},
"outputs": [],
"source": [
"c4_model = cobra.Model('c4_model')\n",
"\n",
"cell_types = ['M', 'B']\n",
"\n",
"#duplicate metabolites\n",
"for m in c3_model.metabolites:\n",
" for cell in cell_types:\n",
" m_dt = cobra.Metabolite('['+cell+']_'+m.id, name = m.formula, compartment = m.compartment)\n",
" c4_model.add_metabolites([m_dt])\n",
"\n",
"#duplicate reactions\n",
"for r_c3_obj in c3_model.reactions:\n",
" for cell in cell_types:\n",
" r_c4_obj = cobra.Reaction('['+cell+']_'+r_c3_obj.id)\n",
" r_c4_obj.name = r_c3_obj.name\n",
" r_c4_obj.subsystem = r_c3_obj.subsystem\n",
" r_c4_obj.bounds = r_c3_obj.bounds\n",
" c4_model.add_reaction(r_c4_obj)\n",
" r_c4_obj.add_metabolites({'['+cell+']_'+m_c3_obj.id: r_c3_obj.get_coefficient(m_c3_obj) for m_c3_obj in r_c3_obj.metabolites})\n",
" \n",
" \n",
"#metabolites excluded from M/BS exchange\n",
"no_transport = ['NO3','NO2', 'O2','Na', 'H2S', 'SO4',\n",
" 'H2O','FBP','F26BP','DPGA','H','ACD','AC','M_DASH_THF', '5M_DASH_THF', 'H_DASH_Cys', 'aH_DASH_Cys', 'ORO', 'DHO',\n",
" 'GABA','A_DASH_Ser','PRPP','AD','THF','DHF','ADN','Mas','CoA','GluP',\n",
" 'A_DASH_CoA','cellulose1','cellulose2','cellulose3','starch1',\n",
" 'starch2','starch3','TRXox','TRXrd','Glu_DASH_SeA','T6P','aMet',\n",
" 'PPi', 'P5C', 'NH4', 'Pi', 'CO2', 'OAA','HCO3', \n",
" 'UTP', 'UDP', 'UDPG', 'ATP', 'ADP', 'AMP', 'IMP', 'XMP', \n",
" 'GTP', 'GDP', 'GMP', 'OMP', 'UMP', 'CTP', 'GDP', 'CDP', 'dADP', \n",
" 'dCDP', 'dGDP', 'dUDP', 'dUTP', 'dUMP', 'dTMP', 'dTDP', 'GTP', \n",
" 'dATP', 'dCTP', 'dGTP', 'dTTP', 'NAD', 'NADH', 'NADP', 'NADPH']\n",
"\n",
"#add M/BS exchange reactions\n",
"L_r_transport = []\n",
"for m_c3_obj in c3_model.metabolites:\n",
" if m_c3_obj.id[-1:] == 'c' and m_c3_obj.id[:-2] not in no_transport:\n",
" r_c4_obj = cobra.Reaction('[MB]_'+m_c3_obj.id)\n",
" r_c4_obj.name = '[MB]_'+m_c3_obj.id\n",
" r_c4_obj.subsystem = 'Exchange'\n",
" r_c4_obj.bounds = (-inf, inf)\n",
" c4_model.add_reaction(r_c4_obj)\n",
" r_c4_obj.add_metabolites({'[M]_'+m_c3_obj.id: -1,'[B]_'+m_c3_obj.id: 1 })\n",
" L_r_transport.append('[MB]_'+m_c3_obj.id)"
]
},
{
"cell_type": "markdown",
"metadata": {
"ExecuteTime": {
"end_time": "2018-02-06T17:47:11.482156+01:00",
"start_time": "2018-02-06T17:47:11.480023"
},
"run_control": {
"marked": true
}
},
"source": [
"#### 2.1.2 Adaptations for second unconstrained rubisco population in the bundle sheath"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:24.067613Z",
"start_time": "2019-05-06T16:02:24.049004+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [],
"source": [
"#CONSTRAINT: Add external CO2 species in bundle sheat\n",
"#(the original CO2 species is treated as internal CO2)\n",
"m_list_CO_Ex= ['[B]_CO2_ex_c','[B]_CO2_ex_h','[B]_CO2_ex_m']\n",
"\n",
"for m_id in m_list_CO_Ex:\n",
" m_obj = cobra.Metabolite(m_id)\n",
" c4_model.add_metabolites(m_obj)\n",
"\n",
"#CONSTRAINT: Copy all reactions using internal CO2 and exchange internal with external CO2 in the copied recactions\n",
"r_list_CO_Ex = ['Tr_CO2h', 'RBC_h']\n",
"\n",
"for r_id in r_list_CO_Ex:\n",
" r_obj = c4_model.reactions.get_by_id('[B]_'+r_id)\n",
" r_obj_Ex = cobra.Reaction(r_obj.id+'_Ex')\n",
" r_obj_Ex.name = r_obj.id+'_Ex'\n",
" r_obj_Ex.subsystem = r_obj.subsystem\n",
" r_obj_Ex.bounds = r_obj.bounds\n",
" c4_model.add_reaction(r_obj_Ex)\n",
" r_obj_Ex.add_metabolites({m_obj.id if not m_obj.id[:-2] == '[B]_CO2' else '[B]_CO2_ex'+m_obj.id[-2:]: r_obj.get_coefficient(m_obj) \n",
" for m_obj in r_obj.metabolites})\n",
"\n",
"#CONSTRAINT: CO2 exchange between mesophyll and bundle sheat\n",
"r_c4_obj = cobra.Reaction('[MB]_CO2_c')\n",
"r_c4_obj.name = '[MB]_CO2_c'\n",
"r_c4_obj.subsystem = 'Exchange'\n",
"r_c4_obj.bounds = (-inf, inf)\n",
"c4_model.add_reaction(r_c4_obj)\n",
"r_c4_obj.add_metabolites({'[M]_CO2_c': -1,'[B]_CO2_ex_c': 1 })\n",
"L_r_transport.append('[MB]_CO2_c')"
]
},
{
"cell_type": "markdown",
"metadata": {
"run_control": {
"marked": true
}
},
"source": [
"### 2.3 Constraints"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:24.072139Z",
"start_time": "2019-05-06T16:02:24.069905+02:00"
},
"collapsed": true,
"run_control": {
"marked": true
}
},
"outputs": [],
"source": [
"#CONSTRAINT: No CO2 uptake in bundle sheat cells due to suberin layer in cell membranes\n",
"set_fixed_flux('[B]_Im_CO2',0, c4_model)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:24.095736Z",
"start_time": "2019-05-06T16:02:24.073743+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [
{
"data": {
"text/plain": [
""
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#CONSTRAINT: Output of sucrose : total amino acid and sucrose : starch\n",
"set_fixed_flux_ratio({'[B]_Ex_Suc':2.2,'[B]_Ex_AA':1.0}, c4_model)\n",
"set_fixed_flux_ratio({'[B]_Ex_Suc':1.0,'[B]_Ex_starch':1.0}, c4_model)\n",
"\n",
"set_fixed_flux_ratio({'[M]_Ex_Suc':2.2,'[M]_Ex_AA':1.0}, c4_model)\n",
"set_fixed_flux_ratio({'[M]_Ex_Suc':1.0,'[M]_Ex_starch':1.0}, c4_model)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:24.107366Z",
"start_time": "2019-05-06T16:02:24.097486+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [],
"source": [
"#Reaction variables for light uptake\n",
"B_Im_hnu = c4_model.reactions.get_by_id(\"[B]_Im_hnu\")\n",
"M_Im_hnu = c4_model.reactions.get_by_id(\"[M]_Im_hnu\")\n",
"\n",
"#CONSTRAINT: Total Photon uptake limited to 1000 µE\n",
"const_hnu_sum = c4_model.problem.Constraint( B_Im_hnu.flux_expression + M_Im_hnu.flux_expression,\n",
" lb = 0, ub = 1000)\n",
"\n",
"c4_model.add_cons_vars(const_hnu_sum)\n",
"\n",
"#CONSTRAINT: Total Photon uptake by bundle sheath must be less equal than in mesophyll\n",
"const_hnu_ratio = c4_model.problem.Constraint( M_Im_hnu.flux_expression - B_Im_hnu.flux_expression,\n",
" lb = 0, ub = 1000)\n",
"\n",
"c4_model.add_cons_vars(const_hnu_ratio)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:24.120519Z",
"start_time": "2019-05-06T16:02:24.109399+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [
{
"data": {
"text/plain": [
""
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#CONSTRAINT: oxygenation : carboxylation = 1 : 3\n",
"set_fixed_flux_ratio({'[B]_RBC_h_Ex':3,'[B]_RBO_h':1}, c4_model)\n",
"set_fixed_flux_ratio({'[M]_RBC_h':3,'[M]_RBO_h':1}, c4_model)"
]
},
{
"cell_type": "markdown",
"metadata": {
"run_control": {
"marked": true
}
},
"source": [
"## 3 FBA"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:34.549383Z",
"start_time": "2019-05-06T16:02:24.121921+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"//anaconda/lib/python2.7/site-packages/cobra/util/solver.py:419: UserWarning:\n",
"\n",
"solver status is 'infeasible'\n",
"\n"
]
}
],
"source": [
"#Dictionary defining the experiments according to the N-limitation\n",
"D_exp = {value: '%s' %value for value in np.arange(0,2.1,0.2)}\n",
"\n",
"#Reaction Variables\n",
"B_Ex_Suc = c4_model.reactions.get_by_id(\"[B]_Ex_Suc\")\n",
"B_RBO = c4_model.reactions.get_by_id(\"[B]_RBO_h\")\n",
"M_RBO = c4_model.reactions.get_by_id(\"[M]_RBO_h\")\n",
"M_Im_NO3 = c4_model.reactions.get_by_id(\"[M]_Im_NO3\")\n",
"B_Im_NO3 = c4_model.reactions.get_by_id(\"[B]_Im_NO3\")\n",
"\n",
"#Set FBA solver\n",
"c4_model.solver = \"glpk\"\n",
"\n",
"#Initialize dictionary to store results\n",
"D_fba={}\n",
"\n",
"#Run every FBA experiment\n",
"\n",
"for value in sorted(D_exp.keys()): #iterate over proportions of carboxylation\n",
" \n",
" #Add N-limitation constraint \n",
" const_NO3 = c4_model.problem.Constraint( M_Im_NO3.flux_expression + B_Im_NO3.flux_expression,\n",
" lb = value, ub = value)\n",
" c4_model.add_cons_vars(const_NO3)\n",
" \n",
" #Optimize/Maximize sucrose output\n",
" B_Ex_Suc.objective_coefficient = 1.\n",
" c4_model_copy = c4_model.copy()\n",
" result_fba = c4_model_copy.optimize('maximize')\n",
" del c4_model_copy\n",
" c4_model.objective =[]\n",
" set_fixed_flux(B_Ex_Suc.id,result_fba.fluxes[B_Ex_Suc.id], c4_model)\n",
" \n",
" #Optimize/Minimize oxygenation rate by rubisco (set True)\n",
" if True:\n",
" B_RBO.objective_coefficient = 1.\n",
" M_RBO.objective_coefficient = 1.\n",
" c4_model_copy = c4_model.copy()\n",
" result_fba = c4_model_copy.optimize('minimize')\n",
" del c4_model_copy\n",
" c4_model.objective =[]\n",
" set_fixed_flux(B_RBO.id,result_fba.fluxes[B_RBO.id],c4_model) \n",
" set_fixed_flux(M_RBO.id,result_fba.fluxes[M_RBO.id],c4_model)\n",
" \n",
" \n",
" #Optimize/Minimize total flux\n",
" if result_fba.status == 'optimal': \n",
" c4_model_copy = c4_model.copy()\n",
" result_pfba = cobra.flux_analysis.parsimonious.pfba(c4_model_copy)\n",
" D_fba[value] = result_pfba.fluxes\n",
" del c4_model_copy \n",
" else:\n",
" D_fba[value] = pd.Series(index=[r_obj.id for r_obj in c4_model.reactions],data=[0]*len(c4_model.reactions))\n",
" \n",
" #Reset reaction bounds\n",
" set_bounds(B_RBO.id,(0,inf),c4_model)\n",
" set_bounds(M_RBO.id,(0,inf),c4_model)\n",
" set_bounds(B_Ex_Suc.id,(0,inf),c4_model)\n",
"\n",
" #Remove N-limitation constraint \n",
" c4_model.remove_cons_vars(const_NO3)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:36.861726Z",
"start_time": "2019-05-06T16:02:34.550730+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [],
"source": [
"save_fba_to_excel(c3_model, c4_model, D_fba, D_exp, theNotebook)"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:36.870502Z",
"start_time": "2019-05-06T16:02:36.863178+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [],
"source": [
"for exp, exp_name in D_exp.items():\n",
" save_to_json(exp_name, D_fba[exp], theNotebook)"
]
},
{
"cell_type": "markdown",
"metadata": {
"ExecuteTime": {
"end_time": "2018-02-06T17:54:23.611334+01:00",
"start_time": "2018-02-06T17:54:23.609194"
},
"run_control": {
"marked": true
}
},
"source": [
"## 4 Figures"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:36.874904Z",
"start_time": "2019-05-06T16:02:36.872561+02:00"
},
"collapsed": true,
"run_control": {
"marked": true
}
},
"outputs": [],
"source": [
"xaxis_title = 'NO3 Uptake Rate [µmol/s/m2]'\n",
"save_fig = False"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:37.084156Z",
"start_time": "2019-05-06T16:02:36.876646+02:00"
},
"collapsed": false
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"marker": {
"color": "rgb(8,81,156)"
},
"name": "Bundle sheath",
"type": "bar",
"uid": "fb65d62f-1031-43c1-8261-50f195960a68",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
},
{
"marker": {
"color": "rgb(166,54,3)"
},
"name": "Mesophyll",
"type": "bar",
"uid": "6ca25024-1c32-46e4-92f6-85e28935ed6e",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0,
0.2,
0.4,
0.6,
0.8,
1,
0,
0,
0,
0,
0
]
}
],
"layout": {
"barmode": "stack",
"height": 400,
"margin": {
"b": 100
},
"title": {
"text": "NO3 Uptake"
},
"width": 600,
"xaxis": {
"tickangle": 45,
"title": {
"text": "NO3 Uptake Rate [µmol/s/m2]"
}
},
"yaxis": {
"autorange": true,
"title": {
"text": "Flux [µmol/s/m2]"
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"create_bar_plot_rxn(D_fba, D_exp,\n",
" {'[M]_Im_NO3':'Mesophyll','[B]_Im_NO3': 'Bundle sheath'},\n",
" 'NO3 Uptake', xaxis_title,\n",
" stacked = True, save_fig=save_fig)"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:37.274098Z",
"start_time": "2019-05-06T16:02:37.085803+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"marker": {
"color": "rgb(8,81,156)"
},
"name": "Bundle sheath",
"type": "bar",
"uid": "e2e4bc3b-a1d1-4703-a0ab-8438ed50c6e3",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0.1973029584269913,
39.4735892152668,
78.7823871016651,
118.09118498806097,
157.39413254893637,
196.69333994656273,
0,
0,
0,
0,
0
]
},
{
"marker": {
"color": "rgb(166,54,3)"
},
"name": "Mesophyll",
"type": "bar",
"uid": "dad12fac-f8e3-4215-b206-6eb6db1f0d31",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0.1973029584269913,
39.4735892152668,
78.7823871016651,
118.09118498806097,
157.39413254893637,
196.69333994656273,
0,
0,
0,
0,
0
]
}
],
"layout": {
"barmode": "stack",
"height": 400,
"margin": {
"b": 100
},
"title": {
"text": "Photon Uptake"
},
"width": 600,
"xaxis": {
"tickangle": 45,
"title": {
"text": "NO3 Uptake Rate [µmol/s/m2]"
}
},
"yaxis": {
"autorange": true,
"title": {
"text": "Flux [µmol/s/m2]"
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"create_bar_plot_rxn(D_fba, D_exp,\n",
" {'[M]_Im_hnu':'Mesophyll','[B]_Im_hnu': 'Bundle sheath'},\n",
" 'Photon Uptake', xaxis_title,\n",
" stacked = True, save_fig=save_fig)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:37.462373Z",
"start_time": "2019-05-06T16:02:37.275651+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"marker": {
"color": "rgb(8,81,156)"
},
"name": "Bundle sheath",
"type": "bar",
"uid": "fdc7a76f-b42f-48e4-a9ab-ea6d88bb5540",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0.035676700117797826,
13.826637209325277,
27.58882630160846,
41.351015393890904,
55.10986144301685,
68.86657025600188,
0,
0,
0,
0,
0
]
},
{
"marker": {
"color": "rgb(166,54,3)"
},
"name": "Mesophyll",
"type": "bar",
"uid": "5ffb704b-722a-40a1-aa39-502549b6e6ba",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0.035676700117797853,
18.358639572684258,
36.710373862174976,
55.062108151664695,
73.41718548431557,
91.77440005310407,
0,
0,
0,
0,
0
]
}
],
"layout": {
"barmode": "stack",
"height": 400,
"margin": {
"b": 100
},
"title": {
"text": "Photon Uptake by PSII"
},
"width": 600,
"xaxis": {
"tickangle": 45,
"title": {
"text": "NO3 Uptake Rate [µmol/s/m2]"
}
},
"yaxis": {
"autorange": true,
"title": {
"text": "Flux [µmol/s/m2]"
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"create_bar_plot_met(D_fba, D_exp,\n",
" {'[M]_PSII_h':'Mesophyll','[B]_PSII_h': 'Bundle sheath'},'hnu_h',\n",
" 'Photon Uptake by PSII', xaxis_title, c3_model,\n",
" stacked = True, save_fig=save_fig)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:37.643234Z",
"start_time": "2019-05-06T16:02:37.464097+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"marker": {
"color": "rgb(8,81,156)"
},
"name": "Bundle sheath",
"type": "bar",
"uid": "12d747b4-1fa9-4639-95f5-8bff73aceeea",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0.16162625830919344,
25.64695200594152,
51.19356080005664,
76.74016959417008,
102.28427110591953,
127.82676969056091,
0,
0,
0,
0,
0
]
},
{
"marker": {
"color": "rgb(166,54,3)"
},
"name": "Mesophyll",
"type": "bar",
"uid": "dfc87833-fff2-4c48-ab48-c3bfe5b5b9b4",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0.16162625830919344,
21.114949642582545,
42.07201323949012,
63.029076836396285,
83.97694706462082,
104.91893989345867,
0,
0,
0,
0,
0
]
}
],
"layout": {
"barmode": "stack",
"height": 400,
"margin": {
"b": 100
},
"title": {
"text": "Photon Uptake by PSI"
},
"width": 600,
"xaxis": {
"tickangle": 45,
"title": {
"text": "NO3 Uptake Rate [µmol/s/m2]"
}
},
"yaxis": {
"autorange": true,
"title": {
"text": "Flux [µmol/s/m2]"
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"create_bar_plot_met(D_fba, D_exp,\n",
" {'[M]_PSI_h':'Mesophyll','[B]_PSI_h': 'Bundle sheath'},'hnu_h',\n",
" 'Photon Uptake by PSI', xaxis_title, c3_model,\n",
" stacked = True, save_fig=save_fig)"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:37.821109Z",
"start_time": "2019-05-06T16:02:37.644873+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"marker": {
"color": "rgb(8,81,156)"
},
"name": "Bundle sheath",
"type": "bar",
"uid": "7c8257c9-c73e-4078-9441-ac2caccfc37b",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0.05946116686299647,
0.2677834918300093,
0.47610581679709296,
0.684428141764359,
0.8927504667308472,
1.101072791697984,
0,
0,
0,
0,
0
]
},
{
"marker": {
"color": "rgb(166,54,3)"
},
"name": "Mesophyll",
"type": "bar",
"uid": "f0659619-4ad0-456b-bcaf-120802808fd2",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0.05946116686299646,
0.5194347467837359,
0.9794083267044413,
1.439381906625071,
1.899355486546034,
2.3593290664666826,
0,
0,
0,
0,
0
]
}
],
"layout": {
"barmode": "stack",
"height": 400,
"margin": {
"b": 100
},
"title": {
"text": "ATP Synthesis Mitochondria"
},
"width": 600,
"xaxis": {
"tickangle": 45,
"title": {
"text": "NO3 Uptake Rate [µmol/s/m2]"
}
},
"yaxis": {
"autorange": true,
"title": {
"text": "Flux [µmol/s/m2]"
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"create_bar_plot_met(D_fba, D_exp,\n",
" {'[M]_cplx5_m':'Mesophyll','[B]_cplx5_m': 'Bundle sheath'},'ATP_m',\n",
" 'ATP Synthesis Mitochondria', xaxis_title, c3_model,\n",
" stacked = True, save_fig=save_fig)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:38.022310Z",
"start_time": "2019-05-06T16:02:37.822942+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"marker": {
"color": "rgb(8,81,156)"
},
"name": "Bundle sheath",
"type": "bar",
"uid": "ec0a2327-1cf0-43cf-9c49-667c2b7a996b",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0.152707083279744,
22.190292703610208,
44.29635422465453,
66.40241574569737,
88.50680574516535,
110.61012712656046,
0,
0,
0,
0,
0
]
},
{
"marker": {
"color": "rgb(166,54,3)"
},
"name": "Mesophyll",
"type": "bar",
"uid": "5b109f05-5cc5-4efe-a171-918dc2345615",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0.152707083279744,
16.525289749411467,
32.894419773946375,
49.26354979848011,
65.62265069354194,
81.97533988018267,
0,
0,
0,
0,
0
]
}
],
"layout": {
"barmode": "stack",
"height": 400,
"margin": {
"b": 100
},
"title": {
"text": "ATP Synthesis Chloroplast"
},
"width": 600,
"xaxis": {
"tickangle": 45,
"title": {
"text": "NO3 Uptake Rate [µmol/s/m2]"
}
},
"yaxis": {
"autorange": true,
"title": {
"text": "Flux [µmol/s/m2]"
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"create_bar_plot_met(D_fba, D_exp,\n",
" {'[M]_ATPase_h':'Mesophyll','[B]_ATPase_h': 'Bundle sheath'},'ATP_h',\n",
" 'ATP Synthesis Chloroplast', xaxis_title, c3_model,\n",
" stacked = True, save_fig=save_fig)"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:38.453166Z",
"start_time": "2019-05-06T16:02:38.023887+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"marker": {
"color": "rgb(49,130,189)"
},
"name": "Bundle sheat (unconstrained)",
"type": "bar",
"uid": "7b801a06-5a50-4d74-b8ab-3eae2594715e",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0,
7.609511228534612,
15.219022457069185,
22.82853368560292,
30.438044914139134,
38.04755614267335,
0,
0,
0,
0,
0
]
},
{
"marker": {
"color": "rgb(8,81,156)"
},
"name": "Bundle sheat (constrained)",
"type": "bar",
"uid": "21703c2a-71b9-4fae-80eb-5e6bc9c95952",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0,
3.94758849441801e-15,
1.9107105040195502e-14,
2.385087532916412e-13,
9.358444564165952e-14,
8.5409513170719e-14,
0,
0,
0,
0,
0
]
},
{
"marker": {
"color": "rgb(166,54,3)"
},
"name": "Mesophyll (constrained)",
"type": "bar",
"uid": "a9531ed7-7fe9-4829-982d-68d172341402",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0,
2.2954621149306063e-15,
1.6556009400326042e-14,
3.0680218073667604e-15,
5.3458691665178404e-14,
8.011654335751622e-14,
0,
0,
0,
0,
0
]
}
],
"layout": {
"barmode": "stack",
"height": 400,
"margin": {
"b": 100
},
"title": {
"text": "Rubisco"
},
"width": 600,
"xaxis": {
"tickangle": 45,
"title": {
"text": "NO3 Uptake Rate [µmol/s/m2]"
}
},
"yaxis": {
"autorange": true,
"title": {
"text": "Flux [µmol/s/m2]"
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"create_bar_plot_rxn(D_fba, D_exp,\n",
" {'[M]_RBC_h':'Mesophyll (constrained)','[B]_RBC_h_Ex':'Bundle sheat (constrained)',\n",
" '[B]_RBC_h': 'Bundle sheat (unconstrained)'}, 'Rubisco', xaxis_title,\n",
" stacked = True, save_fig=save_fig)"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:38.625296Z",
"start_time": "2019-05-06T16:02:38.454809+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"marker": {
"color": "rgb(178,223,138)"
},
"name": "NAD-ME",
"type": "bar",
"uid": "730a3512-047a-4150-949b-e29f2fb1ab24",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0,
0.061030383091146966,
0.12206076618229124,
0.1830911492733708,
0.24412153236464504,
0.3051519154557513,
0,
0,
0,
0,
0
]
},
{
"marker": {
"color": "rgb(166,206,227)"
},
"name": "NADP-ME",
"type": "bar",
"uid": "8a73e3f0-1c77-4fa6-9a0c-5424f533b861",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0,
6.952932801664158,
14.006565562563214,
21.060198323461485,
28.113831084362225,
35.167463845261125,
0,
0,
0,
0,
0
]
},
{
"marker": {
"color": "rgb(31,120,180)"
},
"name": "PEPCK",
"type": "bar",
"uid": "1c964c04-9f93-4e67-9242-7d2654fc6f36",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0,
0.45895623400390073,
0.8172125087728767,
1.1754687835421924,
1.5337250583102897,
1.8919813330793214,
0,
0,
0,
0,
0
]
}
],
"layout": {
"barmode": "stack",
"height": 400,
"margin": {
"b": 100
},
"title": {
"text": "Decarboxylation Enzymes"
},
"width": 600,
"xaxis": {
"tickangle": 45,
"title": {
"text": "NO3 Uptake Rate [µmol/s/m2]"
}
},
"yaxis": {
"autorange": true,
"title": {
"text": "Flux [µmol/s/m2]"
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"create_bar_plot_rxn(D_fba, D_exp,\n",
" {'[B]_MalDH4_h': 'NADP-ME', '[B]_MalDH2_m': 'NAD-ME', '[B]_PEPC1_c': 'PEPCK'},\n",
" 'Decarboxylation Enzymes', xaxis_title,\n",
" c=True, stacked = True, save_fig=save_fig)"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:38.787851Z",
"start_time": "2019-05-06T16:02:38.626888+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"marker": {
"color": "rgb(8,81,156)"
},
"name": "Bundle sheath",
"type": "bar",
"uid": "64da5e37-d8a1-4135-ae08-c7a87bbaa0a9",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
},
{
"marker": {
"color": "rgb(166,54,3)"
},
"name": "Mesophyll",
"type": "bar",
"uid": "750daea1-a674-4345-9047-f53ed1050f85",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
5.107329391018404e-18,
7.573712021137007,
15.147424042273983,
22.721136063410345,
30.294848084548466,
37.86856010568525,
0,
0,
0,
0,
0
]
}
],
"layout": {
"barmode": "stack",
"height": 400,
"margin": {
"b": 100
},
"title": {
"text": "PEPC"
},
"width": 600,
"xaxis": {
"tickangle": 45,
"title": {
"text": "NO3 Uptake Rate [µmol/s/m2]"
}
},
"yaxis": {
"autorange": true,
"title": {
"text": "Flux [µmol/s/m2]"
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"create_bar_plot_rxn(D_fba, D_exp,\n",
" {'[M]_PEPC2_c': 'Mesophyll', '[B]_PEPC2_c': 'Bundle sheath'},\n",
" 'PEPC', xaxis_title,\n",
" stacked = True, save_fig=save_fig)"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:38.934013Z",
"start_time": "2019-05-06T16:02:38.789210+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"marker": {
"color": "rgb(8,81,156)"
},
"name": "Bundle sheath",
"type": "bar",
"uid": "da6dfee8-bc2f-431f-b63b-f07dec5a73ce",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
2.6253729115716506e-19,
0.01611624834874633,
0.032232496697500064,
0.04834874504629337,
0.06446499339494494,
0.08058124174372835,
0,
0,
0,
0,
0
]
},
{
"marker": {
"color": "rgb(166,54,3)"
},
"name": "Mesophyll",
"type": "bar",
"uid": "1060fa12-594e-4ab8-9ca2-5202d7028793",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
9.40907861141412e-19,
7.574240422722218,
15.148480845444391,
22.722721268165994,
30.2969616908893,
37.87120211361136,
0,
0,
0,
0,
0
]
}
],
"layout": {
"barmode": "stack",
"height": 400,
"margin": {
"b": 100
},
"title": {
"text": "PyrPiDK"
},
"width": 600,
"xaxis": {
"tickangle": 45,
"title": {
"text": "NO3 Uptake Rate [µmol/s/m2]"
}
},
"yaxis": {
"autorange": true,
"title": {
"text": "Flux [µmol/s/m2]"
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"create_bar_plot_rxn(D_fba, D_exp,\n",
" {'[M]_PyrPiDK_h': 'Mesophyll', '[B]_PyrPiDK_h': 'Bundle sheath'},\n",
" 'PyrPiDK', xaxis_title,\n",
" stacked = True, save_fig=save_fig)"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {
"ExecuteTime": {
"end_time": "2019-05-06T14:02:39.265229Z",
"start_time": "2019-05-06T16:02:38.935320+02:00"
},
"collapsed": false,
"run_control": {
"marked": true
}
},
"outputs": [
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"colorbar": {
"title": {
"side": "right",
"text": "Flux [µmol/s/m2]"
}
},
"colorscale": [
[
0,
"rgb(255,245,240)"
],
[
0.125,
"rgb(254,224,210)"
],
[
0.25,
"rgb(252,187,161)"
],
[
0.375,
"rgb(252,146,114)"
],
[
0.5,
"rgb(251,106,74)"
],
[
0.625,
"rgb(239,59,44)"
],
[
0.75,
"rgb(203,24,29)"
],
[
0.875,
"rgb(165,15,21)"
],
[
1,
"rgb(103,0,13)"
]
],
"type": "heatmap",
"uid": "557a27a8-8d48-4a49-9431-68788517e384",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
"cACN",
"PEP",
"Gln",
"GAP",
"Asp",
"DHAP",
"Mal"
],
"z": [
[
null,
null,
null,
null,
null,
0.30515191545575143,
null,
null,
null,
null,
null
],
[
null,
null,
null,
null,
null,
0.8520475561427726,
null,
null,
null,
null,
null
],
[
null,
null,
0.1143989431968228,
0.17159841479517107,
0.22879788639370405,
0.28599735799207915,
null,
null,
null,
null,
null
],
[
null,
0.5120966658379806,
0.9899553813190277,
1.4678140968002078,
1.9465085730705236,
2.4257373583760873,
null,
null,
null,
null,
null
],
[
null,
0.5907744229145901,
1.098687236653166,
1.6066000503918978,
2.114512864129934,
2.6224256778684985,
null,
null,
null,
null,
null
],
[
null,
0.5735233501180338,
1.112808749879139,
1.6520941496403712,
2.192215310190731,
2.7328707797763596,
null,
null,
null,
null,
null
],
[
null,
6.968802855818189,
14.020467320812383,
21.072131785805833,
28.123796250801593,
35.17546071579564,
null,
null,
null,
null,
null
]
]
}
],
"layout": {
"margin": {
"b": 100
},
"title": {
"text": "Mesophyll ==> Bundlesheat Transport"
},
"width": 500,
"xaxis": {
"tickangle": 45,
"title": {
"text": "NO3 Uptake Rate [µmol/s/m2]"
}
},
"yaxis": {
"tickmode": "array",
"ticktext": [
"cACN",
"PEP",
"Gln",
"GAP",
"Asp",
"DHAP",
"Mal"
],
"tickvals": [
0,
1,
2,
3,
4,
5,
6
],
"title": {
"text": "Transport Metabolites"
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"linkText": "Export to plot.ly",
"plotlyServerURL": "https://plot.ly",
"showLink": false
},
"data": [
{
"colorbar": {
"title": {
"side": "right",
"text": "Flux [µmol/s/m2]"
}
},
"colorscale": [
[
0,
"rgb(247,251,255)"
],
[
0.125,
"rgb(222,235,247)"
],
[
0.25,
"rgb(198,219,239)"
],
[
0.375,
"rgb(158,202,225)"
],
[
0.5,
"rgb(107,174,214)"
],
[
0.625,
"rgb(66,146,198)"
],
[
0.75,
"rgb(33,113,181)"
],
[
0.875,
"rgb(8,81,156)"
],
[
1,
"rgb(8,48,107)"
]
],
"type": "heatmap",
"uid": "04a99c79-4cb0-439c-90e6-e0e3d330e51c",
"x": [
"0.0",
"0.2",
"0.4",
"0.6",
"0.8",
"1.0",
"1.2",
"1.4",
"1.6",
"1.8",
"2.0"
],
"y": [
"Cit",
"Glu",
"Ala",
"PGA",
"Pyr"
],
"z": [
[
null,
null,
null,
null,
null,
0.30515191545575143,
null,
null,
null,
null,
null
],
[
null,
null,
0.11862615587846054,
0.17793923381762514,
0.22879788639370077,
0.28599735799207954,
null,
null,
null,
null,
null
],
[
null,
0.5144238379103121,
0.850074290814295,
1.2336806316334745,
1.6257413978156454,
2.0114613449754812,
null,
null,
null,
null,
null
],
[
null,
1.0857961498177442,
2.103116398921603,
3.120436648025773,
4.139428418708284,
6.008894355677936,
null,
null,
null,
null,
null
],
[
null,
7.058891882037786,
14.296557149081883,
21.486266528210205,
28.667521481977218,
35.85511725476535,
null,
null,
null,
null,
null
]
]
}
],
"layout": {
"margin": {
"b": 100
},
"title": {
"text": "Bundlesheat ==> Mesophyll Transport"
},
"width": 500,
"xaxis": {
"tickangle": 45,
"title": {
"text": "NO3 Uptake Rate [µmol/s/m2]"
}
},
"yaxis": {
"tickmode": "array",
"ticktext": [
"Cit",
"Glu",
"Ala",
"PGA",
"Pyr"
],
"tickvals": [
0,
1,
2,
3,
4
],
"title": {
"text": "Transport Metabolites"
}
}
}
},
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" \n",
"
"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plot_transport(D_fba, D_exp, L_r_transport, xaxis_title, save_fig=save_fig)"
]
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [default]",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
"autoclose": false,
"autocomplete": true,
"bibliofile": "biblio.bib",
"cite_by": "apalike",
"current_citInitial": 1,
"eqLabelWithNumbers": true,
"eqNumInitial": 1,
"hotkeys": {
"equation": "Ctrl-E",
"itemize": "Ctrl-I"
},
"labels_anchors": false,
"latex_user_defs": false,
"report_style_numbering": false,
"user_envs_cfg": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}