[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.4, Sat Feb 12 21:38:27 2005 UTC revision 1.5, Sat Feb 12 21:55:23 2005 UTC
# Line 76  Line 76 
76   }   }
77    
78    
79     my @wantheaders;
80     foreach my $gen (@wants) {push @wantheaders, $fig->abbrev($fig->genus_species($gen))}
81    
82   my @th;   my @th;
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', @wants)}   if ($cgi->param('stats')) {push @th, ('Roles', 'Total Pegs', @wantheaders)}
87   elsif ($cgi->param('korgs')) {push @th, ('Roles', @wants)}   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";
90    
# Line 117  Line 120 
120     @$class=($$class[0], $$class[1]); # could have done this with splice. Ech.     @$class=($$class[0], $$class[1]); # could have done this with splice. Ech.
121    
122     foreach my $c (@$class) {     foreach my $c (@$class) {
123      push @$tablerows, [$c, 1, $rows];      push @$tablerows, [$c, 1, $rows, 20];
124     }     }
125    }    }
126    
# Line 168  Line 171 
171    elsif ($cgi->param('korgs')) {    elsif ($cgi->param('korgs')) {
172     my $first=1;     my $first=1;
173     foreach my $role (@roles) {     foreach my $role (@roles) {
174    if ($role eq "Membrane Transport") {print STDERR "Found role Membrane Transport in $subsys\n"}
175      my $genomeroles;      my $genomeroles;
176      foreach my $gen (@wants) {      foreach my $gen (@wants) {
177       my $cell = ' &nbsp; ';       my $cell = ' &nbsp; ';
# Line 182  Line 186 
186      if ($first) {      if ($first) {
187       push @$tablerows, ([$role, 1, 1], @$genomeroles);       push @$tablerows, ([$role, 1, 1], @$genomeroles);
188       push @$toadd, @$tablerows;       push @$toadd, @$tablerows;
 print STDERR "Added first $role\n";  
 print STDERR "After FIRST TOADD: ", join " ", @$toadd, "\n";  
189       undef $first;       undef $first;
190      }      }
191      else {      else {
192       my @tr=([$role, 1, 1], @$genomeroles);       my @tr=([$role, 1, 1], @$genomeroles);
193       push @$toadd, \@tr;       push @$toadd, \@tr;
 print STDERR "Added second  $role\n";  
 print STDERR "After second TOADD: ", join " ", @$toadd, "\n";  
194      }      }
195     }     }
196    }    }
197    unless ($toadd) {$toadd=$tablerows} # in case we didn't define it  
198      unless ($toadd) {
199       push @$toadd, @$tablerows;
200       print STDERR "For $subsys just defined ", join " ", @$toadd, "\n";
201      } # in case we didn't define it
202    
203    
204    # now decide if we want the table    # now decide if we want the table
205    if ($cgi->param('orgpegs')) {    if ($cgi->param('orgpegs')) {
206     my $mustadd;     my $mustadd;
# Line 238  Line 244 
244   print STDERR "Didn't work. This is what we have for the row: ", join "\n", @$row, "\n";   print STDERR "Didn't work. This is what we have for the row: ", join "\n", @$row, "\n";
245   exit(-1);   exit(-1);
246  }  }
247     $tab .= "\n\t<td valign=top colspan=$cell->[1] rowspan=$cell->[2]>$cell->[0]</td>";     my $width='';
248       if ($cell->[3]) {$width="width " . $cell->[3]}
249       $tab .= "\n\t<td valign=top $width colspan=$cell->[1] rowspan=$cell->[2]>$cell->[0]</td>";
250    }    }
251    $tab .= "\n</tr>\n";    $tab .= "\n</tr>\n";
252   }   }

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3