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

Diff of /Sprout/Sprout.pm

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

revision 1.125, Mon Mar 16 00:24:23 2009 UTC revision 1.126, Thu Apr 2 01:47:00 2009 UTC
# Line 746  Line 746 
746      return $retVal;      return $retVal;
747  }  }
748    
749    =head3 Cleanup
750    
751        $sprout->Cleanup();
752    
753    Release the internal cache structures to free up memory.
754    
755    =cut
756    
757    sub Cleanup {
758        # Get the parameters.
759        my ($self) = @_;
760        # Delete the stemmer.
761        delete $self->{stemmer};
762        # Delete the attribute database.
763        delete $self->{_ca};
764        # Delete the group hash.
765        delete $self->{groupHash};
766        # Is there a FIG object?
767        if (defined $self->{fig}) {
768            # Yes, clear its subsystem cache.
769            $self->{fig}->clear_subsystem_cache();
770        }
771    }
772    
773    
774  =head3 Stem  =head3 Stem
775    
# Line 1000  Line 1024 
1024  }  }
1025    
1026    
   
1027  =head3 PointLocation  =head3 PointLocation
1028    
1029      my $found = Sprout::PointLocation($location, $point);      my $found = Sprout::PointLocation($location, $point);
# Line 4066  Line 4089 
4089  sub GetSourceObject {  sub GetSourceObject {
4090      # Get the parameters.      # Get the parameters.
4091      my ($self) = @_;      my ($self) = @_;
4092      # Check to see if we already have a source object.      # Do we already have one?
4093      my $retVal = $self->{_fig};      my $retVal = $self->{fig};
4094      if (! defined $retVal) {      if (! defined $retVal) {
4095          # No, so create one.          # Create the object.
4096          require FIG;          require FIG;
4097          $retVal = FIG->new();          $retVal = FIG->new();
4098            Trace("FIG source object created for process $$.") if T(ERDBLoadGroup => 3);
4099            # Set up retries to prevent the lost-connection error when harvesting
4100            # the feature data.
4101            my $dbh = $retVal->db_handle();
4102            $dbh->set_retries(5);
4103            # Save it for other times.
4104            $self->{fig} = $retVal;
4105      }      }
4106      # Return the object.      # Return the object.
4107      return $retVal;      return $retVal;
# Line 4079  Line 4109 
4109    
4110  =head3 SectionList  =head3 SectionList
4111    
4112      my @sections = $erdb->SectionList();      my @sections = $erdb->SectionList($fig);
4113    
4114  Return a list of the names for the different data sections used when loading this database.  Return a list of the names for the different data sections used when loading this database.
4115  The default is a single string, in which case there is only one section representing the  The default is a single string, in which case there is only one section representing the
# Line 4092  Line 4122 
4122      my ($self, $source) = @_;      my ($self, $source) = @_;
4123      # Ask the BaseSproutLoader for a section list.      # Ask the BaseSproutLoader for a section list.
4124      require BaseSproutLoader;      require BaseSproutLoader;
4125      my @retVal = BaseSproutLoader::GetSectionList($self);      my @retVal = BaseSproutLoader::GetSectionList($self, $source);
4126      # Return the list.      # Return the list.
4127      return @retVal;      return @retVal;
4128  }  }
# Line 4153  Line 4183 
4183    
4184  sub LoadGroupList {  sub LoadGroupList {
4185      # Return the list.      # Return the list.
4186      return qw(Genome Subsystem Annotation Property Source Reaction Synonym Feature Drug);      return qw(Feature Subsystem Genome Annotation Property Source Reaction Synonym Drug);
4187  }  }
4188    
4189  =head3 LoadDirectory  =head3 LoadDirectory

Legend:
Removed from v.1.125  
changed lines
  Added in v.1.126

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3