[Bio] / Sprout / ModelSaplingLoader.pm Repository:
ViewVC logotype

Diff of /Sprout/ModelSaplingLoader.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14, Sat Feb 26 19:05:32 2011 UTC revision 1.16, Tue Mar 1 22:26:34 2011 UTC
# Line 104  Line 104 
104    
105  =cut  =cut
106    
107    # hash of ubiquitous compounds.
108    use constant UBIQUITOUS => {
109        cpd00001 => 'OH-',
110        cpd00002 => 'ATP',
111        cpd00003 => 'Nicotinamideadeninedinucleotide',
112        cpd00004 => 'Nicotinamideadeninedinucleotide-reduced',
113        cpd00005 => 'Nicotinamideadeninedinucleotidephosphate-reduced',
114        cpd00006 => 'Nicotinamideadeninedinucleotidephosphate',
115        cpd00007 => 'Oxygen',
116        cpd00008 => 'ADP',
117        cpd00009 => 'Orthophosphoric acid',
118        cpd00010 => 'CoenzymeA',
119        cpd00011 => 'Carbon dioxide',
120        cpd00012 => 'PPi',
121        cpd00018 => 'AMP',
122        cpd00020 => 'Pyruvic Acid',
123        cpd00022 => 'Acetyl-CoA',
124        cpd00025 => 'Hydrogen peroxide',
125        cpd00067 => 'H+',
126        cpd00971 => 'Sodium',
127        cpd15352 => '2-Demethylmenaquinone',
128        cpd15353 => '2-Demethylmenaquinol',
129        cpd15499 => 'Menaquinol',
130        cpd15500 => 'Menaquinone',
131        cpd15560 => 'Ubiquinone-8',
132        cpd15561 => 'Ubiquinol-8',
133    };
134    
135  sub LoadModelFiles {  sub LoadModelFiles {
136      # Get the parameters.      # Get the parameters.
137      my ($self) = @_;      my ($self) = @_;
# Line 115  Line 143 
143          # Get the next compound.          # Get the next compound.
144          my ($id, $label) = $self->ReadLine($ih);          my ($id, $label) = $self->ReadLine($ih);
145          # Create a compound record for it.          # Create a compound record for it.
146          $self->PutE(Compound => $id, label => $label);          $self->PutE(Compound => $id, label => $label, ubiquitous => (UBIQUITOUS->{$id} ? 1 : 0));
147      }      }
148      # Next, the compound-reactions relationship. We create the reactions here, too.      # Next, the compound-reactions relationship. We create the reactions here, too.
149      $ih = $self->CheckFile("$dir/CompoundReaction.txt", qw(CompoundID ReactionID      $ih = $self->CheckFile("$dir/CompoundReaction.txt", qw(CompoundID ReactionID
150                             Stoichiometry));                             Stoichiometry Cofactor));
151      while (! eof $ih) {      while (! eof $ih) {
152          # Get the next link.          # Get the next link.
153          my ($compound, $reaction, $stoich) = $self->ReadLine($ih);          my ($compound, $reaction, $stoich, $cofactor) = $self->ReadLine($ih);
154          # Insure the reaction exists.          # Insure the reaction exists.
155          $self->CreateReaction($reaction);          $self->CreateReaction($reaction);
156          # Check for product or substrate.          # Check for product or substrate.
# Line 135  Line 163 
163          }          }
164          # Connect the reaction to the compound.          # Connect the reaction to the compound.
165          $self->PutR(Involves => $reaction, $compound, product => $product,          $self->PutR(Involves => $reaction, $compound, product => $product,
166                      stoichiometry => $stoich);                      stoichiometry => $stoich, cofactor => $cofactor);
167      }      }
168      # Now we connect the reactions to roles.      # Now we connect the reactions to roles.
169      $ih = $self->CheckFile("$dir/ReactionRole.txt", qw(ReactionID Role));      $ih = $self->CheckFile("$dir/ReactionRole.txt", qw(ReactionID Role));

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.16

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3