[Bio] / FigWebServices / subsys_summary.cgi Repository:
ViewVC logotype

Diff of /FigWebServices/subsys_summary.cgi

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

revision 1.8, Sat Feb 12 22:32:12 2005 UTC revision 1.9, Sat Feb 12 22:45:42 2005 UTC
# Line 83  Line 83 
83   if ($cgi->param('levels')) {push @th, ('Level 1', 'Level 2')}   if ($cgi->param('levels')) {push @th, ('Level 1', 'Level 2')}
84   push @th, 'Subsystem'; # we should have this, at least   push @th, 'Subsystem'; # we should have this, at least
85   if ($cgi->param('genomes')) {push @th, ('Organisms')}   if ($cgi->param('genomes')) {push @th, ('Organisms')}
86   if ($cgi->param('stats')) {push @th, ('Roles', 'Total Pegs', @wantheaders)}   if ($cgi->param('stats')) {push @th, ('Non-zero variants', 'Roles', 'Total Pegs', @wantheaders)}
87   elsif ($cgi->param('korgs')) {push @th, ('Roles', @wantheaders)}   elsif ($cgi->param('korgs')) {push @th, ('Roles', @wantheaders)}
88    
89   my $tableheader="<tr><th>". (join "</th><th>", @th) . "</th></tr>\n\n";   my $tableheader="<tr><th>". (join "</th><th>", @th) . "</th></tr>\n\n";
# Line 150  Line 150 
150    my $pegcount;    my $pegcount;
151    my $toadd; #this is what we will add if we need to    my $toadd; #this is what we will add if we need to
152    if ($cgi->param('stats')) {    if ($cgi->param('stats')) {
    push @$tablerows, [(scalar @roles), '1', $rows];  
153     my $totalpegs;     my $totalpegs;
154       my $nzv=0; # non-zero variant codes
155     # there should be a quicker way of getting this ... ?     # there should be a quicker way of getting this ... ?
156     foreach my $role (@roles) {     foreach my $role (@roles) {
157      foreach my $genome (keys %genomes) {      foreach my $genome (keys %genomes) {
158       my $count = scalar ($fig->pegs_in_subsystem_cell($subsys, $genome, $role));       my $count = scalar ($fig->pegs_in_subsystem_cell($subsys, $genome, $role));
159       $pegcount->{$genome} += $count;       $pegcount->{$genome} += $count;
160       $totalpegs += $count;       $totalpegs += $count;
161         my $vc=$fig->get_subsystem($subsys)->get_variant_code_for_genome($genome);
162         print STDERR "Found variant code $vc\n";
163         unless ($vc == 0) {$nzv++}
164      }      }
165     }     }
166    
167       # add non-zero variant codes
168       push @$tablerows, [$nzv, 1, $rows];
169       # add roles
170       push @$tablerows, [(scalar @roles), '1', $rows];
171       # add total pegs
172     push @$tablerows, [$totalpegs, '1', $rows];     push @$tablerows, [$totalpegs, '1', $rows];
173     foreach my $w (@wants) {     foreach my $w (@wants) {
174      push @$tablerows, [$pegcount->{$w}, '1', $rows]; # pegs for each of the chosen genomes      push @$tablerows, [$pegcount->{$w}, '1', $rows]; # pegs for each of the chosen genomes

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3