VoNDA examples
Here, we illustrate the usage and functionalities of VoNDA. While VoNDA is developed in Python, no Python programming knowledge is required for using VoNDA successfully. We recommmend using VoNDA together with CBMPy, our constraint-based modeling software in Python. We show here two examples, one without and subsequently one with CBMPy. Also, our SVG model files can be used within FAME.Synechocystis model without CBMPy
We start with an example of the Synechocystis iTM686 genome-scale model. All generated images are available for download (by using the right mouse button). Downloading allows users to exploit the interactive character of the map (click e.g. on a random metabolite or reaction, you will be directed to the KEGG map). We start by importing the software package:>>> import vonda
>>> vmod = vonda.PVisualizer('Synechocystis.svg')
>>> D_fluxes = vmod.importKeyValueData("iTM686_FBA.txt")
>>> vmod.doMapReactions(D_fluxes)
Here, we used the default settings of doMapReactions(), whereas we can also use more advanced settings. We illustrate this here with three examples. First, we visualize all fluxes with a value higher than 0.01. Secondly, we visualize all fluxes with a flux value between 0.01 and 1. Thirdly, we also calculate some yields:
>>> vmod.doMapReactions(D_fluxes,valuesRange=['higher',0.01],
filename_out = "Synechocystis_reactions_high")
>>> vmod.doMapReactions(D_fluxes,valuesRange=['between',0.01,1],
filename_out = "Synechocystis_reactions_between")
>>> vmod.doMapReactions(D_fluxes,objective='max',objective_reaction='R_BiomassAuto',
D_yields = {'photon':'R_EX_photon_LPAREN_e_RPAREN_',
'carbon':'R_EX_hco3_LPAREN_e_RPAREN_','sulfate':
'R_EX_so4_LPAREN_e_RPAREN_','nitrate':'R_EX_no3_LPAREN_e_RPAREN_'})
>>> D_reactions=vmod.importKeyMembersData('iTM686_blocked_reactions_LLS.txt')
>>> vmod.doMapReactionGroups(D_reactions,filename_out = "Syn_blocked_reactions_LLS")
Our last example concerns reaction associated data. Each reaction has three associated squares, which can be used for visualization of reaction associated data. An example of this kind of data is gene expression data:
>>> D_associations = vmod.importKeyMembersData('iTM686_GPRs.txt')
>>> growth_condition = 'wt_CO2_limitation_12h'
>>> D_squares = vmod.importExpressionData(D_associations,growth_condition,
'CyanoEXpress_cluster.txt')
>>> vmod.doMapSquares(D_squares,filename_out = "Syn_{0:s}".format(growth_condition))
E.coli model with CBMPy
Here, we use the core E.coli model developed by Carlson and Scrienc 2004 to illustrate how we can use VoNDA in combination with CBMPy. This model consists of 44 reactions of which 18 are considered reversible, and 47 metabolites of which 11 are external. We start by importing both VoNDA and CBMPy. Next, we use VoNDA to select to correct SVG file and CBMPy to read the corresponding SBML (L3) file. Both files are provided after downloading VoNDA:>>> import vonda, pyscescbm as cbm
>>> vmod = vonda.PVisualizer('Ecoli_Carlson.svg',reaction_suffix='R')
>>> cmod = cbm.CBRead.readSBML3FBC("Ecoli_Carlson2003_sbml3.xml",vonda.model_dir)
>>> cbm.CBSolver.analyzeModel(cmod,return_lp_obj = True)
>>> D_fluxes = cmod.getReactionValues()
>>> vmod.doMapReactions(D_fluxes,filename_out = "Ecoli_Carlson_aerobic")
Next, we simulate anaerobic growth by setting both reaction R80 and R81 to zero (convince yourself):
>>> cmod.setReactionBounds('R80',0,0)
>>> cmod.setReactionBounds('R81',0,0)
>>> cbm.CBSolver.cplx_MinimizeSumOfAbsFluxes(cmod)
>>> D_fluxes = cmod.getReactionValues()
>>> vmod.doMapReactions(D_fluxes,filename_out = "Ecoli_Carlson_anaerobic")