ModelSEED/Model-SEED-core — Issue #88: Sharing models from different private biochemistry databases
Author: samseaver
Created: 2011-11-08 18:14:08+00:00
State: open

This is going to be a long description of how I'd like to approach this issue, I don't know how straightforward it would be, but I'm writing it here for others to see:

So, currently, when you print and load models, the resulting model file only stores the reaction id, and it is assumed that when you load the model using the same file, that the same reaction will be present in the database. If the reaction was generated as a new reaction from a previous model import, then its temporary id is also assumed to be in the database.

One of the visions we had was to enable people to share models, which would entail sending the model file, and its biomass file, to other people to load into their database. However, they may not already have the reactions necessary in their private database, so what to do?

First of all, the printmodel function should probably include two new fiels, EQUATION and TEMP (1/0), so any reactions that are "new" (TEMP=1, and their Equation doesn't match any in the database) can be created on the basis of their EQUATION (much like the way importmodel works). Note that a new temp id may have to be created, but if the user were to send back a modified version of the model, this new id will be ignored because we use the equation for matching.

Secondly, the printed model may contain compounds that are not found in the database, so we'll have to prepend the list of compounds much like the list of reactions in the same model file. Only compounds with a temp id are added if they are present in "new" reactions, and they are added to the database if there is no match in the database for their names, this way, if a "new" reaction is generated, then any of its "new" compounds will already be present. Again, new temp ids may have to be generated for the compounds, but this should not create a conflict if we use only the names for matching.