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

Diff of /FigWebServices/genome_statistics.cgi

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

revision 1.3, Sat Oct 23 21:41:38 2004 UTC revision 1.4, Sun Oct 24 02:45:41 2004 UTC
# Line 1  Line 1 
   
1  #### start ####  #### start ####
2  use FIG;  use FIG;
3  my $fig = new FIG;  my $fig = new FIG;
# Line 53  Line 52 
52  if (! $request)  if (! $request)
53  {  {
54      &basic_stats($fig,$cgi,$html,$genome);      &basic_stats($fig,$cgi,$html,$genome);
55        push(@$html,$cgi->hr);
56        &assignment_stats($fig,$cgi,$html,$genome);
57        push(@$html,$cgi->hr);
58        &subsystem_stats($fig,$cgi,$html,$genome);
59  }  }
60  else  else
61  {  {
62      push(@$html,$cgi->h1("Invalid request: $request"));      push(@$html,$cgi->h1("Invalid request: $request"));
63  }  }
   
64  &HTML::show_page($cgi,$html);  &HTML::show_page($cgi,$html);
65  exit;  exit;
66    
# Line 68  Line 70 
70      my $rdbH = $fig->db_handle;      my $rdbH = $fig->db_handle;
71      my $relational_db_response = $rdbH->SQL("SELECT gname,szdna,pegs,rnas,taxonomy FROM genome WHERE genome = '$genome'");      my $relational_db_response = $rdbH->SQL("SELECT gname,szdna,pegs,rnas,taxonomy FROM genome WHERE genome = '$genome'");
72      my($gname,$szdna,$pegs,$rnas,$taxonomy) = @{$relational_db_response->[0]};      my($gname,$szdna,$pegs,$rnas,$taxonomy) = @{$relational_db_response->[0]};
73        $szdna = &commify($szdna);
74      push(@$html,$cgi->h1('Basic Statistics'));      push(@$html,$cgi->h1('Basic Statistics'));
75      push(@$html,$cgi->br,      push(@$html,$cgi->br,
76                  "Name: $gname",$cgi->br,                  "<b>Name:</b> $gname",$cgi->br,
77                  "Size (bp): $szdna",$cgi->br,                  "<b>Size (bp):</b> $szdna",$cgi->br,
78                  "Number CDSs: $pegs",$cgi->br,                  "<b>Number CDSs:</b> $pegs",$cgi->br,
79                  "Number rnas: $rnas",$cgi->br,                  "<b>Number rnas:</b> $rnas",$cgi->br,
80                  "Taxonomy: $taxonomy",$cgi->br                  "<b>Taxonomy:</b> $taxonomy",$cgi->br
81           );           );
82      return      return
83  }  }
84    
85    sub commify {
86        my($n) = @_;
87        my(@n) = ();
88        my($i);
89    
90        for ($i = (length($n) - 3); ($i > 0); $i -= 3)
91        {
92            unshift(@n,",",substr($n,$i,3));
93        }
94        unshift(@n,substr($n,0,$i+3));
95        return join("",@n);
96    }
97    
98    sub assignment_stats {
99        my($fig,$cgi,$html,$genome) = @_;
100    
101    }
102    
103    sub subsystem_stats {
104        my($fig,$cgi,$html,$genome) = @_;
105    
106    }

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3