[Bio] / FigKernelPackages / HTML.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/HTML.pm

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

revision 1.10, Sat Apr 3 18:30:57 2004 UTC revision 1.11, Mon May 3 17:04:11 2004 UTC
# Line 298  Line 298 
298      }      }
299  }  }
300    
301    sub set_ec_links {
302        my($cgi,$x) = @_;
303        my($before,$match,$after);
304    
305        if ($x =~ /^(.*)(EC \d+\.\d+\.\d+\.\d+)(.*)/s)
306        {
307            $before = $1;
308            $match = $2;
309            $after = $3;
310            return &set_ec_links($cgi,$before) . &HTML::ec_link($match) . &set_ec_links($cgi,$after);
311        }
312        return $x;
313    }
314    
315  sub ec_link {  sub ec_link {
316      my($role) = @_;      my($role) = @_;
317    
# Line 475  Line 489 
489      my($cgi,$x) = @_;      my($cgi,$x) = @_;
490      my($before,$match,$after);      my($before,$match,$after);
491    
492      if ($x =~ /^(.*)(fig\|\d+\.\d+\.peg\.\d+)(.*)$/)      if ($x =~ /^(.*)(fig\|\d+\.\d+\.peg\.\d+)(.*)/s)
493      {      {
494          $before = $1;          $before = $1;
495          $match = $2;          $match = $2;
496          $after = $3;          $after = $3;
497          return &set_prot_links($cgi,$before) . &HTML::fid_link($cgi,$match) . &set_prot_links($cgi,$after) . "\n";          return &set_prot_links($cgi,$before) . &HTML::fid_link($cgi,$match) . &set_prot_links($cgi,$after);
498      }      }
499      elsif ($x =~ /^(.*)(gi\|\d+)(.*)$/)      elsif ($x =~ /^(.*)(gi\|\d+)(.*)/s)
500      {      {
501          $before = $1;          $before = $1;
502          $match = $2;          $match = $2;
503          $after = $3;          $after = $3;
504          return &set_prot_links($cgi,$before) . &HTML::gi_link($cgi,$match) . &set_prot_links($cgi,$after) . "\n";          return &set_prot_links($cgi,$before) . &HTML::gi_link($cgi,$match) . &set_prot_links($cgi,$after);
505      }      }
506      elsif ($x =~ /^(.*)(sp\|[A-Z0-9]{6})(.*)$/)      elsif ($x =~ /^(.*)(sp\|[A-Z0-9]{6})(.*)/s)
507      {      {
508          $before = $1;          $before = $1;
509          $match = $2;          $match = $2;
510          $after = $3;          $after = $3;
511          return &set_prot_links($cgi,$before) . &HTML::sp_link($cgi,$match) . &set_prot_links($cgi,$after) . "\n";          return &set_prot_links($cgi,$before) . &HTML::sp_link($cgi,$match) . &set_prot_links($cgi,$after);
512      }      }
513      elsif ($x =~ /^(.*)(pirnr\|NF\d+)(.*)$/)      elsif ($x =~ /^(.*)(pirnr\|NF\d+)(.*)/s)
514      {      {
515          $before = $1;          $before = $1;
516          $match = $2;          $match = $2;
517          $after = $3;          $after = $3;
518          return &set_prot_links($cgi,$before) . &HTML::pir_link($cgi,$match) . &set_prot_links($cgi,$after) . "\n";          return &set_prot_links($cgi,$before) . &HTML::pir_link($cgi,$match) . &set_prot_links($cgi,$after);
519      }      }
520      return $x;      return $x;
521  }  }
# Line 536  Line 550 
550      return $pir;      return $pir;
551  }  }
552    
553    sub set_map_links {
554        my($cgi,$x) = @_;
555        my($before,$match,$after);
556    
557        my $org = ($cgi->param('org') || $cgi->param('genome') || "");
558    
559        if ($x =~ /^(.*)(MAP\d+)(.*)/s)
560        {
561            $before = $1;
562            $match = $2;
563            $after = $3;
564            return &set_map_links($cgi,$before) . &map_link($cgi,$match,$org) . &set_map_links($cgi,$after);
565        }
566        return $x;
567    }
568    
569    sub map_link {
570        my($cgi,$map,$org) = @_;
571    
572        $user = $cgi->param('user');
573        $user = $user ? $user : "";
574        $org = $org ? $org : "";
575        my $url = "$FIG_Config::cgi_url/show_kegg_map.cgi?user=$user&map=$map&org=$org";
576        my $link = "<a href=\"$url\">$map</a>";
577        return $link;
578    }
579    
580  1  1

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3