[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.72, Sat Oct 14 18:12:14 2006 UTC revision 1.73, Fri Oct 20 20:42:56 2006 UTC
# Line 619  Line 619 
619      return $retVal;      return $retVal;
620  }  }
 =head3 LoadBBHData  
 C<< my $stats = $spl->LoadBBHData(); >>  
 Load the bidirectional best hit data from FIG into Sprout.  
 Sprout does not store information on similarities. Instead, it has only the  
 bi-directional best hits. Even so, the BBH table is one of the largest in  
 the database.  
 The following relations are loaded by this method.  
 =over 4  
 =item RETURNS  
 Returns a statistics object for the loads.  
 #: Return Type $%;  
 sub LoadBBHData {  
     # Get this object instance.  
     my ($self) = @_;  
     # Get the FIG object.  
     my $fig = $self->{fig};  
     # Get the table of genome IDs.  
     my $genomeHash = $self->{genomes};  
     # Create load objects for each of the tables we're loading.  
     my $loadIsBidirectionalBestHitOf = $self->_TableLoader('IsBidirectionalBestHitOf');  
     if ($self->{options}->{loadOnly}) {  
         Trace("Loading from existing files.") if T(2);  
     } else {  
         Trace("Generating BBH data.") if T(2);  
         # Now we loop through the genomes, generating the data for each one.  
         for my $genomeID (sort keys %{$genomeHash}) {  
             Trace("Processing features for genome $genomeID.") if T(3);  
             # Get the feature list for this genome.  
             my $features = $fig->all_features_detailed($genomeID);  
             # Count the BBHs we find.  
             my $bbhCount = 0;  
             # Loop through the features.  
             for my $featureData (@{$features}) {  
                 # Split the tuple.  
                 my ($featureID, $locations, $aliases, $type) = @{$featureData};  
                 # Get the bi-directional best hits.  
                 my @bbhList = $fig->bbhs($featureID);  
                 for my $bbhEntry (@bbhList) {  
                     # Get the target feature ID and the score.  
                     my ($targetID, $score) = @{$bbhEntry};  
                     # Check the target feature's genome.  
                     my $targetGenomeID = $fig->genome_of($targetID);  
                     # Only proceed if it's one of our genomes.  
                     if ($genomeHash->{$targetGenomeID}) {  
                         $loadIsBidirectionalBestHitOf->Put($featureID, $targetID, $targetGenomeID,  
             Trace("$bbhCount BBHs found for $genomeID.") if T(3);  
     # Finish the loads.  
     my $retVal = $self->_FinishAll();  
     return $retVal;  
622  =head3 LoadSubsystemData  =head3 LoadSubsystemData
624  C<< my $stats = $spl->LoadSubsystemData(); >>  C<< my $stats = $spl->LoadSubsystemData(); >>

Removed from v.1.72  
changed lines
  Added in v.1.73

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3