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

Diff of /FigKernelPackages/FIGV.pm

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

revision 1.13, Thu Nov 30 20:18:22 2006 UTC revision 1.14, Thu Nov 30 20:43:10 2006 UTC
# Line 116  Line 116 
116      return $ss;      return $ss;
117  }  }
118    
119    sub active_subsystems
120    {
121        my($self, $genome, $all) = @_;
122    
123        my $fig     = $self->{_fig};
124        my $newG    = $self->{_genome};
125        my $newGdir = $self->{_orgdir};
126    
127        if ($genome  ne $newG)
128        {
129            return $fig->active_subsystems($genome, $all);
130        }
131    
132        $self->load_ss_data();
133    
134        my $slist = {};
135        %{$slist} = %{$self->{_ss_variants}};
136    
137        if (not $all)
138        {
139            for my $ss (keys %$slist)
140            {
141                my $var = $slist->{$ss};
142                delete $slist->{$ss} if $var == 0 or $var == -1;
143            }
144        }
145        return $slist;
146    }
147    
148  sub peg_to_roles_in_subsystems  sub peg_to_roles_in_subsystems
149  {  {
150      my($self,$peg) = @_;      my($self,$peg) = @_;
# Line 984  Line 1013 
1013    
1014      my $peg_index;      my $peg_index;
1015      my $bindings;      my $bindings;
1016        my $genome_index;
1017        my %seen;
1018      while (<S>)      while (<S>)
1019      {      {
1020          chomp;          chomp;
1021          my($sname, $role, $peg) = split(/\t/);          my($sname, $role, $peg) = split(/\t/);
1022    
1023            my $genome = &FIG::genome_of($peg);
1024    
1025          push(@{$bindings->{$sname}->{$role}}, $peg);          push(@{$bindings->{$sname}->{$role}}, $peg);
1026          push(@{$peg_index->{$peg}}, [$sname, $role]);          push(@{$peg_index->{$peg}}, [$sname, $role]);
1027    
1028            if (!$seen{$genome, $sname, $role})
1029            {
1030                push(@{$genome_index->{$genome}, [$sname, $role]});
1031            }
1032    
1033      }      }
1034      close(S);      close(S);
1035    
# Line 1007  Line 1046 
1046      $self->{_ss_bindings} = $bindings;      $self->{_ss_bindings} = $bindings;
1047      $self->{_ss_variants} = $variant;      $self->{_ss_variants} = $variant;
1048      $self->{_ss_peg_index} = $peg_index;      $self->{_ss_peg_index} = $peg_index;
1049        $self->{_ss_genome_index} = $genome_index;
1050  }  }
1051    
1052  sub load_tbl {  sub load_tbl {

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3