BiomaRt conversion
2
0
Entering edit mode
@7dcb7a9f
Last seen 4 weeks ago
France

Hello, I have been using for a long time Bimart to do conversion of ensembl names into gene names, with the following code. However, this week the scritp does not work anymore, biomaRT does not do the conversion, everything is annotated NA. Is there something that has changed in BimaRt or ensembl that explains this? It seems related to the ensembl names that should be for instance ENSMUSG00000000127 and not ENSMUSG00000000127.15 (no dot + 2 numbers). Thank you for your help,

# convert gene names with BiomaRt
library("biomaRt")
ensembl_mm_mart <- useMart(biomart="ensembl", dataset="mmusculus_gene_ensembl")

## filtered data. Write adjusted data with annotation names
gene_annot = getBM(attributes=c('ensembl_gene_id_version','mgi_symbol','description'), mart=ensembl_mm_mart, filter='ensembl_gene_id_version', value=resdata$gene)
resdata_annot_filter = merge(resdata, gene_annot, by.x = "gene", by.y="ensembl_gene_id_version", all.x=TRUE)
write.table(resdata_annot_filter, file="adjusted-results-with-normalized_annot.csv", quote=F, row.names=FALSE)
biomaRt • 101 views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 2 hours ago
United States

I wouldn't normally use the version because it seems to be much slower, and you are then required to provide the right version, based on whatever Ensembl version is provided at Biomart.

> mart <- useEnsembl("ensembl", "mmusculus_gene_ensembl")
> getBM(c("ensembl_gene_id","mgi_symbol","description"), "ensembl_gene_id_version", "ENSMUSG00000000127.15", mart)
[1] ensembl_gene_id mgi_symbol      description    
<0 rows> (or 0-length row.names)
## The actual version for Ensembl release 103 is 16, not 15
> getBM(c("ensembl_gene_id","mgi_symbol","description"), "ensembl_gene_id_version", "ENSMUSG00000000127.16", mart)
     ensembl_gene_id mgi_symbol
1 ENSMUSG00000000127        Fer
                                                              description
1 fer (fms/fps related) protein kinase [Source:MGI Symbol;Acc:MGI:105917]
## and since this is what you want, and it's faster...
> getBM(c("ensembl_gene_id","mgi_symbol","description"), "ensembl_gene_id", "ENSMUSG00000000127", mart)
     ensembl_gene_id mgi_symbol
1 ENSMUSG00000000127        Fer
                                                              description
1 fer (fms/fps related) protein kinase [Source:MGI Symbol;Acc:MGI:105917]
0
Entering edit mode
@7dcb7a9f
Last seen 4 weeks ago
France

Thanks for your help!

ADD COMMENT

Login before adding your answer.

Traffic: 432 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6