kbase/KBaseFBAModeling — pull request #10 by samseaver (2014-08-22 20:54:51+00:00)
Title: Updating use of template reactions to account for possible duplicates

The PlantSEED ModelTemplate has some template reactions which are conditional and universal and yet share the same biochemical reaction. It's useful to see if a 'hit" is made in the annotation for a conditional reaction and yet, if it's important, to have it added as a universal reaction anyway.

However, the code as it stands will over-write duplicate reactions within the newly created model, as it should, but this potentially removes modelReactionProteins if they'd already been created.

The new code checks to see if a modelreaction id is already present, and doesn't attempt to create a new reaction otherwise, but it will still add any new proteins if it finds that the current modelreaction has none.