ModelSEED / ModelSEED

Other
3 stars 2 forks source link

SBML Import for models, biochemistry #19

Open devoid opened 11 years ago

devoid commented 11 years ago

Import a model / biochemistry from an SBML file.

@samseaver I think you have existing code for this?

samseaver commented 11 years ago

My SBML code effectively reduces the SBML to a tab-separated file that in turn can be in imported. There are inherent difficulties with how individuals may differentially encode compartments and genes (the notes field is arbitrary, though COBRA uses it in a standard manner).

We can extend the SBML system to read the SBML and to highlight the known problems before import, allowing the user to apply some form of feedback, such as: "Compartment identifier not recognized, please input a recognized SEED compartment identifier: 'gwtruj' -->" and the user would type 'c' to say "Oh, that's cytoplasm" etc.

cshenry commented 11 years ago

We should meet and discuss. I'm thinking of a different process for model import that I believe will improve reliability..

The pipeline works something like this: SBML -> compound and reaction tables -> biochemistry document with only the compounds and reactions from the SBML file -> model with reactions from SBML file Note the lack of a merging of biochemistries. I'd like to separate this notion from the import... or at least, enable one to do an import without having to do a merge.

On Aug 20, 2012, at 10:18 AM, samseaver wrote:

My SBML code effectively reduces the SBML to a tab-separated file that in turn can be in imported. There are inherent difficulties with how individuals may differentially encode compartments and genes (the field is arbitrary, though COBRA uses it in a standard manner).

We can extend the SBML system to read the SBML and to highlight the known problems before import, allowing the user to apply some form of feedback, such as: "Compartment identifier not recognized, please input a recognized SEED compartment identifier: 'gwtruj' -->" and the user would type 'c' to say "Oh, that's cytoplasm" etc.

— Reply to this email directly or view it on GitHub.

devoid commented 11 years ago

@cshenry I agree that we should split up SBML -> biochemistry / model documents and the biochemistry merge functions.

@samseaver Still, it would be helpful to have your code for this; I know there are intricacies with SBML edge cases and some of the logic for biochemistry merge can be ported over or learned from. Can you either add the code to the /scriptsdirectory or email it to me?

cshenry commented 11 years ago

Absolutely. Sam's SBML parsing code can probably be integrated into the new system virtually without modification.

On Aug 21, 2012, at 10:20 AM, Scott Devoid wrote:

@cshenry I agree that we should split up SBML -> biochemistry / model documents and the biochemistry merge functions.

@samseaver Still, it would be helpful to have your code for this; I know there are intricacies with SBML edge cases and some of the logic for biochemistry merge can be ported over or learned from. Can you either add the code to the /scriptsdirectory or email it to me?

— Reply to this email directly or view it on GitHub.

samseaver commented 11 years ago

The main function that does this was in the old FIGMODEL.pm: parseSBMLToTable

There's a couple other functions involved:

traverse_sbml (a self-referential function for iterating through nested nodes) get_reaction_equation_sbml (translates an MS reaction into a SBML reaction) expand_sbml_reaction_participant (converts an SBML species into an SBML speciesReference)