This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Looking up gene name from mRNA ID using biomaRt

Hi everyone, I want to ask for ways I could do to convert mRNA ID into the gene ID. I'm using biomaRt package in R, and it works for most of the mRNA but not all of them:

ensembl <- useEnsembl(biomart = "genes", dataset = "hsapiens_gene_ensembl")
getBM(
     attributes = c("refseq_mrna", "ensembl_transcript_id", "external_gene_name"),
     filters = "refseq_mrna",
     values = "NM_000347" (for example),
     mart = ensembl
)

Yet, some of the mRNA transcripts can't be looked up this way. I want to ask how do I query those without refseq_mrna data? Thank you sm.

r mrna biomart

You can also use EntrezDirect like so

$ esearch -db nuccore -query NM_000347 | elink -target gene | efetch -format docsum | xtract -pattern DocumentSummary -element Name
SPTB

If you also want to get aliases for the gene

 $ esearch -db nuccore -query NM_000347 | elink -target gene | efetch -format docsum | xtract -pattern DocumentSummary -element Name,OtherAliases
SPTB    EL3, HS2, HSPTB1, SPH2

Hi, thank you for your suggestion! The command gave me this error:

ERROR:  ELink failure 
ERROR:  Missing -db argument

I realized it was because I used a very obsolete version of entrez-direct. Upgraded it to 22.4 helps!

0 answers

No answers yet.

Log in to answer this question.