Load data functions¶
Import GRASP model¶
Contains the functions to import the input excel file for GRASP.
-
app.load_data.import_grasp_model.get_model_activators(file_path, sheet_name)¶ - Gets the activators and respective references for each reaction on the kinetics1 sheet and returns a dictionary
- {rxn_id([activator_list], [activ_references])}. Entry i in activ_references contains all references as a string
for activation i in activator_list. If there are multiple references for the same activation these are still contained in the same string in entry i of activ_references, where the reference strings are separated by a space.
- Parameters
file_path – path to file containing the model
sheet_name – name of the excel sheet where the reaction activators specification is, should be ‘kinetics1’
- Returns
[[activators], [reference types], [references]]}
- Return type
activators_dict of the form {rxn_id
-
app.load_data.import_grasp_model.get_model_effectors(file_path, sheet_name)¶ - Gets the effectors and respective references for each reaction on the kinetics1 sheet and returns a dictionary
- {rxn_id([effector_list], [effector_references])}. Entry i in effector_references contains all references as a
string for effector i in effector_list. If there are multiple references for the same effector these are still contained in the same string in entry i of effector_references, where the reference strings are separated by a space. In the end two different dictionaries are returned, one for positive effectors and another for negative effectors.
- Parameters
file_path – path to file containing the model
sheet_name – name of the excel sheet where the reaction effectors specification is, should be ‘kinetics1’
- Returns
{rxn_id: [[effectors], [reference types], [references]]}
- Return type
neg_effectors_dict and pos_effectors_dict of the form
-
app.load_data.import_grasp_model.get_model_enzymes(file_path, sheet_name)¶ Imports the list of enzymes associated to each reaction in the model
- Parameters
file_path – path to file containing the model
sheet_name – name of the excel sheet where the model enzymes are, should be ‘enzyme_reaction’
- Returns
enzyme list
-
app.load_data.import_grasp_model.get_model_gibbs_energies(file_path, sheet_name)¶ Given the GRASP input excel file, extracts the gibbs energies (mean and respective std) for each reaction from the thermoRxns sheet.
- Parameters
file_path – path to file containing the model
sheet_name – name of the excel sheet where the reaction effectors specification is, should be ‘thermoRxns’
- Returns
(dG_mean, dG_std, references)}
- Return type
dG_dict of the form {rxn_id
-
app.load_data.import_grasp_model.get_model_inhibitors(file_path, sheet_name)¶ - Gets the inhibitors and respective references for each reaction on the kinetics1 sheet and returns a dictionary
- {rxn_id([inhibitor_list], [inhib_references])}. Entry i in inhib_references contains all references as a string
for inhibition i in inhibitor_list. If there are multiple references for the same inhibition these are still contained in the same string in entry i of inhib_references, where the reference strings are separated by a space.
- Parameters
file_path – path to file containing the model
sheet_name – name of the excel sheet where the reaction inhibitors specification is, should be ‘kinetics1’
- Returns
[[inhibitors], [reference types], [references]]}
- Return type
inhibitors_dict of the form {rxn_id
-
app.load_data.import_grasp_model.get_model_mechanisms(file_path, sheet_name)¶ From the kinetics1 sheet, gets the kinetic mechanisms, respective substrate binding order and product release order, as well as references for each mechanism and returns a dictionary
- {rxn_id(mechanism, [mech_order], [mech_references])}. Entry i in mech_references contains all references
for the mechanism, and mech_order contains the order of substrate binding and product release.
- Parameters
file_path – path to file containing the model
sheet_name – name of the excel sheet where the reaction mechanism specification is, should be ‘kinetics1’
- Returns
{rxn_id: [mechanism name, [substrates binding order], [products release order], [references]]}
- Return type
mechanisms_dict of the form
-
app.load_data.import_grasp_model.get_model_name(file_path, sheet_name)¶ Return the model name, which is assumed to be in the first row, second column of the sheet_name.
- Parameters
file_path – path to file containing the model
sheet_name – sheet_name: name of the excel sheet where the model name is, should be ‘general’
- Returns
Model name
-
app.load_data.import_grasp_model.get_model_stoichiometry(file_path, sheet_name)¶ Gets the reaction strings from the stoichiometry matrix defined in the GRASP input models.
- Parameters
file_path – path to file containing the model
sheet_name – name of the excel sheet where the model stoichiometry is, should be ‘stoic’
- Returns
mets list, rxns lists, rxn_strings list
-
app.load_data.import_grasp_model.get_model_subunits(file_path, sheet_name)¶ Gets the columns reaction ID and subunits and returns a tuple (reaction ID, subunits).
- Parameters
file_path – path to file containing the model
sheet_name – name of the excel sheet where the enzyme subunits specification is, should be ‘kinetics1’
- Returns
number_of_subunits}
- Return type
subunit_dict with the form {rxn
Load initial data¶
Loads the initial data into the database.
Load SBML models¶
Contains functions to load models in SBML.