[Bio] / FigKernelPackages / PinnedRegions.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/PinnedRegions.pm

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

revision 1.5, Tue Feb 5 21:04:36 2008 UTC revision 1.6, Wed Feb 6 18:30:07 2008 UTC
# Line 432  Line 432 
432  sub add_figfams {  sub add_figfams {
433      my($fig, $feature_data) = @_;      my($fig, $feature_data) = @_;
434    
435      my @pegs = grep {$feature_data->{$_}{'type'} eq 'peg'} keys %$feature_data;      # Get FigFams directory from config file
436        my $figfam_dir = $FIG_Config::FigfamsData;
     my $figfam_data = $FIG_Config::FigfamsData;  
     my $figfams     = new FigFams($fig, $figfam_data);  
437    
438        # Check if FigFams directory is defined and exists on current machine
439        if ( defined($figfam_dir) and (-d $figfam_dir) )
440        {
441            # Get all PEG IDs
442            my @pegs            = grep {$feature_data->{$_}{'type'} eq 'peg'} keys %$feature_data;
443            # Get $figfams object
444            my $figfams         = new FigFams($fig, $figfam_dir);
445            # Get FigFam family ID for @pegs
446      my $figfam          = $figfams->families_containing_peg_bulk(\@pegs);      my $figfam          = $figfams->families_containing_peg_bulk(\@pegs);
447            # Get hash of FigFam ID to family function
448      my $family_function = $figfams->family_functions();      my $family_function = $figfams->family_functions();
449    
450      foreach my $fid  ( keys %$feature_data )      foreach my $fid  ( keys %$feature_data )
451      {      {
452          if ( $figfam->{$fid} )          if ( $figfam->{$fid} )
453          {          {
454                    # Add FigFam information to hash -- to go into the popup text
455              $feature_data->{$fid}{'figfam'} = $figfam->{$fid} . ": " . $family_function->{$figfam->{$fid}};              $feature_data->{$fid}{'figfam'} = $figfam->{$fid} . ": " . $family_function->{$figfam->{$fid}};
456          }          }
457      }      }
458  }  }
459    }
460    
461  sub add_subsystem_data {  sub add_subsystem_data {
462      my($fig, $pin_desc, $feature_data) = @_;      my($fig, $pin_desc, $feature_data) = @_;

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3