findFluxConsistentSubset results in ~2000 inconsistent rxns for Recon3D

107 views
Skip to first unread message

Maximilian Lularevic

unread,
Jun 10, 2020, 4:36:42 AM6/10/20
to COBRA Toolbox
Dear community,

I have been trying to extract a tissue-specific model using the mCADRE algorithm.
Part of the algorithm is checking for flux consistency using the findFluxConsistentSubset.m function.
I ran into some issue where the mCADRE algorithm would end up not removing any rxns from the model and it turns out the problem is, that the Recon3D model freshly downloaded from the BiGG database already contains ~2000 inconsistent fluxes from which in my particular case ~1100 are part of the coreRxn set as defined by rankReactions.m using the ubiquityScores (calculated based on expression data), the confidenceScores (user defined), and a protectedRxn List (user defined).

Has anybody encountered this issue before? As I am not 100% sure how the fastcc.m code evaluates the consistency of the fluxes I am slightly helpless on how to resolve the issue.

Any help is greatly appreciated!

Best,
Max

Ronan M.T. Fleming

unread,
Jun 10, 2020, 4:48:43 PM6/10/20
to COBRA Toolbox
Hi Max,

this zip file

https://www.vmh.life/files/reconstructions/Recon/3D.01/Recon3D_301.zip

contains these two files:

Recon3D_301.mat
Recon3DModel_301.mat

The first one is a reconstruction. The second one is a model ready for
flux balance analysis, at least.

This tutorial explains how to start with the former and end with the later.
https://github.com/opencobra/COBRA.tutorials/raw/master/reconstruction/recon2FBAmodel/tutorial_reconToFBAmodel.mlx

Regards,

Ronan
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "COBRA Toolbox" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbo...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-toolbox/eea1c53c-ce60-4a8c-a01a-874d858f83fao%40googlegroups.com.



--
--
Mr. Ronan MT Fleming B.V.M.S. Dip. Math. Ph.D.
----------------------------------------------------------------------------
Assistant Professor,
Division of Systems Biomedicine and Pharmacology,
Leiden Academic Centre for Drug Research,
Faculty of Science,
Leiden University.
https://www.universiteitleiden.nl/en/staffmembers/ronan-fleming
&
H2020 Project Coordinator,
Systems Medicine of Mitochondrial Parkinson’s Disease,
http://sysmedpd.eu
&
Adjunct Lecturer,
School of Medicine,
National University of Ireland, Galway.
----------------------------------------------------------------------------
Peer-reviewed publications: https://goo.gl/FZPG23
Mobile: +353 873 413 072
Skype: ronan.fleming
----------------------------------------------------------------------------
(This message is confidential and may contain privileged information.
It is intended for the named recipient only. If you receive it in
error please notify me and permanently delete the original message and
any copies.)

Maximilian Lularevic

unread,
Jun 12, 2020, 4:09:41 AM6/12/20
to COBRA Toolbox
Hi Ronan,

Thanks a lot for the swift reply and the zip file. The tutorial is fantastic.

However, even when using the "ready-to-use" model from Recon3DModel_301.mat (5835x10600) I get plenty of inconsistencies using:

param.modeFlag = 0;
param.method = 'null_fastcc';
param.epsilon = 1e-8;

[fluxConsistentMetBool, fluxConsistentRxnBool, fluxInConsistentMetBool, ...
    fluxInConsistentRxnBool, model] = findFluxConsistentSubset(Recon3DModel, param, 1);

The interesting bit is that when I change solvers the number of inconsistencies detected varies greatly (glpk = 306, gurobi = 1613, ibm_cplex 2079) with glpk being the most forgiving slover. Now, I am using the latest COBRA toolbox as it updates on initCobraToolbox every time. 

A colleague of mine had an old version of the toolbox on his directory (pre 3.0.0 but post 2.0.0). When he ran the code he got NO inconsistencies. This made us investigate what the actual problem/difference was. And it turns out the root cause is from optimizeCbModel.m and the way the LP problem is built. There was a drastic change in obtimizeCbModel jumping from version 2.0.0 to 3.0.0. We also tested the flux consistency with version 2.0.0 of the toolbox and it turns out this version also does NOT produce any inconsistencies (the inputs had to be adjusted as a structure for parameters does not work in version 2.0.0 for findFluxConsistentSubset).

Now I am really wondering whether, and if yes why, others get a flux consistent subset for the Recon3DModel with the latest COBRA toolbox. whatever I am trying to do (removing all paths, adding only the most necessary, etc.) nothing seems to be able to generate a flux-consistent Recon3DModel  model.

Any ideas what I can do to resolve this?

Thanks again for the great help!

Best,
Max  

Maximilian Lularevic

unread,
Jun 19, 2020, 3:39:21 AM6/19/20
to COBRA Toolbox
As a sanity check would it be possible for anyone out there in the community to test this real quick on their machine?
Take the Recon3D model as posted by Ronan above (Recon3DModel_301.mat) and run the following code:

param.modeFlag = 0;
param.method = 'null_fastcc';
param.epsilon = 1e-8;

[fluxConsistentMetBool, fluxConsistentRxnBool, fluxInConsistentMetBool, ...
    fluxInConsistentRxnBool, model] = findFluxConsistentSubset(Recon3DModel, param, 1);

Am I the only one getting inconsistencies with the latest toolbox and any of the available solvers (glpk, gurobi, ibm_cplex)?  
sum(fluxInConsistentRxnBool) > 0

Any input from you guys would help me a little bit to understand the mystery :)

Thanks a lot and have a great weekend everybody!

Max

On Wednesday, June 10, 2020 at 10:36:42 AM UTC+2, Maximilian Lularevic wrote:

Diana El Assal

unread,
Jul 6, 2020, 7:51:30 AM7/6/20
to cobra-...@googlegroups.com
Hi Max, 

When I use param.epsilon = 1e-4 (as per default), I get the following message: fastcc.m: The input model is entirely flux consistent.\n

Best wishes, 

Diana

param.modeFlag = 0;

param.method = 'null_fastcc';

param.epsilon = 1e-4;

 

[fluxConsistentMetBool, fluxConsistentRxnBool, fluxInConsistentMetBool, ...

    fluxInConsistentRxnBool, model] = findFluxConsistentSubset(Recon3DModel, param, 1);


--

---
You received this message because you are subscribed to the Google Groups "COBRA Toolbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbo...@googlegroups.com.


--

                                                                                                

Diana Charles Jordan-El Assal, PhD

Laboratory of Algal, Synthetic, and Systems Biology
Post-Doctoral Associate
Division of Science and Math

Center for Genomics and Systems Biology
New York University Abu Dhabi
P.O. Box 129188, Abu Dhabi, UAE
Email:dc...@nyu.edu 
                                                                             

Maximilian Lularevic

unread,
Jul 7, 2020, 4:44:16 AM7/7/20
to COBRA Toolbox
Hi Diana,

Thanks a lot for running the code! Much appreciated.

I still seem to have troubles with it and haven't figured the issue out will let you guys know though in case I do.

Max
To unsubscribe from this group and stop receiving emails from it, send an email to cobra-...@googlegroups.com.


--

                                                                                                

Diana Charles Jordan-El Assal, PhD

Laboratory of Algal, Synthetic, and Systems Biology
Post-Doctoral Associate
Division of Science and Math

Center for Genomics and Systems Biology
New York University Abu Dhabi
P.O. Box 129188, Abu Dhabi, UAE
Email...@nyu.edu 
                                                                             

Ronan M.T. Fleming

unread,
Jul 7, 2020, 5:00:30 PM7/7/20
to COBRA Toolbox
Hi All,
it is important to follow the sequence of steps in this tutorial to
obtain a stoichiometrically and flux consistent model from a given
reconstruction. They are exactly how Recon3D model was obtained.
https://opencobra.github.io/cobratoolbox/latest/tutorials/tutorialReconToFBAmodel.html
However, please note that the underlying optimisation problems are
discrete in nature and approximately solved by continuous optimisation
algorithms
https://github.com/opencobra/cobratoolbox/blob/develop/src/base/solvers/cardOpt/sparseLP/optimizeCardinality.m
There is a whole paper going into the details of this that was
reviewed at the time the Recon3 paper was reviewed and the main
critique of the reviewers was that there were insufficient
applications, despite the fact that the code developed
(https://github.com/opencobra/cobratoolbox/blob/develop/src/base/solvers/cardOpt/sparseLP/optimizeCardinality.m
etc)
and shared at the time of the release of Recon3 was essential for
generating Recon3Dmodel. I have since been working to satisfy the
reviewers concerns but it meant a delay to the whole paper.
Regards,
Ronan
> To unsubscribe from this group and stop receiving emails from it, send an email to cobra-toolbo...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/cobra-toolbox/c506a44d-7401-4565-9749-faa474785136o%40googlegroups.com.



--
--
Mr. Ronan MT Fleming B.V.M.S. Dip. Math. Ph.D.
----------------------------------------------------------------------------
Assistant Professor,
Division of Systems Biomedicine and Pharmacology,
Leiden Academic Centre for Drug Research,
Faculty of Science,
Leiden University.
https://www.universiteitleiden.nl/en/staffmembers/ronan-fleming
&
H2020 Project Coordinator,
Systems Medicine of Mitochondrial Parkinson’s Disease,
http://sysmedpd.eu
&
Adjunct Lecturer,
School of Medicine,
National University of Ireland, Galway.
----------------------------------------------------------------------------
Peer-reviewed publications: https://goo.gl/FZPG23
Mobile: +353 873 413 072
Skype: ronan.fleming
----------------------------------------------------------------------------
Reply all
Reply to author
Forward
0 new messages