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

Diff of /FigWebServices/index.cgi

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

revision 1.46, Tue Sep 7 02:54:16 2004 UTC revision 1.47, Sat Sep 11 00:45:40 2004 UTC
# Line 227  Line 227 
227      my($fig,$cgi,$html) = @_;      my($fig,$cgi,$html) = @_;
228      my($map,$name,$olrg,$gs);      my($map,$name,$olrg,$gs);
229    
230      my($a,$b,$e,$v) = $fig->genome_counts;      my( $a, $b, $e, $v, $env ) = $fig->genome_counts;
231      push(@$html,$cgi->h2("Contains $a archaeal, $b bacterial, $e eukaryotic, and $v viral genomes"));      push(@$html,$cgi->h2("Contains $a archaeal, $b bacterial, $e eukaryal, $v viral and $env environmental genomes"));
232      my($a,$b,$e,$v) = $fig->genome_counts("complete");      my( $a, $b, $e ) = $fig->genome_counts("complete");
233      push(@$html,$cgi->h2("Of these, $a archaeal, $b bacterial, and $e eukaryotic genomes are more-or-less complete"),$cgi->hr);      push(@$html,$cgi->h2("Of these, $a archaeal, $b bacterial and $e eukaryal genomes are more-or-less complete"),$cgi->hr);
   
     my @maps = sort map { $map = $_; $name = $fig->map_name($map); "$name ($map)" } $fig->all_maps;  
     my @orgs = sort map { $org = $_; $gs = $fig->genus_species($org); "$gs ($org)" } $fig->genomes("complete",undef);  
234    
235      push(@$html,      push(@$html,
236           $cgi->h2('Work on Subsystems'),           $cgi->h2('Work on Subsystems'),
# Line 269  Line 266 
266                  $cgi->textfield(-name => "maxrole", -size => 6, -value => 100),                  $cgi->textfield(-name => "maxrole", -size => 6, -value => 100),
267                  "</td></td></table>",                  "</td></td></table>",
268                  $cgi->submit('Search'),                  $cgi->submit('Search'),
269                  $cgi->reset('Clear'));                  $cgi->reset('Clear'),
270                    $cgi->hr);
271    
272        my @display = ( 'All', 'Archaea', 'Bacteria', 'Eucarya', 'Viruses', 'Environmental samples' );
273    
274        #
275        #  Canonical names must match the keywords used in the DBMS.  They are
276        #  defined in compute_genome_counts.pl
277        #
278        my %canonical = (
279            'All'                   =>  undef,
280            'Archaea'               => 'Archaea',
281            'Bacteria'              => 'Bacteria',
282            'Eucarya'               => 'Eukaryota',
283            'Viruses'               => 'Virus',
284            'Environmental samples' => 'Environmental Sample'
285            );
286    
287        my $req_dom = $cgi->param( 'domain' ) || 'All';
288        my @domains = $cgi->radio_group( -name     => 'domain',
289                                         -default  => $req_dom,
290                                         -override => 1,
291                                         -values   => [ @display ]
292                                       );
293    
294        my $n_domain = 0;
295        my %dom_num = map { ( $_, $n_domain++ ) } @display;
296        my $req_dom_num = $dom_num{ $req_dom } || 0;
297    
298        #
299        #  Viruses and Environmental samples must have completeness = All (that is
300        #  how they are in the database).  Otherwise, default is Only "complete".
301        #
302        my $req_comp = ( $req_dom_num > $dom_num{ 'Eucarya' } ) ? 'All'
303                     : $cgi->param( 'complete' ) || 'Only "complete"';
304        my @complete = $cgi->radio_group( -name     => 'complete',
305                                          -default  => $req_comp,
306                                          -override => 1,
307                                          -values   => [ 'All', 'Only "complete"' ]
308                            );
309        #
310        #  Use $fig->genomes( complete, restricted, domain ) to get org list:
311        #
312        my $complete = ( $req_comp =~ /^all$/i ) ? undef : "complete";
313        my @orgs = sort
314                   map { $fig->genus_species($_) . " ($_)" }
315                   $fig->genomes( $complete, undef, $canonical{ $req_dom } );
316    
317        my $n_genomes = @orgs;
318    
319      push(@$html, $cgi->hr,      push( @$html, $cgi->h2('If You Need to Pick an Organism for Options Below'),
320                  $cgi->h2('If You Need to Pick an Organism for Options Below'),                    "<TABLE>\n",
321                      "   <TR>\n",
322                      "      <TD>",
323                  $cgi->scrolling_list(-name => 'korgs',                  $cgi->scrolling_list(-name => 'korgs',
324                                       -values => [@orgs],                                       -values => [@orgs],
325                                       -size => 10                                       -size => 10
326                                      ),                                      ),
327                  $cgi->hr,                    $cgi->br,
328                      "$n_genomes genomes shown ",
329                      $cgi->submit( 'Update List' ),
330                      "</TD>",
331                      "      <TD>",
332                      join( "<br>", "<b>Domain(s) to show:</b>", @domains), "<br>\n",
333                      join( "<br>", "<b>Completeness?</b>", @complete), "\n",
334                      "</TD>",
335                      "   </TR>\n",
336                      "</TABLE>\n",
337                      $cgi->hr);
338    
339    
340        my @maps = sort map { $map = $_; $name = $fig->map_name($map); "$name ($map)" } $fig->all_maps;
341    
342                  $cgi->h2('Finding Candidates for a Functional Role'),      push( @$html, $cgi->h2('Finding Candidates for a Functional Role'),
343                  "Make sure that you type the functional role you want to search for in the Search Pattern above",                  "Make sure that you type the functional role you want to search for in the Search Pattern above",
344                  $cgi->br,                  $cgi->br,
345                  $cgi->submit('Find Genes in Org that Might Play the Role'),                  $cgi->submit('Find Genes in Org that Might Play the Role'),
346                  $cgi->hr,                  $cgi->hr);
347    
348                  $cgi->h2('Metabolic Overviews and Subsystem Maps (via KEGG & SEED) - Choose Map'),      push( @$html, $cgi->h2('Metabolic Overviews and Subsystem Maps (via KEGG & SEED) - Choose Map'),
349                  $cgi->submit('Metabolic Overview'),                  $cgi->submit('Metabolic Overview'),
350                  $cgi->br,                  $cgi->br,
351                  $cgi->br,                  $cgi->br,
# Line 293  Line 353 
353                                       -values => [@maps],                                       -values => [@maps],
354                                       -size => 10                                       -size => 10
355                                      ),                                      ),
356                  $cgi->hr,                  $cgi->hr);
357    
358                  $cgi->h2('Searching DNA or Protein Sequences (in a selected organism)'),      push( @$html, $cgi->h2('Searching DNA or Protein Sequences (in a selected organism)'),
359                  "<TABLE>\n",                  "<TABLE>\n",
360                  "    <TR>\n",                  "    <TR>\n",
361                  "        <TD>Sequence/Pattern: </TD>",                  "        <TD>Sequence/Pattern: </TD>",

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3