kbase/KBaseFBAModeling — pull request #13 by mmundy42 (2014-09-15 22:27:43+00:00)
Title: Fix sbml model import

There are three fixes for importing SBML models: (1) do not save SBML data in the provenance section of workspace Model object because it can be too large, (2) do not add reactions that have no reactants or no products, and (3) when importing reactions change the '_' in IDs to '-'.

More details on (2): I had a SBML model that was coded incorrectly and the list of reactants and products was empty. There were also compounds flagged as boundary compounds in the SBML model and they were not imported. The exchange reactions that used the boundary compounds had an empty side in the imported reaction.

More details on (3). The '_' is used as a special character in the compartment suffix (for example, rxn10507_c0). If a reaction ID in the SBML model contains '_', regular expressions that deal with the suffix in commands that use the Model do not work correctly. For example, a reaction with ID 'EX_val_L_e' is parsed to 'EX' and if there is another reaction with the same prefix before the '_', there are duplicate reaction errors. My fix is to change the '_' to a '-' which works but leads to a usability problem as reaction IDs are changed by the import. For example, you do not want to name the biomass reaction with '_' in the SBML model.

Sorry for not creating a new branch for the previous pull request.