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

Diff of /Sprout/SaplingGenomeLoader.pm

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

revision 1.11, Thu May 12 20:00:43 2011 UTC revision 1.12, Tue Jul 12 18:41:53 2011 UTC
# Line 72  Line 72 
72      # Create the loader object.      # Create the loader object.
73      my $loaderObject = SaplingGenomeLoader->new($sap, $genome, $directory);      my $loaderObject = SaplingGenomeLoader->new($sap, $genome, $directory);
74      # Load the contigs.      # Load the contigs.
75      Trace("Loading contigs for $genome.") if T(2);      Trace("Loading contigs for $genome.") if T(SaplingDataLoader => 2);
76      $loaderObject->LoadContigs();      $loaderObject->LoadContigs();
77      # Load the features.      # Load the features.
78      Trace("Loading features for $genome.") if T(2);      Trace("Loading features for $genome.") if T(SaplingDataLoader => 2);
79      $loaderObject->LoadFeatures();      $loaderObject->LoadFeatures();
80      # Check for annotation history. If we have it, load the history records into the      # Check for annotation history. If we have it, load the history records into the
81      # database.      # database.
82      if (-f "$directory/annotations") {      if (-f "$directory/annotations") {
83          Trace("Processing annotations.") if T(3);          Trace("Processing annotations.") if T(SaplingDataLoader => 3);
84          $loaderObject->LoadAnnotations("$directory/annotations");          $loaderObject->LoadAnnotations("$directory/annotations");
85      }      }
86      # Load the subsystem bindings.      # Load the subsystem bindings.
87      Trace("Loading subsystems for $genome.") if T(2);      Trace("Loading subsystems for $genome.") if T(SaplingDataLoader => 2);
88      $loaderObject->LoadSubsystems();      $loaderObject->LoadSubsystems();
89      # Create the Genome record and taxonomy information.      # Create the Genome record and taxonomy information.
90      Trace("Creating root for $genome.") if T(2);      Trace("Creating root for $genome.") if T(SaplingDataLoader => 2);
91      $loaderObject->CreateGenome();      $loaderObject->CreateGenome();
92      # Return the statistics.      # Return the statistics.
93      return $loaderObject->{stats};      return $loaderObject->{stats};
# Line 419  Line 419 
419      # Get the parameters.      # Get the parameters.
420      my ($self) = @_;      my ($self) = @_;
421      # Read in the functional assignments.      # Read in the functional assignments.
422      Trace("Reading functional assignments.") if T(3);      Trace("Reading functional assignments.") if T(SaplingDataLoader => 3);
423      my $assignHash = $self->ReadAssignments();      my $assignHash = $self->ReadAssignments();
424      $self->{assignHash} = $assignHash;      $self->{assignHash} = $assignHash;
425      # Get the directory of feature types.      # Get the directory of feature types.
# Line 428  Line 428 
428      # Check for protein sequences. If we have some, load them into a hash.      # Check for protein sequences. If we have some, load them into a hash.
429      my $protHash = {};      my $protHash = {};
430      if (-f "$featureDir/peg/fasta") {      if (-f "$featureDir/peg/fasta") {
431          Trace("Processing protein sequences.") if T(3);          Trace("Processing protein sequences.") if T(SaplingDataLoader => 3);
432          $protHash = $self->LoadProteinData("$featureDir/peg/fasta");          $protHash = $self->LoadProteinData("$featureDir/peg/fasta");
433      }      }
434      # Create the feature records for the types found.      # Create the feature records for the types found.
# Line 590  Line 590 
590              }              }
591          }          }
592          # Open the main file for input.          # Open the main file for input.
593          Trace("Reading features from $fileName.") if T(3);          Trace("Reading features from $fileName.") if T(SaplingDataLoader => 3);
594          my $ih = Open(undef, "<$fileName");          my $ih = Open(undef, "<$fileName");
595          while (! eof $ih) {          while (! eof $ih) {
596              # Read this feature's information.              # Read this feature's information.
# Line 797  Line 797 
797      while (! eof $ih) {      while (! eof $ih) {
798          # Get this subsystem.          # Get this subsystem.
799          my ($subsystem, $variant) = Tracer::GetLine($ih);          my ($subsystem, $variant) = Tracer::GetLine($ih);
800          Trace("Processing subsystem $subsystem variant $variant.") if T(3);          Trace("Processing subsystem $subsystem variant $variant.") if T(SaplingDataLoader => 3);
801          # Normalize the subsystem name.          # Normalize the subsystem name.
802          $subsystem = $sap->SubsystemID($subsystem);          $subsystem = $sap->SubsystemID($subsystem);
803          # Compute this subsystem's MD5.          # Compute this subsystem's MD5.

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3