[Bio] / FigKernelScripts / make_MPS_model.pl Repository:
ViewVC logotype

Diff of /FigKernelScripts/make_MPS_model.pl

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

revision 1.4, Fri Jul 27 13:37:38 2007 UTC revision 1.5, Fri Jul 27 18:54:34 2007 UTC
# Line 66  Line 66 
66  }  }
67  close(BIOMASS);  close(BIOMASS);
68    
69    #$biomass_cpds{"C00002"} = 1;
70    
71  open(IN,$filebase."scenarios_valid.txt");  open(IN,$filebase."scenarios_valid.txt");
72  my @lines = <IN>;  my @lines = <IN>;
73  chomp @lines;  chomp @lines;
# Line 117  Line 119 
119           } keys %products;           } keys %products;
120      }      }
121  }  }
122    #the ATP Synthase hack reaction
123    $core_metabolites{"C00009"} = 1;
124    $core_metabolites{"C00001"} = 1;
125    $core_metabolites{"C00008"} = 1;
126    $core_metabolites{"C00002"} = 1;
127    $reaction_reversible{"ATPSYN"} = 0;
128    $reaction_to_substrates{"ATPSYN"} = {};
129    $reaction_to_products{"ATPSYN"} = {};
130    $reaction_to_substrates{"ATPSYN"}->{"C00008"} = 1;
131    $reaction_to_substrates{"ATPSYN"}->{"C00009"} = 1;
132    $reaction_to_products{"ATPSYN"}->{"C00001"} = 1;
133    $reaction_to_products{"ATPSYN"}->{"C00002"} = 1;
134    #end hack
135    
136  open(OUT,">".$filebase.$genome_id.".mps");  open(OUT,">".$filebase.$genome_id.".mps");
137    
138  print OUT "NAME          test\n";  print OUT "NAME          test\n";
# Line 177  Line 193 
193  #scenario reactions  #scenario reactions
194  foreach my $rid (sort keys %reaction_to_substrates)  foreach my $rid (sort keys %reaction_to_substrates)
195  {  {
196    
197      foreach (sort keys %{$reaction_to_substrates{$rid}})      foreach (sort keys %{$reaction_to_substrates{$rid}})
198      {      {
199            if(!defined $reaction_to_products{$rid}->{$_})
200            {
201          print OUT "    $rid    $_             -$reaction_to_substrates{$rid}->{$_}\n";          print OUT "    $rid    $_             -$reaction_to_substrates{$rid}->{$_}\n";
202      }      }
203        }
204      foreach (sort keys %{$reaction_to_products{$rid}})      foreach (sort keys %{$reaction_to_products{$rid}})
205      {      {
206            if(!defined $reaction_to_substrates{$rid}->{$_})
207            {
208          print OUT "    $rid    $_              $reaction_to_products{$rid}->{$_}\n";          print OUT "    $rid    $_              $reaction_to_products{$rid}->{$_}\n";
209      }      }
210        }
211      push @all_rids, $rid;      push @all_rids, $rid;
212      if($reaction_reversible{$rid})      if($reaction_reversible{$rid})
213      {      {

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3