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

Diff of /FigKernelPackages/Subsystem.pm

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

revision 1.90, Tue Oct 17 18:44:03 2006 UTC revision 1.91, Sun Oct 22 05:07:46 2006 UTC
# Line 1068  Line 1068 
1068      $self->{genome} = [];      $self->{genome} = [];
1069      $self->{genome_index} = {};      $self->{genome_index} = {};
1070      $self->{variant_code} = [];      $self->{variant_code} = [];
1071        $self->{peg_roles} = {};
1072    
1073      my $nr = @{$self->{roles}};      my $nr = @{$self->{roles}};
1074    
# Line 1102  Line 1103 
1103              my $e2 = [map("fig|$genome.peg.$_", split(/,/, $entry))];              my $e2 = [map("fig|$genome.peg.$_", split(/,/, $entry))];
1104              $self->{spreadsheet}->[$i]->[$j] = $e2;              $self->{spreadsheet}->[$i]->[$j] = $e2;
1105              $self->{spreadsheet_inv}->[$j]->[$i] = $e2;              $self->{spreadsheet_inv}->[$j]->[$i] = $e2;
1106                for my $fidj (@{$e2}) {
1107                    push @{$self->{peg_roles}->{$fidj}}, $j;
1108                }
1109              $j++;              $j++;
1110          }          }
1111          $i++;          $i++;
# Line 1109  Line 1113 
1113      }      }
1114  }  }
1115    
1116    =head3 get_peg_roles
1117    
1118    C<< my @cols = $sub->get_peg_roles($peg); >>
1119    
1120    Return the column numbers in which the specified PEG appears.
1121    
1122    =over 4
1123    
1124    =item peg
1125    
1126    ID of the feature whose roles are desired.
1127    
1128    =item RETURN
1129    
1130    Returns a list of the column numbers in which the peg appears, or an empty
1131    list if it is not found.
1132    
1133    =back
1134    
1135    =cut
1136    
1137    sub get_peg_roles {
1138        # Get the parameters.
1139        my ($self, $peg) = @_;
1140        # Declare the return variable.
1141        my @retVal;
1142        # Find this peg's roles.
1143        if (exists $self->{peg_roles}->{$peg}) {
1144            @retVal = @{$self->{peg_roles}->{$peg}};
1145        }
1146        # Return the result.
1147        return @retVal;
1148    }
1149    
1150  =head3 write_subsystem  =head3 write_subsystem
1151    
1152  Write the subsystem to the disk.  Updates on-disk data with notes,  Write the subsystem to the disk.  Updates on-disk data with notes,

Legend:
Removed from v.1.90  
changed lines
  Added in v.1.91

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3