EcModel¶
Create an enzyme constraint model, e.g. GECKO and TGECKO, by extending a XbaModel or TfaModel instance.
- class f2xba.EcModel(xba_model)[source]¶
Create an enzyme constraint model by extending a XbaModel instance.
Support is provided for generation of GECKO, MOMENT, MOMENTmr and ccFBA models.
GECKO is implemented based on the GECKO 1.0 MATLAB package (Sánchez et al., 2017), MOMENT is described in literature (Adadi et al., 2012), ccFBA and MOMENTmr are based on the R-package sybilccFBA (Desouki, 2015).
Example: Create a GECKO model by extending an existing genome scale metabolic model. The spreadsheet files xba_parameters.xlsx and ecm_parameters.xlsx contain configuration data. See tutorials.
xba_model = XbaModel('iML1515.xml') xba_model.configure('xba_parameters.xlsx') ec_model = EcModel(xba_model) ec_model.configure('ecm_parameters.xlsx') if ec_model.validate(): ec_model.export('iML1515_GECKO.xml')
- model¶
Reference to the XbaModel instance.
- configure(fname)[source]¶
Configure the EcModel instance with information provided in the ECM configuration file.
The ECM configuration spreadsheet should contain the table ‘general’. See tutorials.
Example: Create a GECKO model by extending an existing genome scale metabolic model. The spreadsheet files xba_parameters.xlsx and ecm_parameters.xlsx contain the configuration data.
xba_model = XbaModel('iML1515.xml') xba_model.configure('xba_parameters.xlsx') ec_model = EcModel(xba_model) ec_model.configure('ecm_parameters.xlsx')
- Parameters:
fname (str) – filename of ECM configuration file (.xlsx)
- Returns:
success status
- Return type:
bool
- validate()[source]¶
Validate compliance with SBML standards, including units configuration.
Validation is an optional task taking time. Validation could be skipped once model configuration is stable.
Information on non-compliance is printed. Details are written to tmp/tmp.txt. In case of an unsuccessful validation, it is recommended to review tmp/tmp.txt and improve on the model configuration.
Example: Ensure compliance with SBML standards for an EcModel instance prior to its export to file.
if ec_model.validate(): ec_model.export('iML1515_GECKO.xml')
- Returns:
success status
- Return type:
bool
- export(fname)[source]¶
Export EcModel to SBML encoded file (.xml) or spreadsheet (.xlsx).
The spreadsheet (.xlsx) is helpful to inspect model configuration.
Example: Export EcModel instance to SBML encoded file and to spreadsheet format.
if ec_model.validate(): ec_model.export('iML1515_GECKO.xml') ec_model.export('iML1515_GECKO.xlsx')
- Parameters:
fname (str) – filename with extension ‘.xml’ or ‘.xlsx’
- Returns:
success status
- Return type:
bool