ModelSEED/ModelSEED — pull request #159 by devoid (2012-11-19 17:49:44+00:00)
Title: Reserved Proton ID?

I know this goes against the whole point of UUIDs, but protons are a special case. Consider this code from MS::Reaction::createEquation():

```
for (my $i=0; $i < @{$rgt}; $i++) {
my $id = $rgt->[$i]->compound_uuid();
if ($args->{format} eq "name" || $args->{format} eq "id") {
my $function = $args->{format};
$id = $rgt->[$i]->compound()->$function();
} elsif ($args->{format} ne "uuid") {
$id = $rgt->[$i]->compound()->getAlias($args->{format});
}
if (!defined($rgtHash->{$id}->{$rgt->[$i]->compartment()->id()})) {
$rgtHash->{$id}->{$rgt->[$i]->compartment()->id()} = 0;
}
$rgtHash->{$id}->{$rgt->[$i]->compartment()->id()} += $rgt->[$i]->coefficient();
}
```

For reaction matching, I have to exclude protons which have already been listed as a reagent. I can't use the compound's uuid to say `next if $rgt->[$i]->compound_uuid() eq $proton_uuid` for my specific case, simply because the proton's uuid is going to be different for every biochemistry.

Because we're using KEGG and MetaCyc, we can safely use actual well-known names/identifiers such as "H+" but if anyone is attempting to merge their own local biochemistries, I can make no guarantee that the code would recognize protons and properly match reactions, thoughts?

It crossed my mind that we could check the biochemistry, before saving it, for known identifiers/names such as "H+" etc and then inform the user that we're assuming this is the proton.