[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.2, Sun Aug 14 23:47:16 2005 UTC revision 1.3, Sun Aug 14 23:53:25 2005 UTC
# Line 92  Line 92 
92          # Here we want all the complete genomes and an access code of 1.          # Here we want all the complete genomes and an access code of 1.
93          my @genomeList = $fig->genomes(1);          my @genomeList = $fig->genomes(1);
94          %genomes = map { $_ => 1 } @genomeList;          %genomes = map { $_ => 1 } @genomeList;
95      } elsif (ref $genomeFile eq 'HASH') {      } else {
96            my $type = ref $genomeFile;
97            Trace("Genome file parameter type is \"$type\".") if T(3);
98            if ($type eq 'HASH') {
99          # Here the user specified a hash of genome IDs to access codes, which is          # Here the user specified a hash of genome IDs to access codes, which is
100          # exactly what we want.          # exactly what we want.
101          %genomes = %{$genomeFile};          %genomes = %{$genomeFile};
102      } elsif (ref $genomeFile eq 'SCALAR') {          } elsif (! $type || $type eq 'SCALAR' ) {
103          # The caller specified a file, so read the genomes from the file.              # The caller specified a file, so read the genomes from the file. (Note
104                # that some PERLs return an empty string rather than SCALAR.)
105          my @genomeList = Tracer::GetFile($genomeFile);          my @genomeList = Tracer::GetFile($genomeFile);
106          if (! @genomeList) {          if (! @genomeList) {
107              # It's an error if the genome file is empty or not found.              # It's an error if the genome file is empty or not found.
# Line 114  Line 118 
118              }              }
119          }          }
120      } else {      } else {
         my $type = ref $genomeFile;  
121          Confess("Invalid genome parameter ($type) in SproutLoad constructor.");          Confess("Invalid genome parameter ($type) in SproutLoad constructor.");
122      }      }
123        }
124      # Load the list of trusted subsystems.      # Load the list of trusted subsystems.
125      my %subsystems = ();      my %subsystems = ();
126      if (! defined $subsysFile || $subsysFile eq '') {      if (! defined $subsysFile || $subsysFile eq '') {

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3