[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.4, Thu Oct 9 17:23:54 2008 UTC revision 1.5, Fri Oct 17 16:48:32 2008 UTC
# Line 171  Line 171 
171                  # Break the assignment into words and shove it onto the                  # Break the assignment into words and shove it onto the
172                  # keyword list.                  # keyword list.
173                  push @keywords, split(/\s+/, $assignment);                  push @keywords, split(/\s+/, $assignment);
174                    # Add any EC numbers.
175                    push @keywords, BioWords::ExtractECs($assignment);
176                  # Link this feature to the parent genome.                  # Link this feature to the parent genome.
177                  $self->Put('HasFeature', 'from-link' => $genomeID, 'to-link' => $featureID,                  $self->Put('HasFeature', 'from-link' => $genomeID, 'to-link' => $featureID,
178                             type => $type);                             type => $type);
# Line 209  Line 211 
211                              $self->Put('HasRoleInSubsystem', 'from-link' => $featureID,                              $self->Put('HasRoleInSubsystem', 'from-link' => $featureID,
212                                         'to-link' => $subsystem, genome => $genomeID,                                         'to-link' => $subsystem, genome => $genomeID,
213                                         type => $type);                                         type => $type);
214                              # Save the subsystem's keyword data.                              # Save the subsystem's keywords.
215                              push @keywords, split /[\s_]+/, $subsystem;                              push @keywords, split /[\s_]+/, $subsystem;
216                          }                          }
217                          # Now add the role to the keyword list.                          # Now add the role and any embedded EC nubmers to the keyword list.
218                          push @keywords, split /\s+/, $role;                          push @keywords, split /\s+/, $role;
219                            push @keywords, BioWords::ExtractECs($role);
220                      }                      }
221                  }                  }
222                    # For each hyphenated word, we also need the pieces.
223                    my @hyphenated = grep { $_ =~ /-/ } @keywords;
224                    for my $hyphenated (@hyphenated) {
225                        # Bust it into pieces.
226                        my @pieces = grep { length($_) > 2 } split /-/, $hyphenated;
227                        push @keywords, @pieces;
228                    }
229                  # There are three special attributes computed from property                  # There are three special attributes computed from property
230                  # data that we build next. If the special attribute is non-empty,                  # data that we build next. If the special attribute is non-empty,
231                  # its name will be added to the keyword list. First, we get all                  # its name will be added to the keyword list. First, we get all
# Line 335  Line 345 
345                  # Join the keyword string.                  # Join the keyword string.
346                  my $keywordString = join(" ", @keywords);                  my $keywordString = join(" ", @keywords);
347                  # Get rid of annoying punctuation.                  # Get rid of annoying punctuation.
348                  $keywordString =~ s/[();@#\/]/ /g;                  $keywordString =~ s/[();@#\/,]/ /g;
349                  # Get the list of keywords in the keyword string.                  # Get the list of keywords in the keyword string.
350                  my @realKeywords = $stemmer->Split($keywordString);                  my @realKeywords = $stemmer->Split($keywordString);
351                  # We need to do two things here: create the keyword string for the feature table                  # We need to do two things here: create the keyword string for the feature table

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3