[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.15, Mon Feb 28 20:27:17 2011 UTC
# Line 104  Line 104 
104    
105  =cut  =cut
106    
107    # hash of ubiquitous compounds.
108    use constant UBIQUITOUS => {
109        cpd00002 => 'ATP',
110        cpd00008 => 'ADP',
111        cpd00007 => 'Oxygen',
112        cpd00010 => 'CoenzymeA',
113        cpd00012 => 'PPi',
114        cpd15560 => 'Ubiquinone-8',
115        cpd15561 => 'Ubiquinol-8',
116        cpd15500 => 'Menaquinone',
117        cpd15499 => 'Menaquinol',
118        cpd00022 => 'Acetyl-CoA',
119        cpd00018 => 'AMP',
120        cpd00971 => 'Sodium',
121        cpd15352 => '2-Demethylmenaquinone',
122        cpd15353 => '2-Demethylmenaquinol'
123    
124    };
125    
126  sub LoadModelFiles {  sub LoadModelFiles {
127      # Get the parameters.      # Get the parameters.
128      my ($self) = @_;      my ($self) = @_;
# Line 115  Line 134 
134          # Get the next compound.          # Get the next compound.
135          my ($id, $label) = $self->ReadLine($ih);          my ($id, $label) = $self->ReadLine($ih);
136          # Create a compound record for it.          # Create a compound record for it.
137          $self->PutE(Compound => $id, label => $label);          $self->PutE(Compound => $id, label => $label, ubiquitous => (UBIQUITOUS->{$id} ? 1 : 0));
138      }      }
139      # Next, the compound-reactions relationship. We create the reactions here, too.      # Next, the compound-reactions relationship. We create the reactions here, too.
140      $ih = $self->CheckFile("$dir/CompoundReaction.txt", qw(CompoundID ReactionID      $ih = $self->CheckFile("$dir/CompoundReaction.txt", qw(CompoundID ReactionID
141                             Stoichiometry));                             Stoichiometry Cofactor));
142      while (! eof $ih) {      while (! eof $ih) {
143          # Get the next link.          # Get the next link.
144          my ($compound, $reaction, $stoich) = $self->ReadLine($ih);          my ($compound, $reaction, $stoich, $cofactor) = $self->ReadLine($ih);
145          # Insure the reaction exists.          # Insure the reaction exists.
146          $self->CreateReaction($reaction);          $self->CreateReaction($reaction);
147          # Check for product or substrate.          # Check for product or substrate.
# Line 135  Line 154 
154          }          }
155          # Connect the reaction to the compound.          # Connect the reaction to the compound.
156          $self->PutR(Involves => $reaction, $compound, product => $product,          $self->PutR(Involves => $reaction, $compound, product => $product,
157                      stoichiometry => $stoich);                      stoichiometry => $stoich, cofactor => $cofactor);
158      }      }
159      # Now we connect the reactions to roles.      # Now we connect the reactions to roles.
160      $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.15

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3