[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.23, Fri Jan 13 06:59:49 2006 UTC revision 1.24, Tue Jan 17 01:10:54 2006 UTC
# Line 903  Line 903 
903          # Loop through the genomes.          # Loop through the genomes.
904          for my $genomeID (keys %{$genomeHash}) {          for my $genomeID (keys %{$genomeHash}) {
905              $loadProperty->Add("genomeIn");              $loadProperty->Add("genomeIn");
906                Trace("Generating properties for $genomeID.") if T(3);
907              # Get the genome's features. The feature ID is the first field in the              # Get the genome's features. The feature ID is the first field in the
908              # tuples returned by "all_features_detailed". We use "all_features_detailed"              # tuples returned by "all_features_detailed". We use "all_features_detailed"
909              # rather than "all_features" because we want all features regardless of type.              # rather than "all_features" because we want all features regardless of type.
910              my @features = map { $_->[0] } @{$fig->all_features_detailed($genomeID)};              my @features = map { $_->[0] } @{$fig->all_features_detailed($genomeID)};
911                my $featureCount = 0;
912                my $propertyCount = 0;
913              # Loop through the features, creating HasProperty records.              # Loop through the features, creating HasProperty records.
914              for my $fid (@features) {              for my $fid (@features) {
                 $loadProperty->Add("featureIn");  
915                  # Get all attributes for this feature. We do this one feature at a time                  # Get all attributes for this feature. We do this one feature at a time
916                  # to insure we do not get any genome attributes.                  # to insure we do not get any genome attributes.
917                  my @attributeList = $fig->get_attributes($fid, '', '', '');                  my @attributeList = $fig->get_attributes($fid, '', '', '');
918                    if (scalar @attributeList) {
919                        $featureCount++;
920                    }
921                  # Loop through the attributes.                  # Loop through the attributes.
922                  for my $tuple (@attributeList) {                  for my $tuple (@attributeList) {
923                        $propertyCount++;
924                      # Get this attribute value's data. Note that we throw away the FID,                      # Get this attribute value's data. Note that we throw away the FID,
925                      # since it will always be the same as the value if "$fid".                      # since it will always be the same as the value if "$fid".
926                      my (undef, $key, $value, $url) = @{$tuple};                      my (undef, $key, $value, $url) = @{$tuple};
# Line 936  Line 942 
942                      $loadHasProperty->Put($fid, $propertyID, $url);                      $loadHasProperty->Put($fid, $propertyID, $url);
943                  }                  }
944              }              }
945                # Update the statistics.
946                Trace("$propertyCount attributes processed for $featureCount features.") if T(3);
947                $loadHasProperty->Add("featuresIn", $featureCount);
948                $loadHasProperty->Add("propertiesIn", $propertyCount);
949          }          }
950      }      }
951      # Finish the load.      # Finish the load.

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3