Visualizing the results of cobra

716 views
Skip to first unread message

Prateek Tandon

unread,
Jan 19, 2012, 6:54:52 AM1/19/12
to COBRA Toolbox
Hi all,

I was working on the Mycobacterium tuberculosis model and went around
to generate flux values by playing with the model i.e. changing to
anaerobic, changing the objective and changing the medium in which the
cell is grown. I was wondering if there is any tool to visualize the
data generated through the functions.

Warm regards

Prateek Tandon
Final Year Undergraduate
B.Tech Bioinformatics
VIT university
India

soma ghosh

unread,
Jan 19, 2012, 8:01:41 AM1/19/12
to cobra-...@googlegroups.com
Check the FluxViz plugin for cytoscape. This is what you might be looking for. 

Another method is a bit tricky as you might require the map for each pathways. This method is described in the Nature protocol paper for COBRA

Cheers
Soma

Carlos Javier Alméciga Díaz

unread,
Jan 20, 2012, 8:03:19 AM1/20/12
to cobra-...@googlegroups.com
Dear Soma,

I´m trying your suggestion of FluxViz pluging. However, how can I generate the flux file (*.val)?

Thanks

Javier


Carlos Javier Alméciga Díaz
Bogotá D.C. - COLOMBIA

Antes de imprimir este documento o los archivos adjuntos comprueba que es necesario.
Una tonelada de papel implica la tala de 14 árboles y el consumo de 15.000 litros de agua.


2012/1/19 soma ghosh <goodgo...@gmail.com>

Prateek Tandon

unread,
Jan 20, 2012, 8:23:06 AM1/20/12
to cobra-...@googlegroups.com
Hi Soma,

Even I am encountering a similar situation. It would be great if you could help us out.

Regards

Prateek Tandon

2012/1/20 Carlos Javier Alméciga Díaz <cjalm...@gmail.com>



--
Prateek Tandon
Final Year Undergraduate
B.Tech Bioinformatics
VIT University, Vellore

Carlos Javier Alméciga Díaz

unread,
Jan 20, 2012, 8:36:46 AM1/20/12
to cobra-...@googlegroups.com
Prateek,

Did you try the function drawFlux on Cobra toolbox? 

Although you need to do some previous steps (get the map from BiGG and read the map), you can get very nice images. The only thing is that you need to get a software to visualize the final image file. I´m using Inkscape.


Javier


Carlos Javier Alméciga Díaz
Bogotá D.C. - COLOMBIA

Antes de imprimir este documento o los archivos adjuntos comprueba que es necesario.
Una tonelada de papel implica la tala de 14 árboles y el consumo de 15.000 litros de agua.


2012/1/20 Prateek Tandon <erprat...@gmail.com>

Prateek Tandon

unread,
Jan 20, 2012, 9:14:11 AM1/20/12
to cobra-...@googlegroups.com
Hi Carlos,

No i haven't tried drawFlux on Cobra. Actually i was hoping to receive such a function in response only. I shall try both and see whichever works for me.Meanwhile Im waiting for my username and password from BiGG.

Thanks and Regards

Mkavscek

unread,
May 22, 2013, 7:15:23 AM5/22/13
to cobra-...@googlegroups.com
Hello,
 
did anyone found out how to generate.val file with cobratoolbox? is that even possible?
 
 
Thank you for your answers!
 
Best regards,
Martin Kavšček
Dne petek, 20. januar 2012 14:03:19 UTC+1 je oseba Carlos Javier Alméciga Díaz napisala:

Lindsay Edwards

unread,
May 22, 2013, 7:35:31 AM5/22/13
to cobra-...@googlegroups.com
Hi Martin,

Yes, I got it going. Here are my lab notes, and a couple of accompanying files.
There is probably a much more elegant, integrated way to do it, but this worked for me.

HOW TO MAKE VAL FILES
First, turn cobra model into sbml

sbmlModel = convertCobraToSBML(YOURMODEL)

This can be saved for import into CytoScape:
outputSBML(sbmlModel,'YOURMODEL.xml')

Then, to pull out a list of rxn names:
for i=1:225 %number of reactions
sbmlRxns{i,1}=sbmlModel.reaction(1,i).id
end

I've turned this into a function called extractSBMLrxns (attached):

sbmlRxns=extractSBMLrxns(sbmlModel)

To make a val file, copy and paste these into Excel
Then use the Excel function in 'function to clip quotes from rxn names.xls' (also attached).
Then save as text separated values! I can't remember the exact format of .val files but this will give you the basic building blocks.
Also attached is a screenshot of the results.

This is a fine example of a biologist's crappy workflow but, as I said, it did work! :)

Best,

Lindsay.

Dr Lindsay Edwards MSc DPhil
Lecturer in Physiology
Centre of Human & Aerospace Physiological Sciences
King's College London

On 22/05/2013, at 12:15 PM, Mkavscek wrote:

Hello,
 
extractSBMLrxns.m
function to clip quotes from rxn names.xlsx
fluxVizOutput.pdf

Lindsay Edwards

unread,
May 22, 2013, 7:40:44 AM5/22/13
to cobra-...@googlegroups.com
Sorry, I probably should have added this:
The workflow I gave you will give you a network on CytoScape and a set of rxn IDs that CytoScape can read.
You will need to add your numerical values for each reaction (how you calculate these is up to you) in a separate column in Excel before saving.

Best,
Lindsay.

Mkavscek

unread,
May 22, 2013, 9:21:06 AM5/22/13
to cobra-...@googlegroups.com
Thank you, it works now. Actually is very simple not  confused at all. Maybe because I am a biologist as well.
 
For list of reactions you can simply use:
 
reactionList= model.rxns
 
 
Best, Martin

Dne sreda, 22. maj 2013 13:40:44 UTC+2 je oseba Lindsay Edwards napisala:

Mkavscek

unread,
Aug 19, 2013, 7:16:34 AM8/19/13
to cobra-...@googlegroups.com
For all of you who would like to simply upload data form cobra to Cytoscape - there is now CYFluxWizToolbox available. You can get it here: http://www.charite.de/sysbio/people/koenig/software/cyfluxviz3/ 
 
There are also some examples and YouTube tutorial how to generate flux file.
 
Hope it helps!
Martin
Dne sreda, 22. maj 2013 15:21:06 UTC+2 je oseba Mkavscek napisala:

miche

unread,
Aug 19, 2013, 7:01:34 PM8/19/13
to cobra-...@googlegroups.com
CyFluxViz is a plugin to visualize networks in an elegant and quick way. 

Before I found out about the plugin, I was using Paint4Net or the COBRA's build in function to export to Cytoscape (outputNetworkCytoscape). 

Paint4Net is useful when the number of nodes and edges is not big (<100) and gives a quick outlook of the distribution of the main fluxes. However, nodes cannot be moved into a used-defined layout (limited to what I played with it).

Cytoscape requires to know how to use the software (import .sif first and then node attributes, .noa), eg for nodes labelling, filtering, layout etc. The plugins CySBML and CyFluxViz help in exporting/importing layouts and to easy the filtering tasks. The flaw of the Cytoscape import is that flux value is associated with nodes, and not with edges. In the SBML associated with CyFluxViz flux values are attributed to edges, but the information about subsystems is lost somewhere in the SBML file (and my skills do not allow me to find where). I believe this will be solved quickly by plugin's developers. 

I hope this helps someone to make pretty metabolic diagrams!

Best, 

M

Matthias König

unread,
Aug 20, 2013, 10:20:02 AM8/20/13
to cobra-...@googlegroups.com
Hallo Michele,

you should import the FluxDistributions via the FluxViz file formats. These can automatically be generated with the CyFluxViz Toolbox from the solutions of your FBA calculations (XML file formats).
Alternatively you can generate the VAL file format for CyFluxViz manually (text file with sbml_id\tflux in every row). CyFluxViz does internally the magic of generating the flux directions and the flux edges via using the information from the stoichiometric matrix in the SBML and the actual flux value.
Do not import the flux distributions as sif or noa or similar things, this will not work. I think there was some misunderstanding at some point.
Best watch the tutorial video to see a basic example for the workflow to get the fluxes from COBRA to CyFluxViz
http://www.youtube.com/watch?v=Ne0uLME_QN4

The subsystem information will be supported as soon as I find some free hours.

The best,
Matthias
---------------------------------------------------
Matthias König
Computational Systems Biochemistry
Institute of Biochemistry
Charité - Universitätsmedizin Berlin
http://www.charite.de/sysbio/people/koenig/
--------------------------------------------------- 

you should import the FluxDistributions via the Cy
Reply all
Reply to author
Forward
0 new messages