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

Diff of /FigWebServices/protein.cgi

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

revision 1.99, Fri Mar 11 03:04:32 2005 UTC revision 1.100, Mon Mar 14 01:22:32 2005 UTC
# Line 485  Line 485 
485      #  Added test $has_translation && (...) -- GJO      #  Added test $has_translation && (...) -- GJO
486      elsif ( $has_translation && ( $sims || $cgi->param('SPROUT') ) )      elsif ( $has_translation && ( $sims || $cgi->param('SPROUT') ) )
487      {      {
488          &print_similarities($fig_or_sprout,$cgi,$html,$peg);          print_similarities( $fig_or_sprout, $cgi, $html, $peg );
489      }      }
490  }  }
491    
# Line 682  Line 682 
682      }      }
683      push(@$html,$cgi->start_form(-action=>"protein.cgi"), $cgi->hidden("prot"), $cgi->hidden("user"));      push(@$html,$cgi->start_form(-action=>"protein.cgi"), $cgi->hidden("prot"), $cgi->hidden("user"));
684      push(@$html,$cgi->br,$cgi->hr,&HTML::make_table($col_hdrs, $tab,"Attributes"),$cgi->hr);      push(@$html,$cgi->br,$cgi->hr,&HTML::make_table($col_hdrs, $tab,"Attributes"),$cgi->hr);
685        #  Add end of form -- GJO
686        push( @$html, $cgi->end_form );
687  }  }
688    
689  sub who {  sub who {
# Line 803  Line 805 
805      if ($user) {      if ($user) {
806          my $help_url = "Html/help_for_assignments_and_rules.html";          my $help_url = "Html/help_for_assignments_and_rules.html";
807          push ( @$html, $cgi->br, $cgi->br,          push ( @$html, $cgi->br, $cgi->br,
808                         "<a href=$help_url>Help on Assignments, Rules, and Checkboxes</a>",                         "<a href=$help_url target=\"SEED_or_SPROUT_help\">Help on Assignments, Rules, and Checkboxes</a>",
809                         $cgi->br, $cgi->br,                         $cgi->br, $cgi->br,
810                         $cgi->submit('assign/annotate')                         $cgi->submit('assign/annotate')
811                 );                 );
# Line 945  Line 947 
947      my $user = $cgi->param('user') || "";      my $user = $cgi->param('user') || "";
948      my $current_func = &trans_function_of( $cgi, $fig_or_sprout, $peg, $user );      my $current_func = &trans_function_of( $cgi, $fig_or_sprout, $peg, $user );
949    
950      push( @$html, $cgi->hr,      push @$html, $cgi->hr,
951                    "<a name=Similarities>", $cgi->h1('Similarities'), "</a>\n"                   "<a name=Similarities>",   #  Put an anchor on the heading
952          );                   $cgi->h2('Similarities'),
953                     "</a>\n";
954    
955      #  Generate the request form, and return current option values in hash      #  Generate the request form, and return current option values in hash
956    
# Line 1023  Line 1026 
1026          if ($user) {          if ($user) {
1027              my $help_url = "Html/help_for_assignments_and_rules.html";              my $help_url = "Html/help_for_assignments_and_rules.html";
1028              push ( @$html, $cgi->br, $cgi->br,              push ( @$html, $cgi->br, $cgi->br,
1029                         "<a href=$help_url>Help on Assignments, Rules, and Checkboxes</a>",                         "<a href=$help_url target=\"SEED_or_SPROUT_help\">Help on Assignments, Rules, and Checkboxes</a>",
1030                         $cgi->br, $cgi->br,                         $cgi->br, $cgi->br,
1031                         $cgi->submit('assign/annotate')                         $cgi->submit('assign/annotate')
1032               );               );
# Line 1046  Line 1049 
1049              );              );
1050    
1051          my $col_hdrs;          my $col_hdrs;
1052          my $color_help = "(<A href=\"Html/similarity_region_colors.html\">colors explained</A>)";          my $color_help = "(<A href=\"Html/similarity_region_colors.html\" target=\"SEED_or_SPROUT_help\">colors explained</A>)";
1053          my $func_clr_help = "(<A href=\"Html/function_colors.html\">colors explained</A>)";          my $func_clr_help = "(<A href=\"Html/function_colors.html\" target=\"SEED_or_SPROUT_help\">colors explained</A>)";
1054    
1055          if ($user && $cgi->param('translate')) {          if ($user && $cgi->param('translate')) {
1056              push( @$html, " ASSIGN to/Translate from/SELECT current PEG", $cgi->br,              push( @$html, " ASSIGN to/Translate from/SELECT current PEG", $cgi->br,
# Line 1250  Line 1253 
1253                            "\t\t<TD Nowrap Bgcolor=$color2>$reg2</TD>\n",                            "\t\t<TD Nowrap Bgcolor=$color2>$reg2</TD>\n",
1254                            "\t\t<TD Nowrap Bgcolor=$color1>$reg1</TD>\n",                            "\t\t<TD Nowrap Bgcolor=$color1>$reg1</TD>\n",
1255                            $user ? "\t\t<TD Align=center>$radio</TD>\n" : (),                            $user ? "\t\t<TD Align=center>$radio</TD>\n" : (),
1256                            "\t\t<TD>$in_sub</TD>",                            "\t\t<TD Align=center>$in_sub</TD>",
1257                            "\t\t<TD Bgcolor=$color3>$func2</TD>\n",                            "\t\t<TD Bgcolor=$color3>$func2</TD>\n",
1258                            #                            #
1259                            #  Colorize organism by Domain                            #  Colorize organism by Domain
# Line 1289  Line 1292 
1292      my $hue = 5/6 * 0.5*($l+$r)/$n - 1/12;      my $hue = 5/6 * 0.5*($l+$r)/$n - 1/12;
1293      my $cov = ( $r - $l + 1 ) / $n;      my $cov = ( $r - $l + 1 ) / $n;
1294      my $sat = 1 - 10 * $cov / 9;      my $sat = 1 - 10 * $cov / 9;
     # my $br  = 0.8 + 0.2 * $cov;  
1295      my $br  = 1;      my $br  = 1;
1296      rgb2html( hsb2rgb( $hue, $sat, $br ) );      rgb2html( hsb2rgb( $hue, $sat, $br ) );
1297  }  }
# Line 1360  Line 1362 
1362      my $select     = $cgi->param('select')               || 'all';      my $select     = $cgi->param('select')               || 'all';
1363      my $show_env   = $cgi->param('show_env')             ||  0;      my $show_env   = $cgi->param('show_env')             ||  0;
1364      my $hide_alias = $cgi->param('hide_alias')           ||  0;      my $hide_alias = $cgi->param('hide_alias')           ||  0;
1365        my $sort_by    = $cgi->param('sort_by')              || 'bits';
1366      my $group_by_genome = $cgi->param('group_by_genome') ||  0;      my $group_by_genome = $cgi->param('group_by_genome') ||  0;
1367      my $trans_role = $cgi->param('translate')            ||  0;      my $trans_role = $cgi->param('translate')            ||  0;
1368      my $expand_groups = $cgi->param('expand_groups')     ||  0;      my $expand_groups = $cgi->param('expand_groups')     ||  0;
# Line 1381  Line 1384 
1384      #  Make defaults completely open (match original behavior)      #  Make defaults completely open (match original behavior)
1385    
1386      my $min_sim   = $extra_opt && defined( $cgi->param('min_sim') )   ? $cgi->param('min_sim')   : 0;      my $min_sim   = $extra_opt && defined( $cgi->param('min_sim') )   ? $cgi->param('min_sim')   : 0;
1387        my $sim_meas  = $extra_opt && defined( $cgi->param('sim_meas') )  ? $cgi->param('sim_meas')  : 'id';
1388      my $min_q_cov = $extra_opt && defined( $cgi->param('min_q_cov') ) ? $cgi->param('min_q_cov') : 0;      my $min_q_cov = $extra_opt && defined( $cgi->param('min_q_cov') ) ? $cgi->param('min_q_cov') : 0;
1389      my $min_s_cov = $extra_opt && defined( $cgi->param('min_s_cov') ) ? $cgi->param('min_s_cov') : 0;      my $min_s_cov = $extra_opt && defined( $cgi->param('min_s_cov') ) ? $cgi->param('min_s_cov') : 0;
     my $sim_meas  = $extra_opt && defined( $cgi->param('sim_meas') )  ? $cgi->param('sim_meas')  : 'id';  
     my $sort_by   = $extra_opt && defined( $cgi->param('sort_by') )   ? $cgi->param('sort_by')   : 'bits';  
1390    
1391      #  New parameters.  Not yet implimented.      #  New parameters.  Not yet implimented.
1392      #  The defaults for representative sequences might be tuned:      #  The defaults for representative sequences might be tuned:
# Line 1398  Line 1400 
1400    
1401      my $chk_which = $extra_opt && defined( $cgi->param('chk_which') ) ? $cgi->param('chk_which')  : 'none';      my $chk_which = $extra_opt && defined( $cgi->param('chk_which') ) ? $cgi->param('chk_which')  : 'none';
1402    
   
1403      #  Use $cgi->param('more similarities') to drive increase in maxN and max_expand      #  Use $cgi->param('more similarities') to drive increase in maxN and max_expand
1404    
1405      if ( $cgi->param('more similarities') ) {      if ( $cgi->param('more similarities') ) {
# Line 1407  Line 1408 
1408          $cgi->delete('more similarities');          $cgi->delete('more similarities');
1409      }      }
1410    
     #  We have processed all options.  Use them to build forms.  
   
1411      #  Sanity checks on fixed vocabulary parameter values:      #  Sanity checks on fixed vocabulary parameter values:
1412    
1413      $select    = 'all'  unless $select     eq 'fig' || $select eq 'fig_pref';      $select    = 'all'  unless $select     eq 'fig' || $select eq 'fig_pref';
1414        $sort_by   = 'bits' unless $sort_by   eq 'id'  || $sort_by   eq 'bpp';
1415      $sim_meas  = 'id'   unless $sim_meas   eq 'bpp';      $sim_meas  = 'id'   unless $sim_meas   eq 'bpp';
1416      $chk_which = 'none' unless $chk_which  eq 'all' || $chk_which eq 'rep';      $chk_which = 'none' unless $chk_which  eq 'all' || $chk_which eq 'rep';
1417    
1418        #  We have processed all options.  Use them to build forms.
1419    
1420      #  Checkmarks for input tags      #  Checkmarks for input tags
1421    
1422      my $chk_select_all  = select_if( $select eq 'all' );      my $chk_select_all  = select_if( $select eq 'all' );
# Line 1436  Line 1438 
1438    
1439          push @$html, <<"End_Short_Form";          push @$html, <<"End_Short_Form";
1440    
 <A href=\"Html/similarities_options.html\">Help with SEED similarities options</A>  
1441  <FORM Action=\"protein.cgi#Similarities\">  <FORM Action=\"protein.cgi#Similarities\">
1442      <input type=hidden name=prot      value=\"$peg\">      <input type=hidden name=prot      value=\"$peg\">
1443      <input type=hidden name=sims      value=1>      <input type=hidden name=sims      value=1>
# Line 1444  Line 1445 
1445      <input type=hidden name=user      value=\"$user\">      <input type=hidden name=user      value=\"$user\">
1446      <input type=hidden name=translate value=$trans_role>      <input type=hidden name=translate value=$trans_role>
1447    
1448      <input type=submit name=Similarities value=Similarities>      <input type=submit name=Similarities value=Similarities> &nbsp;&nbsp;
1449      Max sims:<input type=text name=maxN size=5 value=$maxN>      Max sims:<input type=text name=maxN size=5 value=$maxN> &nbsp;&nbsp;
1450      Max expand:<input type=text name=max_expand size=5 value=$max_expand>      Max expand:<input type=text name=max_expand size=5 value=$max_expand> &nbsp;&nbsp;
1451      Max E-val:<input type=text name=maxP size=8 value=$maxP>      Max E-val:<input type=text name=maxP size=8 value=$maxP> &nbsp;&nbsp;
1452      <select name=select>      <select name=select>
1453          <option value=all      $chk_select_all>Show all databases</option>          <option value=all      $chk_select_all>Show all databases</option>
1454          <option value=fig_pref $chk_select_figp>FIG IDs preferred</option>          <option value=fig_pref $chk_select_figp>FIG IDs preferred</option>
1455          <option value=fig      $chk_select_fig>Just FIG IDs</option>          <option value=fig      $chk_select_fig>Just FIG IDs</option>
1456      </select>      </select> &nbsp;&nbsp;
1457      Show Env. samples:<input type=checkbox name=show_env value=1 $chk_show_env>      Show Env. samples:<input type=checkbox name=show_env value=1 $chk_show_env> &nbsp;&nbsp;
1458      Hide aliases:<input type=checkbox name=hide_alias value=1 $chk_hide_alias><br />      Hide aliases:<input type=checkbox name=hide_alias value=1 $chk_hide_alias><br />
1459    
1460      Sort by      Sort by
# Line 1461  Line 1462 
1462          <option value=bits $chk_sort_by_id>score</option>          <option value=bits $chk_sort_by_id>score</option>
1463          <option value=id   $chk_sort_by_id>percent identity</option>          <option value=id   $chk_sort_by_id>percent identity</option>
1464          <option value=bpp  $chk_sort_by_bpp>score per position</option>          <option value=bpp  $chk_sort_by_bpp>score per position</option>
1465      </select>      </select> &nbsp;&nbsp;
1466      Group by genome:<input type=checkbox name=group_by_genome value=1 $chk_group_by_genome><br />      Group by genome:<input type=checkbox name=group_by_genome value=1 $chk_group_by_genome>
1467        &nbsp;&nbsp;&nbsp;
1468        <A href=\"Html/similarities_options.html\" target=\"SEED_or_SPROUT_help\">Help with SEED similarities options</A><BR />
1469  </FORM>  </FORM>
1470    
1471  End_Short_Form  End_Short_Form
1472    
1473      }      }
# Line 1505  Line 1509 
1509    
1510          push @$html, <<"End_Default_Options";          push @$html, <<"End_Default_Options";
1511    
 <A href=\"Html/similarities_options.html\">Help with SEED similarities options</A>  
1512  <FORM Action=\"protein.cgi#Similarities\">  <FORM Action=\"protein.cgi#Similarities\">
1513      <input type=hidden name=prot      value=\"$peg\">      <input type=hidden name=prot      value=\"$peg\">
1514      <input type=hidden name=sims      value=1>      <input type=hidden name=sims      value=1>
# Line 1513  Line 1516 
1516      <input type=hidden name=user      value=\"$user\">      <input type=hidden name=user      value=\"$user\">
1517      <input type=hidden name=translate value=$trans_role>      <input type=hidden name=translate value=$trans_role>
1518    
1519      Max sims:<input type=text name=maxN size=5 value=$maxN>      Max sims:<input type=text name=maxN size=5 value=$maxN> &nbsp;&nbsp;
1520      Max expand:<input type=text name=max_expand size=5 value=$max_expand>      Max expand:<input type=text name=max_expand size=5 value=$max_expand> &nbsp;&nbsp;
1521      Max E-val:<input type=text name=maxP size=8 value=$maxP>      Max E-val:<input type=text name=maxP size=8 value=$maxP> &nbsp;&nbsp;
1522      <select name=select>      <select name=select>
1523          <option value=all      $chk_select_all>Show all databases</option>          <option value=all      $chk_select_all>Show all databases</option>
1524          <option value=fig_pref $chk_select_figp>FIG IDs preferred</option>          <option value=fig_pref $chk_select_figp>FIG IDs preferred</option>
1525          <option value=fig      $chk_select_fig>Just FIG IDs</option>          <option value=fig      $chk_select_fig>Just FIG IDs</option>
1526      </select>      </select> &nbsp;&nbsp;
1527      Show Env. samples:<input type=checkbox name=show_env value=1 $chk_show_env>      Show Env. samples:<input type=checkbox name=show_env value=1 $chk_show_env> &nbsp;&nbsp;
1528      Hide aliases:<input type=checkbox name=hide_alias value=1 $chk_hide_alias><br />      Hide aliases:<input type=checkbox name=hide_alias value=1 $chk_hide_alias><br />
1529    
1530      Sort by      Sort by
# Line 1529  Line 1532 
1532          <option value=bits $chk_sort_by_id>score</option>          <option value=bits $chk_sort_by_id>score</option>
1533          <option value=id   $chk_sort_by_id>percent identity</option>          <option value=id   $chk_sort_by_id>percent identity</option>
1534          <option value=bpp  $chk_sort_by_bpp>score per position</option>          <option value=bpp  $chk_sort_by_bpp>score per position</option>
1535      </select>      </select> &nbsp;&nbsp;
1536      Group by genome:<input type=checkbox name=group_by_genome value=1 $chk_group_by_genome><br />      Group by genome:<input type=checkbox name=group_by_genome value=1 $chk_group_by_genome> &nbsp;&nbsp;&nbsp;
1537        <A href=\"Html/similarities_options.html\" target=\"SEED_or_SPROUT_help\">Help with SEED similarities options</A><br />
1538  End_Default_Options  End_Default_Options
1539    
1540          #  Extra options          #  Extra options
# Line 1543  Line 1547 
1547      <select name=sim_meas>      <select name=sim_meas>
1548          <option value=id  $chk_sim_meas_id>identities (0-100%)</option>          <option value=id  $chk_sim_meas_id>identities (0-100%)</option>
1549          <option value=bpp $chk_sim_meas_bpp>score per position (0-2 bits)</option>          <option value=bpp $chk_sim_meas_bpp>score per position (0-2 bits)</option>
1550      </select>      </select> &nbsp;&nbsp;
1551      Min query cover (%):<input type=text name=min_q_cov size=5 value=$min_q_cov>      Min query cover (%):<input type=text name=min_q_cov size=5 value=$min_q_cov> &nbsp;&nbsp;
1552      Min subject cover (%):<input type=text name=min_s_cov size=5 value=$min_s_cov><br />      Min subject cover (%):<input type=text name=min_s_cov size=5 value=$min_s_cov><br />
1553    
1554      <!--  Hide unimplimented options      <!--  Hide unimplimented options
# Line 1579  Line 1583 
1583      $next_peg_btn      $next_peg_btn
1584      $extra_opt_btn      $extra_opt_btn
1585  </FORM>  </FORM>
1586    
1587  End_of_Buttons  End_of_Buttons
1588    
1589      }      }

Legend:
Removed from v.1.99  
changed lines
  Added in v.1.100

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3