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

Diff of /Sprout/FeatureSproutLoader.pm

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

revision 1.9, Thu Apr 2 01:42:00 2009 UTC revision 1.10, Thu May 28 18:10:03 2009 UTC
# Line 29  Line 29 
29      use FFs;      use FFs;
30      use SOAP::Lite;      use SOAP::Lite;
31      use Time::HiRes;      use Time::HiRes;
32        use LoaderUtils;
33      use base 'BaseSproutLoader';      use base 'BaseSproutLoader';
34    
35  =head1 Sprout Feature Load Group Class  =head1 Sprout Feature Load Group Class
# Line 114  Line 115 
115          my $sqlite_db = "/home/mkubal/Temp/Ontology/ontology.sqlite";          my $sqlite_db = "/home/mkubal/Temp/Ontology/ontology.sqlite";
116          my $ontology_dbmaster = DBMaster->new(-database => $sqlite_db, -backend => 'SQLite');          my $ontology_dbmaster = DBMaster->new(-database => $sqlite_db, -backend => 'SQLite');
117          # This is our master hash of FIG IDs to aliases.          # This is our master hash of FIG IDs to aliases.
118          my %aliasMasterHash;          my $aliasMasterHash = LoaderUtils::ReadAliasFile($loadDirectory, $genomeID) || {};
         # Open this genome's alias file. The alias files are created by the AliasCrunch  
         # script.  
         my $aliasFile = "$loadDirectory/alias.$genomeID.tbl";  
         if (! -f $aliasFile) {  
             Trace("No aliases found for $genomeID.") if T(ERDBLoadGroup => 1);  
         } else {  
             my $aliasH = Open(undef, "<$aliasFile");  
             while (! eof $aliasH) {  
                 my ($aliasFid, $aliasID, $aliasType, $aliasConf) = Tracer::GetLine($aliasH);  
                 push @{$aliasMasterHash{$aliasFid}}, [$aliasID, $aliasType, $aliasConf];  
             }  
             close $aliasH;  
             MemTrace("Aliases adjusted.") if T(ERDBLoadGroup => 3);  
         }  
119          # 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
120          # locations.          # locations.
121          my $chunkSize = $sprout->MaxSegment();          my $chunkSize = $sprout->MaxSegment();
# Line 176  Line 163 
163                  my %aliasHash;                  my %aliasHash;
164                  # Note the trick here to insure that we have a list reference even                  # Note the trick here to insure that we have a list reference even
165                  # if this feature isn't in the alias table.                  # if this feature isn't in the alias table.
166                  my $aliasList = $aliasMasterHash{$featureID} || [];                  my $aliasList = $aliasMasterHash->{$featureID} || [];
167                  # Loop through this feature ID's aliases.                  # Loop through this feature ID's aliases.
168                  for my $aliasTuple (@$aliasList) {                  for my $aliasTuple (@$aliasList) {
169                      my ($aliasID, $aliasType, $aliasConf) = @$aliasTuple;                      my ($aliasID, $aliasType, $aliasConf) = @$aliasTuple;

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3