buildingediting

This module contains the code for building and editing the guard cell model

source

add_metabolite

 add_metabolite (model, name, compartment='default', multi=True)

This function adds a metabolite to the given model, and returns this metabolite. If multi is set to true it will be added to every phase of the model.


source

add_reaction

 add_reaction (model, name, multi=True)

This function adds a reaction to the given model, and returns this reaction. If multi is set to true it will be added to every phase of the model.


source

split_model

 split_model (model, labels)

*This function takes two arguments: the model to be split and the labels for the models to split it into. len(labels) number of models will be created, with the suffix “_label” to define them.*


source

check_number_of_models

 check_number_of_models (model)

This function returns the number of phases of the model based on the maximal number of the last tag


source

set_bounds_multi

 set_bounds_multi (model, reaction_id, lower_flux, upper_flux)

Constrain a reaction’s flux in all phases


source

add_linkers

 add_linkers (model, linkers_file, compartments, cells, phase_times)

This function adds linker reactions for osmolytes to a phased model of guard cell, and adds osmolarity and charge linker pseudoreactions. It takes five arguments: model: the model to which linkers are to be added linkersfile: a .csv file with a list of osmolytes and their osmotic coefficients, leave the osmotic coefficient at 0 to add as a linker but not contribute to osmolarity compartments: a list of the compartments to add linker reactions to within cells cells: a list of cell tags to be used phase_times: a list of the lengths of each phase, for scaling of the linker reactions


source

def_linkers

 def_linkers (file)

This function creates a dict of osmolytes and their osmotic coefficients from the .csv file, and is used by addlinkers


source

add_metabolites_to_reaction_multi

 add_metabolites_to_reaction_multi (model, reaction, metabolites_dict)

This function adds a dictionary of metabolites to a reaction in every phase of the model