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

Diff of /FigKernelPackages/FIG.pm

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

revision 1.572, Sun Feb 11 22:37:11 2007 UTC revision 1.573, Thu Feb 15 22:40:40 2007 UTC
# Line 6105  Line 6105 
6105      return $out;      return $out;
6106  }  }
6107    
6108    
6109    ############################################
6110    #
6111    #  map SEED internal references for external databases into globally "acceptable" format
6112    #  see: http://www.ncbi.nlm.nih.gov/collab/db_xref.html for format definition
6113    #
6114    sub rewrite_db_xrefs {
6115    
6116        my ($self, $alias) = @_;
6117    
6118        if ( $alias =~ /^gi/ ) {    # /db_xref="GI:1234567890"
6119            $alias =~ s/^gi\|/GI:/;
6120            return $alias;
6121        }
6122        elsif ($alias =~ /^uni/) { # /db_xref=" UniProtKB/TrEMBL:Q00177"
6123            $alias =~ s%uni\|%UniProtKB/TrEMBL:%;
6124            return $alias
6125            }
6126        elsif ($alias =~ /^kegg/i){
6127            $alias =~ s/kegg\|/KEGG:/i;
6128            $alias =~ s/^(.*):/$1+/;
6129            return  $alias
6130            }
6131        elsif ($alias =~ /^sp\|/) { # /db_xref="UniProtKB/Swiss-Prot:P12345"
6132            $alias =~ s%sp\|%UniProtKB/Swiss-Prot:%;
6133            return  $alias
6134            }
6135        else { # unsupported external alias, return empty string
6136            return '';
6137        }
6138    
6139    }
6140    
6141    
6142    
6143  =head3 by_alias  =head3 by_alias
6144    
6145  usage: $peg = $fig->by_alias($alias)  usage: $peg = $fig->by_alias($alias)

Legend:
Removed from v.1.572  
changed lines
  Added in v.1.573

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3