ModelSEED / Model-SEED-core

The Model SEED is a tool for building, curating, and analyzing gonome-scale metabolic models. Visit the Model SEED homepage for installation instructions and full feature documentation.
http://bionet.mcs.anl.gov/index.php/Model_SEED_Homepage
Other
19 stars 10 forks source link

Special ids for protons and electrons #114

Open samseaver opened 12 years ago

samseaver commented 12 years ago

Considering that a new database schema is being developed, and the ids of compounds and reactions are currently a topic, I'd like to make a request that the ids for protons and electrons, as special and unique compounds in their own right, used to balance the charge of a reaction, should be "special".

ie instead of using whatever algorithm we decide on to generate a relatively unique id for these two, I recommend we stick to words: "proton" and "electron".

samseaver commented 12 years ago

I'd like to add to this by saying we need a reserved name for the abstract "Biomass" compound. An import of a model only recognizes a biomass reaction if it contains this compound.

devoid commented 11 years ago

There's nothing in the new system to do this now. This seems like a data-consistency problem more than anything. But if you want to add a set of functions to MS/Biochemistry.pm like:

$biochemistry->proton
$biochemistry->electron
$biochemistry->water

And have those figure out what that compound is based on the biochemistry, go for it. You'd do:

has proton => (
    is => 'rw', isa => 'ModelSEED::MS::Compound', printOrder => '-1'
    lazy => 1, builder => '_build_proton'
);

Then write your logic to find the compound in a function named _build_proton.