import pandas as pd
Generating table for linkers/osmolytes
This notebook describes the steps to generate the
= {} linkers_dict
Add the amino acids as linker reactions in the vacuole of both the guard cell and mesophyll cell. They have an osmotic effect in the guard cell but not the mesophyll
= [
amino_acid_list '4_AMINO_BUTYRATE',
'LEU',
'GLY',
'VAL',
'L_ALPHA_ALANINE',
'ASN',
'MET',
'LYS',
'THR',
'ILE',
'SER',
'GLT',
'TRP',
'GLN',
'TYR',
'L_ASPARTATE',
'PRO',
'PHE',
'HIS',
'bHIS',
'CYS',
'ARG',
]
for cell, osmolarity in zip(["me", "gc"], [0, 1]):
for amino_acid in amino_acid_list:
f"{amino_acid}_v_{cell}"] = osmolarity linkers_dict[
Use vacuolar linkers from previous diel paper for mesophyll non-osmotic linkers
= [
me_linkers "MAL",
"aMAL",
"SUCROSE",
"CIT",
"aCIT",
]
for me_linker in me_linkers:
f"{me_linker}_v_me"] = 0 linkers_dict[
Add non-osmotic apoplastic linkers based on what has been found to be present in the apoplast of guard cells
= [
a_linkers 'Cl',
'FRU',
'GLC',
'K',
'MAL',
'NITRATE',
'SUCROSE',
'aMAL',
]
for a_linker in a_linkers:
f"{a_linker}_a"] = 0 linkers_dict[
Add osmotic linkers to cytoplasm and vacuole of GC based on what has been hypothesised to accumulate
= [
gc_c_linkers 'CIT',
'Cl',
'FRU',
'GLC',
'K',
'MAL',
'NITRATE',
'SUCROSE',
]
for gc_c_linker in gc_c_linkers:
f"{gc_c_linker}_c_gc"] = 1 linkers_dict[
= [
gc_v_linkers 'CIT',
'Cl',
'FRU',
'GLC',
'K',
'MAL',
'NITRATE',
'SUCROSE',
'aCIT',
'aMAL',
]
for gc_v_linker in gc_v_linkers:
f"{gc_v_linker}_v_gc"] = 1 linkers_dict[
Add starch as a non-osmotic linker reaction in both the gc and me plastid
f"STARCH_p_gc"] = 0
linkers_dict["STARCH_p_me"] = 0 linkers_dict[
Add palmitate fatty acid as a linker reaction to the GC cytoplasm
Palmitate is the only fatty acid in the model. Adding other FAs and formation of lipids only makes a minor difference to energy costs involved (Unpublished work), so this is sufficient. Palmitate will not have an osmotic contribution because we assume it is stored in lipid droplets.
f"PALMITATE_c_gc"] = 0 linkers_dict[
Add maltose as a linker reaction to the cytoplasm of GC (not ME)
Maltose contributes to osmotic pressure with osmotic coefficient of 1 in GC.
#linkers_dict[f"MALTOSE_c_me"] = 0
f"MALTOSE_c_gc"] = 1 linkers_dict[
Save as .csv file
= pd.DataFrame.from_dict(linkers_dict, orient="Index", columns=["Osmotic Coefficient"])
osmolytes_df = "Linker"
osmolytes_df.index.name "../inputs/osmolytes.csv") osmolytes_df.to_csv(
Generate a prettier DF for investigating here if wanted
def get_compartment_cell(linker):
= linker.split("_")
split_name = split_name[-1]
cell if cell != "a":
= split_name[-2]
compartment = split_name[:-2]
metabolite else:
= "NA"
compartment = split_name[:-1]
metabolite
if type(metabolite) == list:
= "_".join(metabolite)
metabolite
return metabolite, compartment, cell
= pd.MultiIndex.from_tuples([get_compartment_cell(i) for i in osmolytes_df.index], names=[
osmolytes_df_prettyindex "Metabolite", "Compartment", "Cell"])
= osmolytes_df_prettyindex
osmolytes_df.index = osmolytes_df.sort_index()
osmolytes_df osmolytes_df
Osmotic Coefficient | |||
---|---|---|---|
Metabolite | Compartment | Cell | |
4_AMINO_BUTYRATE | v | gc | 1 |
me | 0 | ||
ARG | v | gc | 1 |
me | 0 | ||
ASN | v | gc | 1 |
... | ... | ... | ... |
aMAL | NA | a | 0 |
v | gc | 1 | |
me | 0 | ||
bHIS | v | gc | 1 |
me | 0 |
79 rows × 1 columns
def return_list_of_items(groupobject):
return ", ".join(list(groupobject.values.astype("str")))
= {
linkers_met_dict "SUCROSE": "Sucrose",
"GLC": "Glucose",
"FRU": "Fructose",
"MAL": "Malate",
"CIT": "Citrate",
"Cl": "Cl",
"K": "K",
"NITRATE": "Nitrate",
"aMAL": "aMalate",
"STARCH": "Starch",
"aCIT": "aCitrate",
"bHIS": "bHis",
}
= osmolytes_df.reset_index().set_index(["Osmotic Coefficient", "Cell", "Compartment"]).sort_index()
osmolytes_tidy
= set(osmolytes_tidy.Metabolite) - set(linkers_met_dict.keys())
leftovers
for l in leftovers:
= l.capitalize()
linkers_met_dict[l]
= osmolytes_tidy.Metabolite.map(lambda x: linkers_met_dict[x])
osmolytes_tidy.Metabolite = osmolytes_tidy.groupby(["Osmotic Coefficient", "Cell", "Compartment"]).agg(return_list_of_items)
osmolytes_tidy "../plant_cell_paper/supplemental_table_1.csv")
osmolytes_tidy.to_csv( osmolytes_tidy
Metabolite | |||
---|---|---|---|
Osmotic Coefficient | Cell | Compartment | |
0 | a | NA | Cl, Fructose, Glucose, K, Malate, Nitrate, Suc... |
gc | c | Palmitate | |
p | Starch | ||
me | p | Starch | |
v | 4_amino_butyrate, Arg, Asn, Citrate, Cys, Gln,... | ||
1 | gc | c | Citrate, Cl, Fructose, Glucose, K, Malate, Mal... |
v | 4_amino_butyrate, Arg, Asn, Citrate, Cys, Cl, ... |