Misc
Reorder model reactions
- set_up_grasp_models.set_up_models.manipulate_model.reorder_reactions(data_dict, rxn_list, file_out)
Given a dictionary representing a GRASP input excel and a list of reactions it reorders the reaction in all excel sheets that and writes the new reordered sheets to file_out
- Parameters
data_dict (
dict) – dictionary representing GRASP input excel file.rxn_list (
list) – list with the new reaction order.file_out (
str) – path to excel input file to be outputed.
- Returns
None
Remove leading and trailing spaces
- set_up_grasp_models.set_up_models.manipulate_model.remove_spaces(data_dict, file_out)
Given a GRASP input model file removes trailing and leading spaces from all cells that contain strings.
- Parameters
data_dict (
dict) – dictionary representing GRASP input excel file.file_out (
str) – path to excel input file to be outputed.
- Returns
None
Rename columns in the model
- set_up_grasp_models.set_up_models.manipulate_model.rename_columns(data_dict, file_out)
Given a GRASP input excel file, renames the columns and index names, so that these are standardize and don’t cause problems with functions in this package.
If the number of columns in the given excel file sheet is less than it should be, it adds columns filled with 0s.
- Parameters
data_dict (
dict) – dictionary representing GRASP input excel file.file_out (
str) – path to excel input file to be outputed.
- Returns
None