refseq_GeneID: Get the GeneID

View source: R/refseq_GeneID.R

refseq_GeneIDR 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_protein2RNA to obtain the transcript accessions that encode a set of protein accessions.

refseq_RNA2protein to obtain the protein accessions encoded by a set of transcript accessions.

Examples

## Not run: 
# Get the gene symbol from a set of transcript accessions
transcript = c("XM_004487701")
sapply(transcript, function(x) refseq_GeneID (x, db = "nuccore", retries = 4), USE.NAMES = FALSE)

# Get the gene symbol from a set of protein accessions
protein = c("XP_004487758")
sapply(protein, function(x) refseq_GeneID (x, db = "protein", retries = 4), USE.NAMES = FALSE)
## End(Not run)


refseqR documentation built on Oct. 30, 2024, 1:06 a.m.