[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.77, Thu Nov 9 21:23:43 2006 UTC revision 1.79, Sat Nov 18 20:38:45 2006 UTC
# Line 536  Line 536 
536                      # Count this feature.                      # Count this feature.
537                      $loadFeature->Add("featureIn");                      $loadFeature->Add("featureIn");
538                      # Begin building the keywords. We start with the genome ID, the                      # Begin building the keywords. We start with the genome ID, the
539                      # feature ID, and the organism name.                      # feature ID, the taxonomy, and the organism name.
540                      my @keywords = ($genomeID, $featureID, $fig->genus_species($genomeID));                      my @keywords = ($genomeID, $featureID, $fig->genus_species($genomeID),
541                                        $fig->taxonomy_of($genomeID));
542                      # Get the functional assignment and aliases. This                      # Get the functional assignment and aliases. This
543                      # depends on the feature type.                      # depends on the feature type.
544                      my $assignment;                      my $assignment;
# Line 628  Line 629 
629                          $loadFeature->Add('iedb');                          $loadFeature->Add('iedb');
630                      }                      }
631                      # Now we need to bust up hyphenated words in the keyword                      # Now we need to bust up hyphenated words in the keyword
632                      # list.                      # list. We keep them separate and put them at the end so
633                        # the original word order is available.
634                      my $keywordString = "";                      my $keywordString = "";
635                        my $bustedString = "";
636                      for my $keyword (@keywords) {                      for my $keyword (@keywords) {
637                          if (length $keyword >= 4) {                          if (length $keyword >= 4) {
638                              $keywordString .= " $keyword";                              $keywordString .= " $keyword";
639                              if ($keyword =~ /-/) {                              if ($keyword =~ /-/) {
640                                  my @words = grep { length($_) >= 4 } split /-/, $keyword;                                  my @words = grep { length($_) >= 4 } split /-/, $keyword;
641                                  $keywordString .= join(" ", "", @words);                                  $bustedString .= join(" ", "", @words);
642                              }                              }
643                          }                          }
644                      }                      }
645                        $keywordString .= $bustedString;
646                        # Get rid of annoying punctuation.
647                        $keywordString =~ s/[();]//g;
648                      # Clean the keyword list.                      # Clean the keyword list.
649                      my $cleanWords = $sprout->CleanKeywords($keywordString);                      my $cleanWords = $sprout->CleanKeywords($keywordString);
650                      Trace("Keyword string for $featureID: $cleanWords") if T(4);                      Trace("Keyword string for $featureID: $cleanWords") if T(4);
# Line 786  Line 792 
792                  # Now for the classification string. This comes back as a list                  # Now for the classification string. This comes back as a list
793                  # reference and we convert it to a space-delimited string.                  # reference and we convert it to a space-delimited string.
794                  my $classList = $fig->subsystem_classification($subsysID);                  my $classList = $fig->subsystem_classification($subsysID);
795                  my $classString = join(" : ", grep { $_ } @$classList);                  my $classString = join($FIG_Config::splitter, grep { $_ } @$classList);
796                  $loadSubsystemClass->Put($subsysID, $classString);                  $loadSubsystemClass->Put($subsysID, $classString);
797                  # Connect it to its roles. Each role is a column in the subsystem spreadsheet.                  # Connect it to its roles. Each role is a column in the subsystem spreadsheet.
798                  for (my $col = 0; defined($roleID = $sub->get_role($col)); $col++) {                  for (my $col = 0; defined($roleID = $sub->get_role($col)); $col++) {

Legend:
Removed from v.1.77  
changed lines
  Added in v.1.79

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3