This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Retrieving Dn Or Ds From Ensembl Using Biomart

I attempted to retrieve values of dn and ds for human/mouse gene comparisons in Ensembl using BiomaRt (R application), and get the following error (with mart defined as ensembl human reference genome):

t = getBM(attributes = "mmusculus_homolog_dn", filters = "hgnc_symbol", values = "GABRA6", mart = mart)
Error in `[.data.frame`(result, , attributes) : 
 undefined columns selected

In contrast, if I try to retrieve some other attribute, such as mouse gene id, it works (e.g.)

> t = getBM(attributes = "mmusculus_homolog_ensembl_gene", filters = "hgnc_symbol", values = "GABRA6", mart = mart)
> t
   [1] "ENSMUSG00000020428"

So it doesn't seem to be a syntax error. What am I doing wrong in calling the mmusculus...dn attribute (and the same issue with ds)?

biomart ensembl

1 answer

Not sure why you are seeing that error. It works for me. Perhaps just some transient issue?

library(biomaRt)
mart.hs <- useMart("ensembl", "hsapiens_gene_ensembl")
getBM(attributes = "mmusculus_homolog_dn", filters = "hgnc_symbol", values = "GABRA6", mart = mart.hs)
#   mmusculus_homolog_dn
# 1               0.0459
getBM(attributes = "mmusculus_homolog_ds", filters = "hgnc_symbol", values = "GABRA6", mart = mart.hs)
#   mmusculus_homolog_ds
# 1               0.5686

My sessionInfo():

R version 3.0.3 (2014-03-06)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_AU.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_AU.UTF-8        LC_COLLATE=en_AU.UTF-8    
 [5] LC_MONETARY=en_AU.UTF-8    LC_MESSAGES=en_AU.UTF-8   
 [7] LC_PAPER=en_AU.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] biomaRt_2.18.0       BiocInstaller_1.12.0

loaded via a namespace (and not attached):
[1] RCurl_1.95-4.1 tools_3.0.3    XML_3.98-1.1

That's very strange. Perhaps the ensembl databases aren't being loaded correctly in the mart calls?

Log in to answer this question.