refseq_GeneID {refseqR} | R Documentation |
Get the GeneID
Description
refseq_GeneID()
Returns the GeneID from a single transcript or protein accession.
Depending on the function, available accessions in refseqR
include RefSeq models with the prefixes XM_ (mRNA), XR_ (non-coding RNA), and XP_ (protein), as well as subsequently curated RefSeq records with NM_, NR_, or NP_ accession prefixes.
Usage
refseq_GeneID (accession, db, retries)
Arguments
accession |
A character string of the transcript or protein accession. |
db |
A character string of the "nuccore" or "protein" database. |
retries |
A numeric value to control the number of retry attempts to handle internet errors. |
Value
A character vector containing the GeneID corresponding to the specified accession as accession
.
Author(s)
Jose V. Die
See Also
refseq_protein2mRNA
to obtain the transcript accessions that encode a set of protein accessions.
refseq_mRNA2protein
to obtain the protein accessions encoded by a set of transcript accessions.
Examples
# Get the gene symbol from a set of transcript accessions
transcript = c("XM_004487701", "XM_004488493")
sapply(transcript, function(x) refseq_GeneID (x, db = "nuccore", retries = 4), USE.NAMES = FALSE)
# Get the gene symbol from a set of XP accessions
protein = c("XP_004487758")
sapply(protein, function(x) refseq_GeneID (x, db = "protein", retries = 4), USE.NAMES = FALSE)