[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.15, Wed Apr 13 16:38:11 2005 UTC revision 1.16, Sun Jul 10 18:17:42 2005 UTC
# Line 74  Line 74 
74  }  }
75  elsif (@genomes == 0)  elsif (@genomes == 0)
76  {  {
     unshift @$html, "<TITLE>The SEED Statistics Page</TITLE>\n";  
77      push(@$html,"<h1>Sorry, you need to specify at least one valid genome</h1>\n");      push(@$html,"<h1>Sorry, you need to specify at least one valid genome</h1>\n");
     &HTML::show_page($cgi,$html);  
     exit;  
78  }  }
79  else  else
80  {  {
# Line 94  Line 91 
91  &HTML::show_page($cgi,$html);  &HTML::show_page($cgi,$html);
92  exit;  exit;
93    
94    
95    #  Only subroutines below
96    
97    
98  sub basic_stats {  sub basic_stats {
99      my($fig,$cgi,$html,$genome) = @_;      my($fig,$cgi,$html,$genome) = @_;
100    
101      my($gname,$szdna,$num_contigs,$pegs,$rnas,$taxonomy) = &get_basic_stats($fig,$genome);      my($gname,$szdna,$num_contigs,$pegs,$rnas,$taxonomy) = &get_basic_stats($fig,$genome);
102      push(@$html,$cgi->h1('Basic Statistics'));      push @$html, $cgi->h1('Basic Statistics'), "\n",
103      push(@$html,$cgi->br,                       "<b>Genome ID:</b> $genome", $cgi->br, "\n",
104                  "<b>Genome ID:</b> $genome",$cgi->br,                       "<b>Name:</b> $gname", $cgi->br, "\n",
105                  "<b>Name:</b> $gname",$cgi->br,                       "<b>Size (bp):</b> $szdna", $cgi->br, "\n",
106                  "<b>Size (bp):</b> $szdna",$cgi->br,                       "<b>Number contigs:</b> $num_contigs", $cgi->br, "\n",
107                  "<b>Number contigs:</b> $num_contigs",$cgi->br,                       "<b>Number CDSs:</b> $pegs", $cgi->br, "\n",
108                  "<b>Number CDSs:</b> $pegs",$cgi->br,                       "<b>Number rnas:</b> $rnas", $cgi->br, "\n",
109                  "<b>Number rnas:</b> $rnas",$cgi->br,                       "<b>Taxonomy:</b> $taxonomy", $cgi->br, "\n";
110                  "<b>Taxonomy:</b> $taxonomy",$cgi->br      push @$html, project_description( $genome );
          );  
111      return      return
112  }  }
113    
114    
115    sub project_description {
116        ( my $genome = shift @_ ) or return ();
117        -d $FIG_Config::organisms && -d "$FIG_Config::organisms/$genome"
118                                  && -f "$FIG_Config::organisms/$genome/PROJECT"
119                                  || return ();
120        open( PROJECT, "<$FIG_Config::organisms/$genome/PROJECT" ) || return ();
121        my @project = <PROJECT>;
122        close PROJECT;
123        return ( "<b>Project description:</b>\n<pre>",
124                 ( map { "    " . $_ } @project ),
125                 "</pre>\n"
126               );
127    }
128    
129    
130  sub commify {  sub commify {
131      my($n) = @_;      my($n) = @_;
132      my(@n) = ();      my(@n) = ();
# Line 156  Line 172 
172    
173      my $user = $cgi->param('user');      my $user = $cgi->param('user');
174    
175      push(@$html,"<b>PEGs with hypothetical functions and in subsystem:</b> <a href=./genome_statistics.cgi?user=$user&genome=$genome&request=hypo_sub>$hypo_sub ($fracHS)</a>",$cgi->br,      push @$html, "<table>\n",
176                  "<b>PEGs with nonhypothetical functions and in subsystem:</b> <a href=./genome_statistics.cgi?user=$user&genome=$genome&request=nothypo_sub>$nothypo_sub ($fracNHS)</a>",$cgi->br,                   "  <tr>\n",
177                  "<b>PEGs with hypothetical functions and not in subsystem:</b> <a href=./genome_statistics.cgi?user=$user&genome=$genome&request=hypo_nosub>$hypo_nosub ($fracHNS)</a>",$cgi->br,                   "    <th align=left>PEGs with hypothetical functions and in subsystem:</th>\n",
178                  "<b>PEGs with nonhypothetical functions and not in subsystem:</b> <a href=./genome_statistics.cgi?user=$user&genome=$genome&request=nothypo_nosub>$nothypo_nosub ($fracNHNS)</a>",$cgi->br                   "    <td align=right><a href=./genome_statistics.cgi?user=$user&genome=$genome&request=hypo_sub>$hypo_sub ($fracHS)</a></td>\n",
179           );                   "  </tr>\n",
180                     "  <tr>\n",
181                     "    <th align=left>PEGs with nonhypothetical functions and in subsystem:</th>\n",
182                     "    <td align=right><a href=./genome_statistics.cgi?user=$user&genome=$genome&request=nothypo_sub>$nothypo_sub ($fracNHS)</a></td>\n",
183                     "  </tr>\n",
184                     "  <tr>\n",
185                     "    <th align=left>PEGs with hypothetical functions and not in subsystem:</th>\n",
186                     "    <td align=right><a href=./genome_statistics.cgi?user=$user&genome=$genome&request=hypo_nosub>$hypo_nosub ($fracHNS)</a></td>\n",
187                     "  </tr>\n",
188                     "  <tr>\n",
189                     "    <th align=left>PEGs with nonhypothetical functions and not in subsystem:</th>\n",
190                     "    <td align=right><a href=./genome_statistics.cgi?user=$user&genome=$genome&request=nothypo_nosub>$nothypo_nosub ($fracNHNS)</a></td>\n",
191                     "  </tr>\n",
192                     "</table>\n";
193  }  }
194    
195  sub handle_show_subsystems {  sub handle_show_subsystems {

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3