[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.115, Fri Jun 10 16:08:52 2005 UTC revision 1.116, Mon Jun 13 16:44:04 2005 UTC
# Line 331  Line 331 
331    
332      my $user = $cgi->param('user');      my $user = $cgi->param('user');
333      my $org     = &genome_of($peg);      my $org     = &genome_of($peg);
334      my $domain  = $fig_or_sprout->genome_domain($org);      my $domain  = &genome_domain($fig_or_sprout,$org);
335    
336      #...set default minimum size for euk or non-euk display region...      #...set default minimum size for euk or non-euk display region...
337      my $half_sz = ($domain =~ m/^euk/i) ? 50000 : 5000;      my $half_sz = ($domain =~ m/^euk/i) ? 50000 : 5000;
# Line 515  Line 515 
515      my $link2 = $cgi->self_url() . "&request=view_all_annotations";      my $link2 = $cgi->self_url() . "&request=view_all_annotations";
516      push(@$html,"<br><a href=$link1>To View Annotations</a> / <a href=$link2>To View All Related Annotations</a>\n");      push(@$html,"<br><a href=$link1>To View Annotations</a> / <a href=$link2>To View All Related Annotations</a>\n");
517    
518      if ((! $cgi->param('SPROUT')) && $fig_or_sprout->peg_in_gendb($peg))      if ((! $cgi->param('SPROUT')) && &peg_in_gendb($fig_or_sprout,$cgi,$peg))
519      {      {
520          push(@$html, "<br/>".&FIGGenDB::linkPEGGenDB($peg));          push(@$html, "<br/>".&FIGGenDB::linkPEGGenDB($peg));
521          push(@$html, "<br/>".&FIGGenDB::importOrganismGenDB($peg));          push(@$html, "<br/>".&FIGGenDB::importOrganismGenDB($peg));
# Line 737  Line 737 
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 $fig_or_sprout->subsystem_curator($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"}, $sub);
743    
# Line 800  Line 800 
800                    "</a>\n"                    "</a>\n"
801          );          );
802    
803      my @sims = sort { $a->[1] <=> $b->[1] } $fig_or_sprout->bbhs($peg, 1.0e-10, 0);      my @sims = sort { $a->[1] <=> $b->[1] } &bbhs($fig_or_sprout,$peg,1.0e-10);
804    
805      my @from = $cgi->radio_group(-name => 'from',      my @from = $cgi->radio_group(-name => 'from',
806                                   -nolabels => 1,                                   -nolabels => 1,
# Line 2106  Line 2106 
2106      my @closest;      my @closest;
2107      if ($cgi->param('SPROUT'))      if ($cgi->param('SPROUT'))
2108      {      {
2109          @closest = map { $_->[0] } sort { $a->[1] <=> $b->[1] } $fig_or_sprout->bbhs($peg, 1.0e-10, 0);          @closest = map { $_->[0] } sort { $a->[1] <=> $b->[1] } &bbhs($fig_or_sprout,$peg, 1.0e-10);
2110      }      }
2111      else      else
2112      {      {
# Line 2298  Line 2298 
2298      foreach $peg1 (@$all_pegs)      foreach $peg1 (@$all_pegs)
2299      {      {
2300          $i = $in{$peg1};          $i = $in{$peg1};
2301          foreach $peg2 (map { $_->[0] } $fig_or_sprout->bbhs($peg1, 1.0e-10, 0))          foreach $peg2 (map { $_->[0] } bbhs($fig_or_sprout,$peg1,1.0e-10))
2302          {          {
2303              $j = $in{$peg2};              $j = $in{$peg2};
2304              if (defined($i) && defined($j))              if (defined($i) && defined($j))
# Line 2800  Line 2800 
2800  }  }
2801    
2802  sub cgi_url {  sub cgi_url {
2803      return &FIG::plug_url($FIG_Config::cgi_url);      my($fig_or_sprout) = @_;
2804    
2805        return $fig_or_sprout->cgi_url();
2806  }  }
2807    
2808    
# Line 2864  Line 2866 
2866   my($fig_or_sprout, $prot, $tag, $value, $url)=@_;   my($fig_or_sprout, $prot, $tag, $value, $url)=@_;
2867    
2868   return $fig_or_sprout->change_attribute($prot, $tag, $value, $url);   return $fig_or_sprout->change_attribute($prot, $tag, $value, $url);
   
2869  }  }
2870    
2871  sub add_attribute {  sub add_attribute {
# Line 2884  Line 2885 
2885    
2886   return $fig_or_sprout->get_attributes($prot);   return $fig_or_sprout->get_attributes($prot);
2887  }  }
2888    
2889    ###### Must be added #######
2890    
2891    sub genome_domain {
2892        my($fig_or_sprout,$org) = @_;
2893    
2894        return "B";
2895        return $fig_or_sprout->genome_domain($org);
2896    }
2897    
2898    sub peg_in_gendb {
2899        my($fig_or_sprout,$cgi,$peg) = @_;
2900    
2901        if ($cgi->param('SPROUT'))  { return 0 }
2902        return $fig_or_sprout->peg_in_gendb($peg);
2903    }
2904    
2905    sub subsystem_curator {
2906        my($fig_or_sprout,$sub) = @_;
2907    
2908        return "unknown";
2909        return $fig_or_sprout->subsystem_curator($sub);
2910    }
2911    
2912    sub bbhs {
2913        my($fig_or_sprout,$peg,$cutoff) = @_;
2914    
2915        return ();
2916        return $fig_or_sprout->bbhs($peg,$cutoff);
2917    }

Legend:
Removed from v.1.115  
changed lines
  Added in v.1.116

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3