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

Diff of /Sprout/Sprout.pm

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

revision 1.41, Tue Oct 18 02:24:23 2005 UTC revision 1.42, Tue Oct 18 06:58:09 2005 UTC
# Line 2609  Line 2609 
2609                                      ['HasSSCell(from-link)', 'IsRoleOf(from-link)']);                                      ['HasSSCell(from-link)', 'IsRoleOf(from-link)']);
2610      # Create the return value.      # Create the return value.
2611      my %retVal = ();      my %retVal = ();
2612        # Build a hash to weed out duplicates. Sometimes the same PEG and role appears
2613        # in two spreadsheet cells.
2614        my %dupHash = ();
2615      # Loop through the results, adding them to the hash.      # Loop through the results, adding them to the hash.
2616      for my $record (@subsystems) {      for my $record (@subsystems) {
2617            # Get this subsystem and role.
2618          my ($subsys, $role) = @{$record};          my ($subsys, $role) = @{$record};
2619          if (exists $retVal{$subsys}) {          # Insure it's the first time for both.
2620            my $dupKey = "$subsys\n$role";
2621            if (! exists $dupHash{"$subsys\n$role"}) {
2622                $dupHash{$dupKey} = 1;
2623              push @{$retVal{$subsys}}, $role;              push @{$retVal{$subsys}}, $role;
         } else {  
             $retVal{$subsys} = [$role];  
2624          }          }
2625      }      }
2626      # Return the hash.      # Return the hash.

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3