It turned out to be trivial, here's what I did:
- Downloaded the model from biomodels
- Loaded it into CBMPy, this translates the model into SBML3+FBC using libSBML 5.8.0
cmod = cbm.CBRead.readCOBRASBML('MODEL1109130000.cobra.xml', os.getcwd())
- At this point there is no objective function defined so I created one (R_biomass_reaction)
- All that's left is to solve it:
INFO: Model is optimal: 1
Solution status = 1 : optimal
Solution method = 2 : dual
Objective value = 100.0
Status: Model is optimal
- As this is a rather large model I decided to try my multicore FVA and see what happens (I decided to use two processing threads on a quad core CPU). This took about and hour in the end which is slow, but this is a good excuse to look at some of the newer optimized FVA algorithms out there.
fvadat = cbm.CBMultiCore.runMultiCoreFVA(cmod, procs=2)
- Finally I want to write the whole model, the FBA solution and FVA results to file. Excel 97 is actually quite a good format for this, next step is a COMBINE archive.