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

Annotation of /FigWebServices/ss_scoreboard.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (view) (download)

1 : olson 1.1 use FIG;
2 :     use CGI;
3 :     use HTML;
4 :    
5 :     use strict;
6 :    
7 :     my $cgi = new CGI;
8 :     my $fig = new FIG();
9 :    
10 :     my @subs = $fig->all_subsystems();
11 :    
12 :     my %all_genomes;
13 :    
14 :     my $html = [];
15 :    
16 :     for my $subname (@subs)
17 :     {
18 :     my $sub = $fig->get_subsystem($subname);
19 :     my @subg = $sub->get_genomes();
20 :     grep($all_genomes{$_}++, @subg);
21 :     }
22 :    
23 :     my @col_hdrs = map { s/_/ /g; $_ } @subs;
24 :     splice(@col_hdrs, 0, 0, "Genome");
25 :    
26 :     my @table;
27 :    
28 :     for my $k (keys(%all_genomes))
29 :     {
30 :     my $c = $all_genomes{$k};
31 :    
32 :     my $row = [];
33 :    
34 :     push(@$row, $k);
35 :    
36 :     for my $subname (@subs)
37 :     {
38 :     my $sub = $fig->get_subsystem($subname);
39 :     my $vc = $sub->get_variant_code_for_genome($k);
40 :     push(@$row, "\@align=\"center\":$vc");
41 :     }
42 :     push(@table, $row);
43 :     }
44 :    
45 :    
46 :     push(@$html, HTML::make_table(\@col_hdrs, \@table));
47 :    
48 :     &HTML::show_page($cgi, $html);

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3