{"action":"opened","issue":{"url":"https://api.github.com/repos/opencobra/cobrapy/issues/399","repository_url":"https://api.github.com/repos/opencobra/cobrapy","labels_url":"https://api.github.com/repos/opencobra/cobrapy/issues/399/labels{/name}","comments_url":"https://api.github.com/repos/opencobra/cobrapy/issues/399/comments","events_url":"https://api.github.com/repos/opencobra/cobrapy/issues/399/events","html_url":"https://github.com/opencobra/cobrapy/issues/399","id":208408058,"number":399,"title":"SBML fbc v2 flux bounds handled incorrectly","user":{"login":"matthiaskoenig","id":900538,"avatar_url":"https://avatars.githubusercontent.com/u/900538?v=3","gravatar_id":"","url":"https://api.github.com/users/matthiaskoenig","html_url":"https://github.com/matthiaskoenig","followers_url":"https://api.github.com/users/matthiaskoenig/followers","following_url":"https://api.github.com/users/matthiaskoenig/following{/other_user}","gists_url":"https://api.github.com/users/matthiaskoenig/gists{/gist_id}","starred_url":"https://api.github.com/users/matthiaskoenig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthiaskoenig/subscriptions","organizations_url":"https://api.github.com/users/matthiaskoenig/orgs","repos_url":"https://api.github.com/users/matthiaskoenig/repos","events_url":"https://api.github.com/users/matthiaskoenig/events{/privacy}","received_events_url":"https://api.github.com/users/matthiaskoenig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-17T11:01:36Z","updated_at":"2017-02-17T11:01:36Z","closed_at":null,"body":"Hi all,\r\nflux bounds in the SBML fbc v2 package are **optional** on reactions. See the SBML package specification.\r\n\r\n> The optional attributes lowerFluxBound and upperFluxBound of type SIdRef are used to specify the lower and upper flux bounds for a Reaction flux.\r\n> fbc-20702 2X A SBML Reaction object may have the optional attributes fbc:lowerFluxBound and fbc:-\r\nupperFluxBound.\r\n\r\ncobrapy makes these fluxbounds required, the SBML reader does not read models in fbcv2 with missing flux bounds as a consequence. See for instance the following valid SBML example\r\n[diauxic_fba.txt](https://github.com/opencobra/cobrapy/files/782992/diauxic_fba.txt)\r\n(renamed to txt to upload)\r\n```\r\n# load model\r\nsource = 'diauxic_fba.xml'\r\nmfba = cobra.io.read_sbml_model(source)\r\n```\r\n```\r\n---------------------------------------------------------------------------\r\nCobraSBMLError                            Traceback (most recent call last)\r\n<ipython-input-2-ebe7c3f92d2c> in <module>()\r\n      1 # load model\r\n      2 source = './results/diauxic_fba.xml'\r\n----> 3 mfba = cobra.io.read_sbml_model(source)\r\n\r\n/home/mkoenig/git/cobrapy/cobra/io/sbml3.pyc in read_sbml_model(filename, number, **kwargs)\r\n    557     except Exception:\r\n    558         raise CobraSBMLError(\r\n--> 559             \"Something went wrong reading the model. You can get a detailed \"\r\n    560             \"report using the `cobra.io.sbml3.validate_sbml_model` function \"\r\n    561             \"or using the online validator at http://sbml.org/validator\")\r\n\r\nCobraSBMLError: Something went wrong reading the model. You can get a detailed report using the `cobra.io.sbml3.validate_sbml_model` function or using the online validator at http://sbml.org/validator\r\n```\r\nIf one does the internal cobra validation one gets the following output (this is a fbc v2 model and not fbc v1 model).\r\n```\r\ncobra.io.sbml3.validate_sbml_model(source)\r\n```\r\n```\r\n(None,\r\n {'SBML errors': [\"required attribute 'fbc:lowerFluxBound' not found in tag '{http://www.sbml.org/sbml/level3/version1/core}reaction' with id 'vX'\"],\r\n  'other': [],\r\n  'validator': [],\r\n  'warnings': []})\r\n```\r\n\r\nThe best \r\nMatthias"}}
{"actor":{"display_login":"matthiaskoenig"}}