[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.129, Wed Sep 3 20:30:22 2008 UTC revision 1.130, Mon Mar 23 13:28:14 2009 UTC
# Line 1069  Line 1069 
1069      }      }
1070  }  }
1071    
1072  =head2 alias_url  =head2 alias_rl
1073    
1074  Returns the url that links to an external page showing information about the given alias.  Returns the url that links to an external page showing information about the given alias.
1075  The type of the alias will be determined by the prefix (i.e. 'tr|' for Trembl) If the type  The type of the alias will be determined by the prefix (i.e. 'tr|' for Trembl) If the type
# Line 1237  Line 1237 
1237          $after = $3;          $after = $3;
1238          return &set_prot_links($cgi,$before) . &HTML::gi_link($cgi,$match) . &set_prot_links($cgi,$after);          return &set_prot_links($cgi,$before) . &HTML::gi_link($cgi,$match) . &set_prot_links($cgi,$after);
1239      }      }
1240        elsif ($x =~ /^(.*)(gb\|\S+)(.*)/s)
1241        {
1242            $before = $1;
1243            $match = $2;
1244            $after = $3;
1245            return &set_prot_links($cgi,$before) . &HTML::gb_link($cgi,$match) . &set_prot_links($cgi,$after);
1246        }
1247      elsif ($x =~ /^(.*)(img\|\d+)(.*)/s)      elsif ($x =~ /^(.*)(img\|\d+)(.*)/s)
1248      {      {
1249          $before = $1;          $before = $1;
# Line 1258  Line 1265 
1265          $after = $3;          $after = $3;
1266          return &set_prot_links($cgi,$before) . &HTML::tigr_link($cgi,$match) . &set_prot_links($cgi,$after);          return &set_prot_links($cgi,$before) . &HTML::tigr_link($cgi,$match) . &set_prot_links($cgi,$after);
1267      }      }
1268        elsif ($x =~ /^(.*)(cmr\|\w+)(.*)/s)
1269        {
1270            $before = $1;
1271            $match = $2;
1272            $after = $3;
1273            return &set_prot_links($cgi,$before) . &HTML::cmr_link($cgi,$match) . &set_prot_links($cgi,$after);
1274        }
1275        elsif ($x =~ /^(.*)(dbj\|\S+)(.*)/s)
1276        {
1277            $before = $1;
1278            $match = $2;
1279            $after = $3;
1280            return &set_prot_links($cgi,$before) . &HTML::dbj_link($cgi,$match) . &set_prot_links($cgi,$after);
1281        }
1282      elsif ($x =~ /^(.*)\b(eric\|\S+)\b(.*)/s)      elsif ($x =~ /^(.*)\b(eric\|\S+)\b(.*)/s)
1283      {      {
1284          $before = $1;          $before = $1;
# Line 1462  Line 1483 
1483      return $gi;      return $gi;
1484  }  }
1485    
1486    sub gb_link {
1487        shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1488        my($cgi,$gb) = @_;
1489    
1490        if ($gb =~ /^gb\|(\S+)$/)
1491        {
1492            return "<a href='http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?db=protein&id=$1' target=_blank>$gb</a>";
1493        }
1494        return $gb;
1495    }
1496    
1497  sub tigr_link {  sub tigr_link {
1498      shift if UNIVERSAL::isa($_[0],__PACKAGE__);      shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1499      my($cgi,$tigr) = @_;      my($cgi,$tigr) = @_;
# Line 1478  Line 1510 
1510      return $tigr;      return $tigr;
1511  }  }
1512    
1513    sub cmr_link {
1514        shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1515        my($cgi,$cmr) = @_;
1516    
1517        if ($cmr =~ /^cmr\|(\d+)$/)
1518        {
1519            my $id=$1;
1520            return "<a href=\"http://cmr.jcvi.org/cgi-bin/CMR/shared/GenePage.cgi?type=PID&acc=".$id."\" target=_blank>$cmr</a>";
1521        }
1522        elsif ($cmr =~ /^cmr\|(\S+)$/)
1523        {
1524            my $id = $1;
1525            return "<a href=\"http://cmr.jcvi.org/tigr-scripts/CMR/shared/GenePage.cgi?locus=".$id."\" target=_blank>$cmr</a>";
1526        }
1527        return $cmr;
1528    }
1529    
1530  sub eric_link {  sub eric_link {
1531      shift if UNIVERSAL::isa($_[0],__PACKAGE__);      shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1532      my($cgi,$eric) = @_;      my($cgi,$eric) = @_;
# Line 1489  Line 1538 
1538      return $eric;      return $eric;
1539  }  }
1540    
1541    sub dbj_link {
1542        shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1543        my($cgi,$dbj) = @_;
1544    
1545        if ($dbj =~ /^dbj\|(\S+)/)
1546        {
1547            return "<a href=\"http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?db=protein&id=$1\" target=_blank>$dbj</a>";
1548        }
1549        return $dbj;
1550    }
1551    
1552  sub bhb_link {  sub bhb_link {
1553      shift if UNIVERSAL::isa($_[0],__PACKAGE__);      shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1554      my($cgi,$bhb) = @_;      my($cgi,$bhb) = @_;

Legend:
Removed from v.1.129  
changed lines
  Added in v.1.130

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3