[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.121, Mon Jun 27 20:00:55 2005 UTC revision 1.122, Tue Jun 28 02:30:40 2005 UTC
# Line 497  Line 497 
497      my($fig_or_sprout,$cgi,$html,$peg,$user,$has_translation) = @_;      my($fig_or_sprout,$cgi,$html,$peg,$user,$has_translation) = @_;
498    
499      my $sims = $cgi->param('sims');      my $sims = $cgi->param('sims');
500      if ( (! $sims ) && $has_translation && ( ! $cgi->param('SPROUT') ) )      if ( (! $sims ) && $has_translation)
501      {      {
502          my $short_form = 1;          my $short_form = 1;
503          sims_request_form( $fig_or_sprout, $cgi, $html, $peg, $user, $short_form );          sims_request_form( $fig_or_sprout, $cgi, $html, $peg, $user, $short_form );
504      }      }
505    
506      #  Added test $has_translation && (...) -- GJO      #  Added test $has_translation && (...) -- GJO
507      elsif ( $has_translation && ( $sims || $cgi->param('SPROUT') ) )      elsif ( $has_translation && $sims)
508      {      {
509          print_similarities( $fig_or_sprout, $cgi, $html, $peg );          print_similarities( $fig_or_sprout, $cgi, $html, $peg );
510      }      }
# Line 733  Line 733 
733    
734          @hdrs = ("Subsystem", "Role");          @hdrs = ("Subsystem", "Role");
735    
736          my $sprout = ""; # $cgi->param('SPROUT') ? 1 : "";          my $sprout = $cgi->param('SPROUT') ? 1 : "";
737    
738          for my $ent (@subsystems) {          for my $ent (@subsystems) {
739              my($sub, $role) = @$ent;              my($sub, $role) = @$ent;
740              my $can_alter = (($user = $cgi->param('user')) && ($user eq subsystem_curator($fig_or_sprout,$sub)));              my $can_alter = (($user = $cgi->param('user')) && ($user eq subsystem_curator($fig_or_sprout,$sub)));
741              my $esc_sub = uri_escape($sub);  # in URI::Escape              my $esc_sub = uri_escape($sub);  # in URI::Escape
742              my $url = $cgi->a({href => "subsys.cgi?can_alter=$can_alter&SPROUT=$sprout&user=$user&ssa_name=$esc_sub&request=show_ssa"}, $sub);              my $url = $cgi->a({href => "subsys.cgi?can_alter=$can_alter&SPROUT=$sprout&user=$user&ssa_name=$esc_sub&request=show_ssa&show_clusters=1&sort=by_phylo"}, $sub);
743    
744              push(@table, [$url, $role]);              push(@table, [$url, $role]);
745          }          }
# Line 791  Line 791 
791  sub print_similarities_SPROUT {  sub print_similarities_SPROUT {
792      my($fig_or_sprout, $cgi, $html, $peg ) = @_;      my($fig_or_sprout, $cgi, $html, $peg ) = @_;
793    
794        $cgi->delete('sims');
795    
796      my $user = $cgi->param('user') || "";      my $user = $cgi->param('user') || "";
797    
798      my $current_func = &trans_function_of($cgi,$fig_or_sprout,$peg,$user);      my $current_func = &trans_function_of($cgi,$fig_or_sprout,$peg,$user);
799    
800      push( @$html, $cgi->hr,      push( @$html, $cgi->hr,
# Line 1369  Line 1372 
1372  sub sims_request_form {  sub sims_request_form {
1373      my ( $fig, $cgi, $html, $peg, $user, $short_form ) = @_;      my ( $fig, $cgi, $html, $peg, $user, $short_form ) = @_;
1374    
1375        my $trans_role = $cgi->param('translate')            ||  0;
1376    
1377        if ($cgi->param('SPROUT'))
1378        {
1379            &sprout_sims_request_form($cgi,$html,$peg,$trans_role,$user);
1380            return;
1381        }
1382    
1383      #  Read available parameters, and fill in defaults:      #  Read available parameters, and fill in defaults:
1384    
1385      my $maxN       = defined( $cgi->param('maxN') )       ? $cgi->param('maxN')       : 50;      my $maxN       = defined( $cgi->param('maxN') )       ? $cgi->param('maxN')       : 50;
# Line 1379  Line 1390 
1390      my $hide_alias = $cgi->param('hide_alias')           ||  0;      my $hide_alias = $cgi->param('hide_alias')           ||  0;
1391      my $sort_by    = $cgi->param('sort_by')              || 'bits';      my $sort_by    = $cgi->param('sort_by')              || 'bits';
1392      my $group_by_genome = $cgi->param('group_by_genome') ||  0;      my $group_by_genome = $cgi->param('group_by_genome') ||  0;
     my $trans_role = $cgi->param('translate')            ||  0;  
1393      my $expand_groups = $cgi->param('expand_groups')     ||  0;      my $expand_groups = $cgi->param('expand_groups')     ||  0;
1394    
1395      #  New similarity options      #  New similarity options
# Line 1645  Line 1655 
1655      }      }
1656  }  }
1657    
1658    sub sprout_sims_request_form {
1659        my($cgi,$html,$peg,$trans_role,$user) = @_;
1660    
1661            push @$html, <<"End_Short_Form";
1662    
1663    <FORM Action=\"protein.cgi\">
1664        <input type=hidden name=prot      value=\"$peg\">
1665        <input type=hidden name=sims      value=1>
1666        <input type=hidden name=SPROUT    value=1>
1667        <input type=hidden name=user      value=\"$user\">
1668        <input type=hidden name=translate value=$trans_role>
1669        <input type=submit name='Bidirectional Best Hits' value='Bidirectional Best Hits'>
1670    
1671    </FORM>
1672    
1673    End_Short_Form
1674    }
1675    
1676    
1677  #------------------------------------------------------------------------  #------------------------------------------------------------------------
1678  #  Auxilliary function to acivate checkmark for input fields  #  Auxilliary function to acivate checkmark for input fields

Legend:
Removed from v.1.121  
changed lines
  Added in v.1.122

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3