[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.26, Mon Jan 30 21:57:02 2006 UTC revision 1.30, Sun Mar 26 12:35:21 2006 UTC
# Line 250  Line 250 
250              $loadGenome->Add("genomeIn");              $loadGenome->Add("genomeIn");
251              # The access code comes in via the genome hash.              # The access code comes in via the genome hash.
252              my $accessCode = $genomeHash->{$genomeID};              my $accessCode = $genomeHash->{$genomeID};
253              # Get the genus, species, and strain from the scientific name. Note that we append              # Get the genus, species, and strain from the scientific name.
             # the genome ID to the strain. In some cases this is the totality of the strain name.  
254              my ($genus, $species, @extraData) = split / /, $self->{fig}->genus_species($genomeID);              my ($genus, $species, @extraData) = split / /, $self->{fig}->genus_species($genomeID);
255              my $extra = join " ", @extraData, "[$genomeID]";              my $extra = join " ", @extraData;
256              # Get the full taxonomy.              # Get the full taxonomy.
257              my $taxonomy = $fig->taxonomy_of($genomeID);              my $taxonomy = $fig->taxonomy_of($genomeID);
258              # Output the genome record.              # Output the genome record.
# Line 436  Line 435 
435      FeatureTranslation      FeatureTranslation
436      FeatureUpstream      FeatureUpstream
437      IsLocatedIn      IsLocatedIn
438        HasFeature
439    
440  =over 4  =over 4
441    
# Line 461  Line 461 
461      my $loadFeatureLink = $self->_TableLoader('FeatureLink');      my $loadFeatureLink = $self->_TableLoader('FeatureLink');
462      my $loadFeatureTranslation = $self->_TableLoader('FeatureTranslation');      my $loadFeatureTranslation = $self->_TableLoader('FeatureTranslation');
463      my $loadFeatureUpstream = $self->_TableLoader('FeatureUpstream');      my $loadFeatureUpstream = $self->_TableLoader('FeatureUpstream');
464        my $loadHasFeature = $self->_TableLoader('HasFeature');
465      # Get the maximum sequence size. We need this later for splitting up the      # Get the maximum sequence size. We need this later for splitting up the
466      # locations.      # locations.
467      my $chunkSize = $self->{sprout}->MaxSegment();      my $chunkSize = $self->{sprout}->MaxSegment();
# Line 481  Line 482 
482                  my ($featureID, $locations, undef, $type) = @{$featureData};                  my ($featureID, $locations, undef, $type) = @{$featureData};
483                  # Create the feature record.                  # Create the feature record.
484                  $loadFeature->Put($featureID, 1, $type);                  $loadFeature->Put($featureID, 1, $type);
485                    # Link it to the parent genome.
486                    $loadHasFeature->Put($genomeID, $featureID, $type);
487                  # Create the aliases.                  # Create the aliases.
488                  for my $alias ($fig->feature_aliases($featureID)) {                  for my $alias ($fig->feature_aliases($featureID)) {
489                      $loadFeatureAlias->Put($featureID, $alias);                      $loadFeatureAlias->Put($featureID, $alias);
# Line 801  Line 804 
804                  # Connect the subset to the subsystem.                  # Connect the subset to the subsystem.
805                  $loadHasRoleSubset->Put($subsysID, $actualID);                  $loadHasRoleSubset->Put($subsysID, $actualID);
806                  # Connect the subset to its roles.                  # Connect the subset to its roles.
807                  my @roles = $sub->get_subset($subsetID);                  my @roles = $sub->get_subsetC_roles($subsetID);
808                  for my $roleID (@roles) {                  for my $roleID (@roles) {
809                      $loadConsistsOfRoles->Put($actualID, $roleID);                      $loadConsistsOfRoles->Put($actualID, $roleID);
810                  }                  }
# Line 1460  Line 1463 
1463              # Here we really need to finish.              # Here we really need to finish.
1464              Trace("Finishing $relName.") if T(2);              Trace("Finishing $relName.") if T(2);
1465              my $stats = $loader->Finish();              my $stats = $loader->Finish();
1466              if ($self->{options}->{dbLoad} && ! $loader->Ignore) {              if ($self->{options}->{dbLoad}) {
1467                  # Here we want to use the load file just created to load the database.                  # Here we want to use the load file just created to load the database.
1468                  Trace("Loading relation $relName.") if T(2);                  Trace("Loading relation $relName.") if T(2);
1469                  my $newStats = $self->{sprout}->LoadUpdate(1, [$relName]);                  my $newStats = $self->{sprout}->LoadUpdate(1, [$relName]);

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.30

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3