[Bio] / Sprout / ShowCounts.pl Repository:
ViewVC logotype

Diff of /Sprout/ShowCounts.pl

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

revision 1.11, Wed Feb 21 13:19:54 2007 UTC revision 1.12, Tue Apr 10 06:08:06 2007 UTC
# Line 103  Line 103 
103      # Get the Sprout object.      # Get the Sprout object.
104      my $sfx = SFXlate->new_sprout_only();      my $sfx = SFXlate->new_sprout_only();
105      # Get the old Sprout.      # Get the old Sprout.
106      my $oldSprout = SFXlate->new_sprout_only($FIG_Config::oldSproutDB);      my $oldSprout = SFXlate->old_sprout_only();
107      # Create the counts file.      # Create the counts file.
108      CreateCounts($sfx, $oldSprout, $parameters[0], "$targetDir/version.inc");      CreateCounts($sfx, $oldSprout, $parameters[0], "$targetDir/version.inc");
109      # Create the subsystem summary file.      # Create the subsystem summary file.
110      CreateSubForm($sfx, "$targetDir/forms/all_genomes.inc");      CreateSubForm($sfx, "$targetDir/forms/subsystems.inc");
111        # Create the organism summary file.
112        CreateOrgForm($sfx, "$targetDir/forms/all_genomes.inc");
113      # Create the database documentation file.      # Create the database documentation file.
114      CreateSproutDoc($sfx, "$targetDir/sproutdb.inc");      CreateSproutDoc($sfx, "$targetDir/sproutdb.inc");
115      # Tell the user we're done.      # Tell the user we're done.
# Line 225  Line 227 
227      push @page, input({type => "hidden", name => "SPROUT", value => "1"});      push @page, input({type => "hidden", name => "SPROUT", value => "1"});
228      # Surround the form parts with a table.      # Surround the form parts with a table.
229      push @page, "<table><tr><td>";      push @page, "<table><tr><td>";
230        # Add the buttons.
231        push @page, CGI::p("For the genome selected below, show " .
232                    input({type => "submit", name => "show_subsystems",
233                           value => "Subsystems", class => "button"}) .
234                    input({type => "submit", name => "show_reactions",
235                           value => "Reactions", class => "button"}));
236        # End the first table cell.
237        push @page, "</td></tr><tr><td>";
238      # Create the gene menu.      # Create the gene menu.
239      push @page, $sfx->GeneMenu({ name => 'genome', size => 10 }, "", []);      push @page, $sfx->GeneMenu({ name => 'genome', size => 10 }, "", []);
240        # Close the table.
241        push @page, "</td></tr></table>";
242        # Close the form.
243        push @page, end_form();
244        # Put together all the pieces.
245        my $wholePage = join("\n", @page);
246        # Open the output file.
247        my $handle = Open(undef, ">$fileName");
248        # Write out the HTML.
249        print $handle $wholePage;
250        # Close the file.
251        close $handle;
252    
253    }
254    
255    =head3 CreateOrgForm
256    
257    C<< CreateOrgForm($sfx, $fileName); >>
258    
259    Output the organism summary form. The organism summary form allows the user
260    to select an organism and view its statistics.
261    
262    =over 4
263    
264    =item sfx
265    
266    A Sprout object that can be used to access the NMPDR database.
267    
268    =item fileName
269    
270    The name of the file to create with the form HTML in it.
271    
272    =back
273    
274    =cut
275    
276    sub CreateOrgForm {
277        # Get the parameters.
278        my ($sfx, $fileName) = @_;
279        # Start the form.
280        my @page = ();
281        push @page, start_form({method => "post", action => "../FIG/genome_statistics.cgi",
282                                enctype=> "application/x-www-form-urlencoded"});
283        # Make sure the script knows it's for SPROUT.
284        push @page, input({type => "hidden", name => "SPROUT", value => "1"});
285        # Surround the form parts with a table.
286        push @page, "<table><tr><td>";
287        # Add the button.
288        push @page, CGI::p("Search or view statistics for the genome selected below " .
289                           input({type => "submit", name => "statistics",
290                           value => "Go", class => "button"}));
291      # End the first table cell.      # End the first table cell.
292      push @page, "</td></tr><tr><td>";      push @page, "</td></tr><tr><td>";
293      # Add the buttons.      # Create the gene menu.
294      push @page, input({type => "submit", name => "show_subsystems",      push @page, $sfx->GeneMenu({ name => 'genome', size => 10 }, "", []);
                        value => "Show Subsystems"});  
     push @page, input({type => "submit", name => "show_reactions",  
                        value => "Show Reactions"});  
295      # Close the table.      # Close the table.
296      push @page, "</td></tr></table>";      push @page, "</td></tr></table>";
297      # Close the form.      # Close the form.

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3