Code Monkey home page Code Monkey logo

Comments (2)

bheavner avatar bheavner commented on June 14, 2024

I believe this is the same as #3584901 on the old sourceforge site. I had reported that as:

"When attempting to load the iAZ900 model of yeast (which you can get at https://www.biomedcentral.com/content/supplementary/1752-0509-4-178-s3.xml), ReadCbModel gives the following error:

Too many outputs requested. Most likely cause is missing [] around left hand side that has a comma separated list expansion.

Error in convertSBMLToCobra (line 122)
parameters = modelSBML.reaction(i).kineticLaw.parameter;

This error has been reported on the google group a few times, too.

Digging into it, convertSBMLToCobra uses isfield(modelSBML.reaction(i).kineticLaw, 'parameter'), which returns true even if there's no modelSBML.reaction(i).kineticLaw.parameter field (I think this is because there is a modelSBML.parameter field).

To fix this, the loop beginning at line 122 with "if isfield" can be replaced with the following loop:
if isempty(modelSBML.reaction(i).kineticLaw) % added by BH
parameters = []; %added by BH
else
parameters = modelSBML.reaction(i).kineticLaw.parameter; % added by BH
end % added by BH

I have tested this with the iND750 model and the Yeast 5 model, and readCbModel still works for these models. There may be a better solution, though. (and yes, python is one of them)

Daniel had added the try/catch statements around the loop in response to this bug. Does the try/catch not work (I haven't tested it).

-b

from cobratoolbox.

danielhyduke avatar danielhyduke commented on June 14, 2024

I'm guessing that it might be due to the bug possibly being present in the zip file vs the repository. After we take care of #13, I'll push out another zip file for download and then we can use @bheavner's CORBAVersion command to sort out future issues.

from cobratoolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.