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

Diff of /FigWebServices/subsys.cgi

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

revision 1.90, Thu Jul 14 07:06:30 2005 UTC revision 1.91, Thu Jul 14 22:20:36 2005 UTC
# Line 318  Line 318 
318  }  }
319    
320  &HTML::show_page($cgi,$html);  &HTML::show_page($cgi,$html);
321    exit;
322    
323    
324  sub show_initial {  sub show_initial {
# Line 793  Line 794 
794      }      }
795    
796    
797        #  Display the subsystem table rows, saving the list genomes displayed
798    
799        my $active_genome_list = &format_rows($fig,$cgi,$html,$subsystem, $tagvalcolor);
800    
     &format_rows($fig,$cgi,$html,$subsystem, $tagvalcolor);  
801    
802          if ( $can_alter ) { format_extend_with($fig,$cgi,$html,$subsystem) }          if ( $can_alter ) { format_extend_with($fig,$cgi,$html,$subsystem) }
803    
# Line 831  Line 834 
834      unshift(@options, undef);      unshift(@options, undef);
835      push(@$html,"color columns by each PEGs attribute:   ", $cgi->popup_menu(-name => 'color_by_peg_tag', -values=>\@options), $cgi->br);      push(@$html,"color columns by each PEGs attribute:   ", $cgi->popup_menu(-name => 'color_by_peg_tag', -values=>\@options), $cgi->br);
836    
837      push(@$html,$cgi->checkbox(-name => 'show_missing', -value => 1, -checked => 0, -override => 1,-label => 'show missing'),$cgi->br);      push @$html, $cgi->checkbox(-name => 'show_missing', -value => 1, -checked => 0, -override => 1,-label => 'show missing'),
838                     $cgi->br, $cgi->br;
839    
     push(@$html,$cgi->checkbox(-name => 'show_missing_including_matches', -value => 1, -checked => 0, -override => 1,-label => 'show missing with matches'),  
                 "    [To restrict to a single genome: ",  
                 $cgi->textfield(-name => "just_genome", -size => 15),"]",  
                 "    [To restrict to a single role: ",  
                 $cgi->textfield(-name => "just_role", -size => 15),"]",  
                 $cgi->br,$cgi->br  
         );  
840    
841        #  Format the organism list for a pop-up menu:
842    
843      push(@$html,$cgi->checkbox(-name => 'show_missing_including_matches_in_ss', -value => 1, -checked => 0, -override => 1,-label => 'show missing with matches in ss'),      my @genomes = map { [ $_->[0], "$_->[1] [$_->[0]]" ] } @$active_genome_list;
844                  "    [To restrict to a single genome: ",      unshift @genomes, [ '', 'select it in this menu' ];
                 $cgi->textfield(-name => "just_genome", -size => 15),"]",  
                 "    [To restrict to a single role: ",  
                 $cgi->textfield(-name => "just_role", -size => 15),"]",  
                 $cgi->br,$cgi->br  
         );  
845    
846        # Make a list of index number and roles for pop-up selections:
847    
848        my @roles = map { [ $subsystem->get_role_index( $_ ) + 1, $_ ] } $subsystem->get_roles;
849        unshift @roles, [ '', 'select it in this menu' ];
850    
851        push @$html,  "<table><tr><td>",
852                      $cgi->checkbox(-name => 'show_missing_including_matches', -value => 1, -checked => 0, -override => 1,-label => 'show missing with matches'), $cgi->br,
853                      $cgi->checkbox(-name => 'show_missing_including_matches_in_ss', -value => 1, -checked => 0, -override => 1,-label => 'show missing with matches in ss'), "&nbsp;&nbsp;",
854                      "</td>\n",
855                      "<td>",
856                      "[To restrict to a single genome: ",
857                      $cgi->popup_menu( -name   => 'just_genome',
858                                        -values => [ map {   $_->[0]            } @genomes ],
859                                        -labels => { map { ( $_->[0], $_->[1] ) } @genomes }
860                                      ), "]", $cgi->br,
861                      "[To restrict to a single role: ",
862                      $cgi->popup_menu( -name   => 'just_role',
863                                        -values => [ map {   $_->[0]            } @roles ],
864                                        -labels => { map { ( $_->[0], $_->[1] ) } @roles }
865                                      ),
866                      "]</td></tr></table>\n",
867                      $cgi->br;
868    
869    
870        push @$html,  "<table><tr><td>",
871                      $cgi->checkbox(-name => 'check_assignments', -value => 1, -checked => 0, -override => 1, -label => 'check assignments'),
872                      "&nbsp;&nbsp;[", $cgi->checkbox(-name => 'strict_check', -value => 1, -checked => 0, -override => 1, -label => 'strict'), "]&nbsp;&nbsp;",
873                      "</td>\n",
874                      "<td>",
875                      "[To restrict to a single genome: ",
876                      $cgi->popup_menu( -name   => 'just_genome_assignments',
877                                        -values => [ map {   $_->[0]            } @genomes ],
878                                        -labels => { map { ( $_->[0], $_->[1] ) } @genomes }
879                                      ), "]", $cgi->br,
880                      "[To restrict to a single role: ",
881                      $cgi->popup_menu( -name   => 'just_role_assignments',
882                                        -values => [ map {   $_->[0]            } @roles ],
883                                        -labels => { map { ( $_->[0], $_->[1] ) } @roles }
884                                      ),
885                      "]</td></tr></table>\n",
886                      $cgi->br;
887    
     push(@$html,$cgi->checkbox(-name => 'check_assignments', -value => 1, -checked => 0, -override => 1,-label => 'check assignments'),  
                 '&nbsp;&nbsp;[',  
                 $cgi->checkbox(-name => 'strict_check', -value => 1, -checked => 0, -override => 1,-label => 'strict'),  
                 ']',  
                 "&nbsp; &nbsp; [To restrict to a single genome: ",  
                 $cgi->textfield(-name => "just_genome_assignments", -size => 15),"]",  
                 "&nbsp; &nbsp; [To restrict to a single role: ",  
                 $cgi->textfield(-name => "just_role_assignments", -size => 15),"]",  
                 $cgi->br.$cgi->br  
         );  
888    
889      if ($can_alter)      if ($can_alter)
890      {      {
# Line 1326  Line 1350 
1350      return "<a href=$url target=$target>Show Phylogenetic Tree</a>";      return "<a href=$url target=$target>Show Phylogenetic Tree</a>";
1351  }  }
1352    
1353    
1354    #  There is a lot of blood, sweat and tears that go into computing the active
1355    #  set of rows.  This is useful information to have later, when the user can
1356    #  select genomes to be checked.  We will return the genome list as a reference
1357    #  to a list of [ genomme_number => name ] pairs. -- GJO
1358    
1359  sub format_rows {  sub format_rows {
1360      my($fig,$cgi,$html,$subsystem, $tagvalcolor) = @_;      my($fig,$cgi,$html,$subsystem, $tagvalcolor) = @_;
1361      my($i,%alternatives);      my($i,%alternatives);
1362        my $active_genome_list = [];
1363    
1364      my $ignore_alt = $cgi->param('ignore_alt');      my $ignore_alt = $cgi->param('ignore_alt');
1365    
# Line 1422  Line 1453 
1453              next if ( $variant_list && ( ! $variant_list->{ $vcode_value } ) );              next if ( $variant_list && ( ! $variant_list->{ $vcode_value } ) );
1454    
1455              $row = [$genome, &ext_genus_species($fig,$genome),$vcode_value];              $row = [$genome, &ext_genus_species($fig,$genome),$vcode_value];
1456                push @$active_genome_list, [ $row->[0], $row->[1] ];   #  Save a list of the active genomes
1457    
1458              @pegs = ();              @pegs = ();
1459              @cells = ();              @cells = ();
# Line 1682  Line 1714 
1714      {      {
1715       push(@$html, &HTML::make_table(undef,&describe_colors($tagvalcolor),"Color Descriptions<br><small>Link limits display to those organisms</small>"));       push(@$html, &HTML::make_table(undef,&describe_colors($tagvalcolor),"Color Descriptions<br><small>Link limits display to those organisms</small>"));
1716      }      }
1717    
1718        return $active_genome_list;  # [ [ id1, gs1 ], [ id2, gs2 ], ... ]
1719  }  }
1720    
1721    
1722  sub group_by_clusters {  sub group_by_clusters {
1723      my($fig,$pegs) = @_;      my($fig,$pegs) = @_;
1724      my($peg,@clusters,@cluster,@colors,$color,%seen,%conn,$x,$peg1,@pegs,$i);      my($peg,@clusters,@cluster,@colors,$color,%seen,%conn,$x,$peg1,@pegs,$i);

Legend:
Removed from v.1.90  
changed lines
  Added in v.1.91

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3