[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.1, Wed Mar 4 00:08:30 2009 UTC revision 1.2, Tue Apr 7 14:13:11 2009 UTC
# Line 388  Line 388 
388  sub LoadModels {  sub LoadModels {
389      my ($self,$model) = @_;      my ($self,$model) = @_;
390      my $sapling = $self->db();      my $sapling = $self->db();
391        ## TRS: Get hash of valid genome IDs.
392        my $genomeHash = $sapling->GenomeHash();
393      my $ModelList = $model->GetDBTable("MODEL LIST");      my $ModelList = $model->GetDBTable("MODEL LIST");
394      my $ModelStats = $model->GetDBTable("MODEL STATS");      my $ModelStats = $model->GetDBTable("MODEL STATS");
395      for (my $i=0; $i < $ModelStats->size(); $i++) {      for (my $i=0; $i < $ModelStats->size(); $i++) {
396          my $Row = $ModelStats->get_row($i);          my $Row = $ModelStats->get_row($i);
397          if (defined($Row) && defined($Row->{"Model ID"}->[0])) {          if (defined($Row) && defined($Row->{"Model ID"}->[0])) {
398              my @LoadingArray = ($Row->{"Model ID"}->[0],"","",0,0,0,"",0,0,0,0,0,0,0,0,0,0,0,0,"","",0,0,"",0,0);              my @LoadingArray = ($Row->{"Model ID"}->[0],"","",0,0,0,"",0,0,0,0,0,0,0,0,0,0,0,0,"","",0,0,"",0,0);
399                if (defined($Row->{"Genome ID"}->[0]) && $genomeHash->{$Row->{"Genome ID"}->[0]}) {
400              if (defined($Row->{"Organism name"}->[0])) {              if (defined($Row->{"Organism name"}->[0])) {
401                  $LoadingArray[1] = $Row->{"Organism name"}->[0];                  $LoadingArray[1] = $Row->{"Organism name"}->[0];
402              }              }
# Line 542  Line 545 
545          }          }
546      }      }
547  }  }
548    }
549    
550  1;  1;

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3