translateTargetId {bioassayR} | R Documentation

## Translate a protein target identifier to another identifier system

### Description

Returns a `character` vector of the protein target identifiers using the specified category (classification system). This is most often used to translate NCBI Protein GI numbers (as provided with the pre-build PubChem Bioassay database) into UniProt identifiers.

### Usage

    translateTargetId(database, target, category, fromCategory = "GI")

### Arguments

`database` | A `BioassayDB` database to query.
`target` | A protein target identifier to query (as set by the category option, with a default of "GI").
`category` | The specified identifier type to return, such as 'UniProt'.
`fromCategory` | The identifier type of the query (default "GI").

### Value

A `character` vector of the protein target identifiers of the category specified for the target specified. An NA is returned if no matching values exist in the database.

### Author(s)

Tyler Backman

### References

http://www.ncbi.nlm.nih.gov/protein NCBI Protein Database http://www.uniprot.org UniProt Protein Database

### See Also

`loadIdMapping`

### Examples

    ## create sample database
    myDatabaseFilename <- tempfile()
    mydb <- newBioassayDB(myDatabaseFilename, indexed=FALSE)

    ## load a sample translation from GI 6686268 to UniProt P11712
    loadIdMapping(mydb, "6686268", "UniProt", "P11712")

    ## get UniProt identifier(s) for GI Number 6686268
    UniProtIds <- translateTargetId(mydb, "6686268", "UniProt")
    UniProtIds

    ## get GI identifier(s) for UniProt ID P11712
    GIs <- translateTargetId(mydb, "P11712", "GI", "UniProt")
    GIs

    ## disconnect from and delete sample database
    disconnectBioassayDB(mydb)
    unlink(myDatabaseFilename)

[Package bioassayR version 1.32.1 Index]