Question: biomaRt doesn't convert refseq_rna to flybase_gene_id
0
gravatar for yotiao
4.8 years ago by
yotiao0
United Kingdom
yotiao0 wrote:

Hi,

I am getting problems when trying to convert refseq_rna ids (for example, NM_001300384.1) to flybase_gene_id using biomaRt (in R and online), despite the fact that when I put this rna id to ensembl it gives me the right record (http://www.ensembl.org/Multi/Search/Results?q=NM_001300384.1;site=ensembl) (ensembl is using the same gene and transcript ids as FlyBase).

> library(biomaRt)
> ensembl<-useMart("ensembl", dataset="dmelanogaster_gene_ensembl") 

> getBM(attributes="flybase_gene_id", filters="refseq_mrna", values="NM_001300384.1", mart=ensembl)
[1] flybase_gene_id
<0 rows> (or 0-length row.names)​

This is a part of my analysis where I annotate probes by local blast (which only produces NCBI accession numbers) and convert them to ensembl gene ids. But I am stuck at this conversion and don't understand what's going on. I also note that if I have several transcripts/transcript variants each with a different NCBI ID, the shortest ID (i.e. with fewest digits) usually gives me a hit in biomaRt. But long IDs like the above (of which I have many thousands) don't work.

I would very appreciate the explanation for this behaviour and tips on how to get the conversion done.

cheers

 

 

 

blast biomart R drosophila • 1.5k views
ADD COMMENTlink modified 4.8 years ago by Steven Lakin1.5k • written 4.8 years ago by yotiao0
2
gravatar for Steven Lakin
4.8 years ago by
Steven Lakin1.5k
Fort Collins, CO, USA
Steven Lakin1.5k wrote:

The number after the period refers to the version of the refseq entry.  What you're looking for is the base accession #, which is the number that precedes the period: NM_001300384

 

Using this number:

ens <- useMart("ensembl", dataset="dmelanogaster_gene_ensembl")
getBM(attributes="flybase_gene_id", filters="refseq_mrna", values="NM_001300384", mart=ens)
flybase_gene_id
1     FBgn0027610

 

If you post your input file or dataframe in R, I'm sure a quick method to remove the trailing version number from your IDs can be suggested if you don't already know how to do it.

ADD COMMENTlink written 4.8 years ago by Steven Lakin1.5k

Huh, that was easy. Worked right off the bat - thanks!

ADD REPLYlink written 4.8 years ago by yotiao0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 666 users visited in the last hour