addRatioReaction bug after "Thomas Pfau 09/18 -> Changed to use addCOBRAConstraint"

19 views
Skip to first unread message

Jorge Comas

unread,
Jul 6, 2020, 10:34:16 AM7/6/20
to COBRA Toolbox
Hi everyone,

I have the following problem: 

working with the attached model from Cheung et al. (2013,  ) I introduce a ratio reaction with 

>> model = addRatioReaction(model, {'NO3_tx', 'NH4_tx'},[1, 1]); 

then after running 

>> optimizeCbModel(model,'min','one') 
 
I get the following errors: 

Error using horzcat
Dimensions of arrays being concatenated are not consistent.

Error in optimizeCbModel (line 313)
        LPproblem2.A = [LPproblem.A sparse(nMets,2*nRxns);

As far as I can tell there is a dimensions problem: where LPproblem.A is [2619x2769 double] and nMets is 2618, and nRxns is 2769

This error does not occur with the original version of the function addRatioReaction.

Has anyone else experienced something of the sort?

Thanks for your time

Jorge


tpj12252-sup-0002-datas2.sbml
COBRAconfigReport.log

Thomas Pfau

unread,
Jul 6, 2020, 3:55:24 PM7/6/20
to cobra-...@googlegroups.com
Hi,

Thanks for finding this bug. When we changed from a single A matrix to distinct S and C matrices for metabolites/other constraints in the model structure this was simply missed.
I have put in a pull request ( https://github.com/opencobra/cobratoolbox/pull/1600 ) to address the issue, but it can take some time for that to be integrated into the toolbox. Feel free to locally make the respective changes to your toolbox (it's essentially just two lines that need to be adapted).

Best

Thomas
--

---
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/931e4c01-d017-42fa-8a27-1a584544f599o%40googlegroups.com.


Reply all
Reply to author
Forward
0 new messages