[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.119, Thu Dec 6 13:59:34 2007 UTC revision 1.120, Tue Mar 11 21:23:31 2008 UTC
# Line 1048  Line 1048 
1048      }      }
1049  }  }
1050    
1051    =head2 alias_url
1052    
1053    Returns the url that links to an external page showing information about the given alias.
1054    The type of the alias will be determined by the prefix (i.e. 'tr|' for Trembl) If the type
1055    cannot be determined, the function will return undef.
1056    
1057    use: my $html=&HTML::alias_url($alias, $type);
1058    
1059    =cut
1060    
1061    sub alias_url {
1062      shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1063    
1064      my ($id, $type) = @_;
1065    
1066      if ($type eq "SEED") { # 1
1067        return "http://seed-viewer.theseed.org/linkin.cgi?id=$id";
1068      }
1069      elsif ($type eq "UniProt_ac") { # 2
1070        return "http://www.uniprot.org/entry/$id";
1071      }
1072      elsif ($type eq "UniProt_id") { # 3
1073        return "http://www.uniprot.org/entry/$id";
1074      }
1075      elsif ($type eq "EntrezGene") { # 4
1076        return "http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?db=protein&id=$id";
1077      }
1078      elsif ($type eq "RefSeq") { # 5
1079        return "http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?db=protein&id=$id";
1080      }
1081      elsif ($type eq "GIID") { # 6
1082        return "http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?db=protein&id=$id";
1083      }
1084      elsif ($type eq "PDB") { # 7
1085        $id =~ s/\:\w//;
1086        return "http://www.rcsb.org/pdb/explore/explore.do?structureId=$id";
1087      }
1088      elsif ($type eq "PFAM") { # 8
1089        return "http://pfam.janelia.org/family?acc=$id";
1090      }
1091      elsif ($type eq "GO") { # 9
1092        return "http://amigo.geneontology.org/cgi-bin/amigo/go.cgi?view=details&search_constraint=terms&depth=0&query=$id";
1093      }
1094      elsif ($type eq "PIRSF") { # 10
1095        return "http://pir.georgetown.edu/cgi-bin/ipcSF?id=$id";
1096      }
1097      elsif ($type eq "IPI") { # 11
1098        return "http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-newId+[IPI-AllText:".$id."*]+-lv+30+-view+SeqSimpleView+-page+qResult";
1099      }
1100      elsif ($type eq "UniRef_100") { # 12
1101        return "http://www.uniprot.org/entry/$id";
1102      }
1103      elsif ($type eq "UniRef_90") { # 13
1104        return "http://www.uniprot.org/entry/$id";
1105      }
1106      elsif ($type eq "UniRef_50") { # 14
1107        return "http://www.uniprot.org/entry/$id";
1108      }
1109      elsif ($type eq "UniParc") { # 15
1110        return "http://www.uniprot.org/entry/$id";
1111      }
1112      elsif ($type eq "PIR-PSD") { # 16
1113        return "http://pir.georgetown.edu/cgi-bin/pir_psd_get.pl?id=$id";
1114      }
1115      elsif ($type eq "Taxon_ID") { # 17
1116        return "http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=$id";
1117      }
1118      elsif ($type eq "OMIM") { # 18
1119        return "http://www.ncbi.nlm.nih.gov/entrez/dispomim.cgi?id=$id";
1120      }
1121      elsif ($type eq "UniGene") { # 19
1122        return "http://www.ncbi.nlm.nih.gov/sites/entrez?db=unigene&cmd=search&term=$id";
1123      }
1124      elsif ($type eq "Ensemble_ID") { # 20
1125        #return "$id";
1126      }
1127      elsif ($type eq "PMID") { # 21
1128        return "http://www.ncbi.nlm.nih.gov/pubmed/$id";
1129      }
1130      elsif ($type eq "EMBL_DNA_AC") { # 22
1131        return "http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-e+[EMBL:".$id."]+-newId";
1132      }
1133      elsif ($type eq "EMBL_Protein_AC") { # 23
1134        $id =~ s/\.\d//;
1135        return "http://srs.ebi.ac.uk/srsbin/cgi-bin/wgetz?-e+[{EMBL}-ProteinID:".$id."]";
1136      }
1137    
1138      return undef;
1139    }
1140    
1141  sub set_prot_links {  sub set_prot_links {
1142      shift if UNIVERSAL::isa($_[0],__PACKAGE__);      shift if UNIVERSAL::isa($_[0],__PACKAGE__);
1143      my($cgi,$x) = @_;      my($cgi,$x) = @_;

Legend:
Removed from v.1.119  
changed lines
  Added in v.1.120

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3