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

Diff of /FigKernelScripts/make_SBML_model.pl

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

revision 1.1, Tue Jul 17 19:11:59 2007 UTC revision 1.6, Wed Nov 12 18:29:31 2008 UTC
# Line 3  Line 3 
3  #  #
4  #  #
5  use strict;  use strict;
6  use FIG;  use FIGV;
7  use Scenario;  use Scenario;
8    
9  my ($genome_id) = @ARGV;  my ($genome_id,$orgdir) = @ARGV;
10    
11  my $debug = 0;  my $debug = 0;
 my $fig = new FIG;  
12    
13  unless (scalar (@ARGV) == 1)  
14    unless (scalar (@ARGV) >= 1)
15  {  {
16      print STDERR "usage: make_SBML_model <genome_id>\n";      print STDERR "usage: make_SBML_model <genome_id>\n";
17      exit(-1);      exit(-1);
18  }  }
19  chomp $genome_id;  chomp $genome_id;
20    my $fig;
21    if($orgdir)
22    {
23        $fig = new FIGV($orgdir);
24    }
25    else
26    {
27        $fig = new FIGV;
28    }
29    Scenario::set_fig($fig,$genome_id);
30  print STDERR "Creating SBML model for genome $genome_id\n" if($debug);  print STDERR "Creating SBML model for genome $genome_id\n" if($debug);
31  print STDERR "\tStage 1 - Loading Scenarios, model inputs and biomass\n" if($debug);  print STDERR "\tStage 1 - Loading Scenarios, model inputs and biomass\n" if($debug);
32  my @scenarios = @{Scenario->get_genome_scenarios($genome_id,1)};  my @scenarios = @{Scenario->get_genome_scenarios($genome_id,1)};
33  my $filebase = "$FIG_Config::var/Models/$genome_id/Analysis/";  my $filebase = $fig->scenario_directory($genome_id)."/Analysis/";
34    
35  my %input_cpds;  my %input_cpds;
36  open(INPUTS,$filebase."inputs.txt")  open(INPUTS,$filebase."inputs.txt")
# Line 34  Line 44 
44  }  }
45  close(INPUTS);  close(INPUTS);
46  #we are going to load up the cofactor compounds into inputs as well  #we are going to load up the cofactor compounds into inputs as well
47  open(COFACT,$filebase."cofactors.txt")  open(COFACT,$filebase."secondary_compounds.txt")
48      or die("Failed to open ".$filebase."cofactors.txt");      or die("Failed to open ".$filebase."secondary_compounds.txt");
49  while(<COFACT>)  while(<COFACT>)
50  {  {
51      chomp;      chomp;
# Line 137  Line 147 
147      }      }
148  }  }
149    
150    #the ATP Synthase hack reaction
151    $core_metabolites{"C00009"} = 1;
152    $core_metabolites{"C00001"} = 1;
153    $core_metabolites{"C00008"} = 1;
154    $core_metabolites{"C00002"} = 1;
155    $reaction_reversible{"ATPSYN"} = 0;
156    $reaction_to_substrates{"ATPSYN"} = {};
157    $reaction_to_products{"ATPSYN"} = {};
158    $reaction_to_substrates{"ATPSYN"}->{"C00008"} = 1;
159    $reaction_to_substrates{"ATPSYN"}->{"C00009"} = 1;
160    $reaction_to_products{"ATPSYN"}->{"C00001"} = 1;
161    $reaction_to_products{"ATPSYN"}->{"C00002"} = 1;
162    $reaction_notes{"ATPSYN"} = {};
163    $reaction_notes{"ATPSYN"}->{"Manual Reaction:This fixes problems because we lack electron transport reactions."} = 1;
164    #end hack
165    
166  print STDERR "\tStage 1 - Complete\n" if($debug);  print STDERR "\tStage 1 - Complete\n" if($debug);
167    
168  print STDERR "\tStage 2 - Write SBML file\n" if($debug);  print STDERR "\tStage 2 - Write SBML file\n" if($debug);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.6

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3