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

Diff of /FigKernelScripts/check_model.pl

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

revision 1.1, Tue Jul 17 16:15:00 2007 UTC revision 1.2, Fri Jul 20 15:01:42 2007 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;
12    
13  unless (scalar (@ARGV) == 1)  unless (scalar (@ARGV) >= 1)
14  {  {
15      print STDERR "usage: check_model <genome_id>\n";      print STDERR "usage: check_model <genome_id>\n";
16      exit(-1);      exit(-1);
17  }  }
18  chomp $genome_id;  chomp $genome_id;
19    my $fig;
20    if($orgdir)
21    {
22        $fig = new FIGV($orgdir);
23    }
24    else
25    {
26        $fig = new FIGV;
27    }
28    Scenario::set_fig($fig);
29  print STDERR "Running check_model on genome $genome_id\n" if($debug);  print STDERR "Running check_model on genome $genome_id\n" if($debug);
30  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);
31  my @scenarios = @{Scenario->get_genome_scenarios($genome_id,0)};  my @scenarios = @{Scenario->get_genome_scenarios($genome_id,0)};
32  my $filebase = "$FIG_Config::var/Models/$genome_id/Analysis/";  my $filebase = $fig->model_directory($genome_id)."/Analysis/";
33    
34  my %scenarios_used;  my %scenarios_used;
35  my %all_substrates;  my %all_substrates;
# Line 216  Line 226 
226  }  }
227  close(RESULTS_INPUT);  close(RESULTS_INPUT);
228    
229    #Lets do another information test. For the valid scenarios, what aren't being used for biomass or by another scenario?
230    # Basically this is the idea that we have a valid scenario which is a dead-end because there are no other valid scenarios that use its products
231    #my %valid_compounds;
232    
233    #foreach my $scenario (@scenarios)
234    #{
235    #    if($scenarios_used{$scenario->get_scenario_name()})
236    #    {
237    #       map {$valid_compounds{$_} = 1} @{$scenario->get_substrates()};
238    #       map {$valid_compounds{$_} = 1} @{$scenario->get_products()};
239    #    }
240    #}
241    
242  print STDERR "\tStage 2 - Complete! Results in info_inputs.txt, info_biomass.txt and info_scenarios.txt\n" if($debug);  print STDERR "\tStage 2 - Complete! Results in info_inputs.txt, info_biomass.txt and info_scenarios.txt\n" if($debug);
243    

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3