[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.168, Wed Nov 23 20:34:59 2005 UTC revision 1.169, Wed Nov 23 21:31:14 2005 UTC
# Line 646  Line 646 
646                          &org_of($fig_or_sprout,$id),                          &org_of($fig_or_sprout,$id),
647                          $who ? $who : " ",                          $who ? $who : " ",
648                          ($user ? &assign_link($cgi,$func,$user_func) : " "),                          ($user ? &assign_link($cgi,$func,$user_func) : " "),
649                          &set_ec_and_tc_links($fig_or_sprout,&genome_of($peg),$func)] } @funcs ];                          &set_ec_and_tc_links($fig_or_sprout,$cgi,&genome_of($peg),$func)] } @funcs ];
650      if (@$tab > 0) {      if (@$tab > 0) {
651          my $col_hdrs = ["Id","Organism","Who","ASSIGN","Assignment"];          my $col_hdrs = ["Id","Organism","Who","ASSIGN","Assignment"];
652          my $title    = "Assignments for Essentially Identical Proteins";          my $title    = "Assignments for Essentially Identical Proteins";
# Line 2051  Line 2051 
2051          } else {          } else {
2052              $comment = "";              $comment = "";
2053          }          }
2054          $comment = &set_ec_and_tc_links($fig_or_sprout,&genome_of($fid1),$comment);          $comment = &set_ec_and_tc_links($fig_or_sprout,$cgi,&genome_of($fid1),$comment);
2055          if ($fid1 eq $peg) {          if ($fid1 eq $peg) {
2056              $comment = "\@bgcolor=\"#00FF00\":$comment";              $comment = "\@bgcolor=\"#00FF00\":$comment";
2057          }          }
# Line 2172  Line 2172 
2172  }  }
2173    
2174  sub set_ec_and_tc_links {  sub set_ec_and_tc_links {
2175      my($fig_or_sprout,$org,$func) = @_;      my($fig_or_sprout,$cgi,$org,$func) = @_;
2176      Trace("Incoming functional assignment is \"$func\".") if T(EClink => 4);      Trace("Incoming functional assignment is \"$func\".") if T(EClink => 4);
2177      if ($func =~ /^(.*)(\d+\.\d+\.\d+\.\d+)(.*)$/) {      if ($func =~ /^(.*)(\d+\.\d+\.\d+\.\d+)(.*)$/) {
2178          my $before = $1;          my $before = $1;
2179          my $ec     = $2;          my $ec     = $2;
2180          my $after  = $3;          my $after  = $3;
2181          Trace("Matched EC case: ID = $ec.") if T(EClink => 4);          Trace("Matched EC case: ID = $ec.") if T(EClink => 4);
2182          return &set_ec_and_tc_links($fig_or_sprout,$org,$before) . &set_ec_to_maps($fig_or_sprout,$org,$ec) . &set_ec_and_tc_links($fig_or_sprout,$org,$after);          return &set_ec_and_tc_links($fig_or_sprout,$cgi,$org,$before) . &set_ec_to_maps($fig_or_sprout,$cgi,$org,$ec) . &set_ec_and_tc_links($fig_or_sprout,$cgi,$org,$after);
2183      }      }
2184      elsif ($func =~ /^(.*)(TC \d+(\.[0-9A-Z]+){3,6})(.*)$/) {      elsif ($func =~ /^(.*)(TC \d+(\.[0-9A-Z]+){3,6})(.*)$/) {
2185          my $before = $1;          my $before = $1;
2186          my $tc     = $2;          my $tc     = $2;
2187          my $after  = $4;          my $after  = $4;
2188          Trace("Matched TC case: ID = $tc.") if T(EClink => 4);          Trace("Matched TC case: ID = $tc.") if T(EClink => 4);
2189          return &set_ec_and_tc_links($fig_or_sprout,$org,$before) . &set_tc_link($fig_or_sprout,$org,$tc) . &set_ec_and_tc_links($fig_or_sprout,$org,$after);          return &set_ec_and_tc_links($fig_or_sprout,$cgi,$org,$before) . &set_tc_link($fig_or_sprout,$org,$tc) . &set_ec_and_tc_links($fig_or_sprout,$cgi,$org,$after);
2190      }      }
2191      return $func;      return $func;
2192  }  }
# Line 2203  Line 2203 
2203    
2204    
2205  sub set_ec_to_maps {  sub set_ec_to_maps {
2206      my($fig_or_sprout,$org,$ec) = @_;      my($fig_or_sprout,$cgi,$org,$ec) = @_;
2207    
2208      my @maps = &ec_to_maps($fig_or_sprout,$ec);      my @maps = &ec_to_maps($fig_or_sprout,$ec);
2209      if (@maps > 0) {      if (@maps > 0) {
# Line 2819  Line 2819 
2819          $url =~ s/[;&]translate(=[^;&])?//i or $url =~ s/translate(=[^;&])?[;&]//i;          $url =~ s/[;&]translate(=[^;&])?//i or $url =~ s/translate(=[^;&])?[;&]//i;
2820          $msg = "Turn Off Function Translation";          $msg = "Turn Off Function Translation";
2821      } else {      } else {
2822          $url .= ";translate=1";          $url .= "&translate=1";
2823          $msg = "Translate Function Assignments";          $msg = "Translate Function Assignments";
2824      }      }
2825      push(@$html, "<a href=\"$url\">$msg</a><br>\n");      push(@$html, "<a href=\"$url\">$msg</a><br>\n");

Legend:
Removed from v.1.168  
changed lines
  Added in v.1.169

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3