[Bio] / Sprout / SproutLoad.pm Repository:
ViewVC logotype

Diff of /Sprout/SproutLoad.pm

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

revision 1.18, Wed Oct 12 03:17:58 2005 UTC revision 1.19, Thu Oct 20 09:34:09 2005 UTC
# Line 600  Line 600 
600    
601      Subsystem      Subsystem
602      Role      Role
603        RoleEC
604      SSCell      SSCell
605      ContainsFeature      ContainsFeature
606      IsGenomeOf      IsGenomeOf
# Line 624  Line 625 
625    
626  =back  =back
627    
 B<TO DO>  
   
 Generate RoleName table?  
   
628  =cut  =cut
629  #: Return Type $%;  #: Return Type $%;
630  sub LoadSubsystemData {  sub LoadSubsystemData {
# Line 647  Line 644 
644      # Create load objects for each of the tables we're loading.      # Create load objects for each of the tables we're loading.
645      my $loadSubsystem = $self->_TableLoader('Subsystem', $subsysCount);      my $loadSubsystem = $self->_TableLoader('Subsystem', $subsysCount);
646      my $loadRole = $self->_TableLoader('Role', $featureCount * 6);      my $loadRole = $self->_TableLoader('Role', $featureCount * 6);
647        my $loadRoleEC = $self->_TableLoader('RoleEC', $featureCount * 6);
648      my $loadSSCell = $self->_TableLoader('SSCell', $featureCount * $genomeCount);      my $loadSSCell = $self->_TableLoader('SSCell', $featureCount * $genomeCount);
649      my $loadContainsFeature = $self->_TableLoader('ContainsFeature', $featureCount * $subsysCount);      my $loadContainsFeature = $self->_TableLoader('ContainsFeature', $featureCount * $subsysCount);
650      my $loadIsGenomeOf = $self->_TableLoader('IsGenomeOf', $featureCount * $genomeCount);      my $loadIsGenomeOf = $self->_TableLoader('IsGenomeOf', $featureCount * $genomeCount);
# Line 697  Line 695 
695                  # Add the role.                  # Add the role.
696                  $loadRole->Put($roleID, $abbr);                  $loadRole->Put($roleID, $abbr);
697                  $roleData{$roleID} = 1;                  $roleData{$roleID} = 1;
698                    # Check for an EC number.
699                    if ($roleID =~ /\(EC ([^.]+\.[^.]+\.[^.]+\.[^)]+)\)\s*$/) {
700                        $loadRoleEC->Put($roleID, $1);
701                    }
702                  # Add the role's reactions.                  # Add the role's reactions.
703                  my $reactions = $reactionHash->{$roleID};                  my $reactions = $reactionHash->{$roleID};
704                  for my $reactionID (@{$reactions}) {                  for my $reactionID (@{$reactions}) {
# Line 1457  Line 1459 
1459      # Loop through the list, finishing the loads. Note that if the finish fails, we die      # Loop through the list, finishing the loads. Note that if the finish fails, we die
1460      # ignominiously. At some future point, we want to make the loads restartable.      # ignominiously. At some future point, we want to make the loads restartable.
1461      while (my $loader = pop @{$loadList}) {      while (my $loader = pop @{$loadList}) {
1462            # Trace the fact that we're cleaning up.
1463            my $relName = $loader->RelName;
1464            Trace("Finishing load for $relName.") if T(2);
1465          my $stats = $loader->Finish();          my $stats = $loader->Finish();
1466            if ($self->{options}->{dbLoad}) {
1467                # Here we want to use the load file just created to load the database.
1468                Trace("Loading relation $relName.") if T(2);
1469                my $newStats = $self->{sprout}->LoadUpdate(1, [$relName]);
1470                # Accumulate the statistics from the DB load.
1471                $stats->Accumulate($newStats);
1472            }
1473          $retVal->Accumulate($stats);          $retVal->Accumulate($stats);
         my $relName = $loader->RelName;  
1474          Trace("Statistics for $relName:\n" . $stats->Show()) if T(2);          Trace("Statistics for $relName:\n" . $stats->Show()) if T(2);
1475      }      }
1476      # Return the load statistics.      # Return the load statistics.

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3