import pandas as pdGenerating 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:
linkers_dict[f"{amino_acid}_v_{cell}"] = osmolarityUse vacuolar linkers from previous diel paper for mesophyll non-osmotic linkers
me_linkers = [
"MAL",
"aMAL",
"SUCROSE",
"CIT",
"aCIT",
]
for me_linker in me_linkers:
linkers_dict[f"{me_linker}_v_me"] = 0Add 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:
linkers_dict[f"{a_linker}_a"] = 0Add 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:
linkers_dict[f"{gc_c_linker}_c_gc"] = 1gc_v_linkers = [
'CIT',
'Cl',
'FRU',
'GLC',
'K',
'MAL',
'NITRATE',
'SUCROSE',
'aCIT',
'aMAL',
]
for gc_v_linker in gc_v_linkers:
linkers_dict[f"{gc_v_linker}_v_gc"] = 1Add starch as a non-osmotic linker reaction in both the gc and me plastid
linkers_dict[f"STARCH_p_gc"] = 0
linkers_dict["STARCH_p_me"] = 0Add 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.
linkers_dict[f"PALMITATE_c_gc"] = 0Add 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
linkers_dict[f"MALTOSE_c_gc"] = 1Save as .csv file
osmolytes_df = pd.DataFrame.from_dict(linkers_dict, orient="Index", columns=["Osmotic Coefficient"])
osmolytes_df.index.name = "Linker"
osmolytes_df.to_csv("../inputs/osmolytes.csv")Generate a prettier DF for investigating here if wanted
def get_compartment_cell(linker):
split_name = linker.split("_")
cell = split_name[-1]
if cell != "a":
compartment = split_name[-2]
metabolite = split_name[:-2]
else:
compartment = "NA"
metabolite = split_name[:-1]
if type(metabolite) == list:
metabolite = "_".join(metabolite)
return metabolite, compartment, cellosmolytes_df_prettyindex = pd.MultiIndex.from_tuples([get_compartment_cell(i) for i in osmolytes_df.index], names=[
"Metabolite", "Compartment", "Cell"])
osmolytes_df.index = osmolytes_df_prettyindex
osmolytes_df = osmolytes_df.sort_index()
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_tidy = osmolytes_df.reset_index().set_index(["Osmotic Coefficient", "Cell", "Compartment"]).sort_index()
leftovers = set(osmolytes_tidy.Metabolite) - set(linkers_met_dict.keys())
for l in leftovers:
linkers_met_dict[l] = l.capitalize()
osmolytes_tidy.Metabolite = osmolytes_tidy.Metabolite.map(lambda x: linkers_met_dict[x])
osmolytes_tidy = osmolytes_tidy.groupby(["Osmotic Coefficient", "Cell", "Compartment"]).agg(return_list_of_items)
osmolytes_tidy.to_csv("../plant_cell_paper/supplemental_table_1.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, ... |