opencobra / cobratoolbox

The COnstraint-Based Reconstruction and Analysis Toolbox. Documentation:
https://opencobra.github.io/cobratoolbox
Other
251 stars 313 forks source link

FindExcRxn returns non-Exc reactions #1990

Open kamoors opened 2 years ago

kamoors commented 2 years ago

I am currently manipulating a model to add a new compartment, so the structure looks like this:

[c] <-> [e] (new <->) [NewComp] (new <->) []

1) modified original EX reactions to be met[e] <-> met[NewComp] (instead of met[e] <-> []) 2) added a new EX reaction met[NewComp] <-> []

The problem is that for some when I add these reactions, SOME of the [e] <-> [NewComp] reactions appear in the output of FindExcRxns, despite them having [-1;1] stoichiometry. I double checked this both using the stoichiometry output of the FindMetsFromRxns function, and by inspecting model.S for those functions.

Does anyone have an idea what could be causing this and how to fix this?

I hereby confirm that I have:

kamoors commented 2 years ago

EDIT:

There was an issue with the naming scheme for the new reactions, however, it did not change the fact that some reactions that had -1;1 stoichiometry were returned.

rmtfleming commented 2 years ago

The code in this function is straightforward to read. e.g. it may exclude an objective reaction https://github.com/opencobra/cobratoolbox/blob/master/src/analysis/exploration/findExcRxns.m

use findSExRxnInd or findStoichConsistentSubset

The latter is the best option for detecting external reactions. See tutorials here: https://github.com/opencobra/COBRA.tutorials/tree/master/reconstruction/recon2FBAmodel

On Thu, 12 May 2022 at 15:16, kamoors @.***> wrote:

I am currently manipulating a model to add a new compartment, so the structure looks like this:

[c] <-> [e] (new <->) [NewComp] (new <->) []

  1. modified original EX reactions to be met[e] <-> met[NewComp] (instead of met[e] <-> [])
  2. added a new EX reaction met[NewComp] <-> []

The problem is that for some when I add these reactions, SOME of the [e] <-> [NewComp] reactions appear in the output of FindExcRxns, despite them having [-1;1] stoichiometry. I double checked this both using the stoichiometry output of the FindMetsFromRxns function, and by inspecting model.S for those functions.

Does anyone have an idea what could be causing this and how to fix this?

I hereby confirm that I have:

  • [ x] Tried to solve the issue on my own
  • [ x] Retried to run my code with the latest version of The COBRA Toolbox
  • [x ] Checked that a similar issue has not already been opened

— Reply to this email directly, view it on GitHub https://github.com/opencobra/cobratoolbox/issues/1990, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQMEOWUVBHZBCZNFPIGELDVJUHCHANCNFSM5VYNGHYQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

Mr. Ronan MT Fleming B.V.M.S. Dip. Math. Ph.D.

Associate Professor, School of Medicine, National University of Ireland, Galway. & 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

Peer-reviewed publications: https://goo.gl/FZPG23 Mobile: +353 852 109 806 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.)