Question: (mouse) Convert hugo symbol (i think) to Ensembl ID
1
gravatar for Wesley
8 weeks ago by
Wesley10
Wesley10 wrote:

I am trying to convert these gene symbols( that's what i think they are) to ensembl ID's using biomaRt package. But for some reason it seems to fail. Would love to have some feedback!

library(biomaRt)

ensembl <- useMart("ensembl", dataset="mmusculus_gene_ensembl")

genes <- c("Acad11","Acad8", "Acad9","Acadm","Acadsb", "Acan" ,"Acap1","Acap2" ,"Acat1","Acbd3", "Acbd4")

foo <- getBM(attributes=c('ensembl_gene_id',
                          'external_gene_name'),
             filters = 'hgnc_symbol',
             mart = ensembl,
             values = genes)

Thanks in advance.

ensembl rna-seq biomart R gene • 160 views
ADD COMMENTlink modified 8 weeks ago by zx87549.2k • written 8 weeks ago by Wesley10
3
gravatar for ATpoint
8 weeks ago by
ATpoint34k
Germany
ATpoint34k wrote:

Almost correct but it must be mgi_symbol instead of hgnc_symbol since the HGNCs represent human genes. MGI is the equivalent for mouse. By the way it is Ensembl not Ensemble, just saying if you ever write this up as a paper be sure to correctly spell the data sources ;-)

library(biomaRt)

ensembl <- useMart("ensembl", dataset="mmusculus_gene_ensembl")

genes <- c("Acad11","Acad8", "Acad9","Acadm","Acadsb", "Acan" ,"Acap1","Acap2" ,"Acat1","Acbd3", "Acbd4")

foo <- getBM(attributes=c('ensembl_gene_id',
                          'external_gene_name'),
             filters = 'mgi_symbol',
             mart = ensembl,
             values = genes)

> foo
      ensembl_gene_id external_gene_name
1  ENSMUSG00000090150             Acad11
2  ENSMUSG00000031969              Acad8
3  ENSMUSG00000027710              Acad9
4  ENSMUSG00000062908              Acadm
5  ENSMUSG00000030861             Acadsb
6  ENSMUSG00000030607               Acan
7  ENSMUSG00000001588              Acap1
8  ENSMUSG00000049076              Acap2
9  ENSMUSG00000032047              Acat1
10 ENSMUSG00000026499              Acbd3
11 ENSMUSG00000056938              Acbd4
ADD COMMENTlink modified 8 weeks ago • written 8 weeks ago by ATpoint34k
1
gravatar for Ben_Ensembl
8 weeks ago by
Ben_Ensembl1.4k
EMBL-EBI
Ben_Ensembl1.4k wrote:

Hi Wesley,

Since you are querying the mouse genes, you need to use the 'mgi_symbol' filter with your list of gene names.

Best wishes

Ben Ensembl Helpdesk

ADD COMMENTlink written 8 weeks ago by Ben_Ensembl1.4k
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: 928 users visited in the last hour