Question: BiomaRt returns 0 obs
0
gravatar for edelman
14 months ago by
edelman0
edelman0 wrote:

I have been running some code in R to make a data frame with my ENST IDs and corresponding gene symbols. I have used the following code before but I have been unable to generate this table recently. The problem is that getBM returns 0 observations. Any help would be appreciated. Perhaps known issues with getBM? 

 

mart<- useDataset("hsapiens_gene_ensembl", useMart('ensembl'))

genes<-Data1$Name


G_list<-getBM(filters
  = "ensembl_gene_id", attributes = c("ensembl_gene_id",
  "external_gene_name", "description"), values = genes, mart = mart)

My code, which does not produce any errors, runs and returns an empty object 0 observations with 2 columns. Genes is a list of ENST IDs. 

 

Thanks,

Bill 

biomart ensembl getbm • 378 views
ADD COMMENTlink modified 14 months ago by James W. MacDonald51k • written 14 months ago by edelman0

I'm using R version "Feather Spray" v. 3.5.1. Also doesn't work on previous major release. 

ADD REPLYlink modified 14 months ago • written 14 months ago by edelman0
Answer: BiomaRt returns 0 obs
2
gravatar for James W. MacDonald
14 months ago by
United States
James W. MacDonald51k wrote:

You will have to show some reproducible code that shows the problem.

> library(biomaRt)
> library(org.Hs.eg.db)

> ensids <- head(keys(org.Hs.eg.db, "ENSEMBL"))
> ensids
[1] "ENSG00000121410" "ENSG00000175899" "ENSG00000256069" "ENSG00000171428"
[5] "ENSG00000156006" "ENSG00000196136"
> mart <- useMart("ensembl","hsapiens_gene_ensembl")
> getBM(c("ensembl_gene_id","external_gene_name","hgnc_symbol","description"), "ensembl_gene_id", ensids, mart)
  ensembl_gene_id external_gene_name hgnc_symbol
1 ENSG00000121410               A1BG        A1BG
2 ENSG00000156006               NAT2        NAT2
3 ENSG00000171428               NAT1        NAT1
4 ENSG00000175899                A2M         A2M
5 ENSG00000196136           SERPINA3    SERPINA3
6 ENSG00000256069              A2MP1       A2MP1
                                                         description
1             alpha-1-B glycoprotein [Source:HGNC Symbol;Acc:HGNC:5]
2           N-acetyltransferase 2 [Source:HGNC Symbol;Acc:HGNC:7646]
3           N-acetyltransferase 1 [Source:HGNC Symbol;Acc:HGNC:7645]
4              alpha-2-macroglobulin [Source:HGNC Symbol;Acc:HGNC:7]
5          serpin family A member 3 [Source:HGNC Symbol;Acc:HGNC:16]
6 alpha-2-macroglobulin pseudogene 1 [Source:HGNC Symbol;Acc:HGNC:8]

You do state that the genes object is a list of ENST IDs. If I were to infer that by ENST ID you mean Ensembl transcript IDs, then you need to use ensembl_transcript_id rather than ensembl_gene_id.

ADD COMMENTlink written 14 months ago by James W. MacDonald51k
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 16.09
Traffic: 179 users visited in the last hour