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

Diff of /FigKernelPackages/SeedUtils.pm

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

revision 1.36, Thu Apr 29 20:33:43 2010 UTC revision 1.37, Wed Jun 9 20:14:26 2010 UTC
# Line 38  Line 38 
38                       rev_comp genome_of min max sims verify_dir between translate                       rev_comp genome_of min max sims verify_dir between translate
39                       standard_genetic_code parse_location roles_of_function                       standard_genetic_code parse_location roles_of_function
40                       strip_ec location_string location_cmp strand_of by_fig_id                       strip_ec location_string location_cmp strand_of by_fig_id
41                       verify_db bbh_data);                       verify_db bbh_data id_url);
42    
43  =head1 SEED Utility Methods  =head1 SEED Utility Methods
44    
# Line 628  Line 628 
628    
629  }  }
630    
631    =head3 id_url
632    
633        my $url = id_url($id);
634    
635    Return the URL for a specified external gene ID.
636    
637    =over 4
638    
639    =item id
640    
641    ID of the gene whose URL is desired.
642    
643    =item RETURN
644    
645    Returns a URL for displaying information about the specified gene. The structure
646    of the ID is used to determine the web site to which the gene belongs.
647    
648    =back
649    
650    =cut
651    
652    sub id_url {
653        # Get the parameters.
654        my ($id) = @_;
655        # Declare the return variable.
656        my $retVal;
657        # Parse the ID to determine the URL.
658        if ($id =~ /^(?:ref\|)?([NXYZA]P_[0-9\.]+)$/) {
659            $retVal = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=protein;cmd=search;term=$1";
660        } elsif ($id =~ /^gi\|(\d+)$/) {
661            $retVal = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve;db=Protein&list_uids=$1;dopt=GenPept";
662        } elsif ($id =~ /^cmr\|(.+)$/) {
663            $retVal = "http://cmr.jcvi.org/tigr-scripts/CMR/shared/GenePage.cgi?locus=$1";
664        } elsif ($id =~ /^sp\|([A-Z0-9]{6})$/) {
665            $retVal = "http://us.expasy.org/cgi-bin/get-sprot-entry?$1";
666        } elsif ($id =~ /^uni\|([A-Z0-9_]+?)$/) {
667            $retVal = "http://www.ebi.uniprot.org/uniprot-srv/uniProtView.do?proteinAc=$1";
668        } elsif ($id =~ /^kegg\|(([a-z]{2,4}):([a-zA-Z_0-9]+))$/) {
669            $retVal = "http://www.genome.ad.jp/dbget-bin/www_bget?$2+$3";
670        } elsif ($id =~ /^tr\|([a-zA-Z0-9]+)$/) {
671            $retVal = "http://ca.expasy.org/uniprot/$1";
672        } elsif ($id =~ /^(fig\|\d+\.\d+\.\w+\.\d+)$/) {
673            $retVal = "http://seed-viewer.theseed.org/?pattern=$1&page=SearchResult&action=check_search";
674        }
675        # Return the result.
676        return $retVal;
677    }
678    
679    
680  =head3 location_cmp  =head3 location_cmp
681    
682      my $cmp = location_cmp($loc1, $loc2);      my $cmp = location_cmp($loc1, $loc2);

Legend:
Removed from v.1.36  
changed lines
  Added in v.1.37

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3