BiomaRt returns 0 obs
Last seen 3.2 years ago
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'))
= "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.
Last seen 1 hour ago
You will have to show some reproducible code that shows the problem.
> ensids <- head(keys(org.Hs.eg.db, "ENSEMBL"))
 "ENSG00000121410" "ENSG00000175899" "ENSG00000256069" "ENSG00000171428"
 "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
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.
Traffic: 319 users visited in the last hour