biomaRt getGene error
1
0
Entering edit mode
davide risso ▴ 950
@davide-risso-5075
Last seen 5 weeks ago
University of Padova

Hi all,

I'm seeing the following error when using the getGene() function in the biomaRt package. Can anyone please help?

> library(biomaRt)
> example(getGene)

getGen> if(interactive()){
getGen+ 
getGen+ mart = useMart("ensembl", dataset="hsapiens_gene_ensembl")
getGen+ 
getGen+ #example using affy id
getGen+ 
getGen+ g = getGene( id = "1939_at", type = "affy_hg_u95av2", mart = mart)
getGen+ show(g)
getGen+ 
getGen+ #example using Entrez Gene id
getGen+ 
getGen+ g = getGene( id = "100", type = "entrezgene", mart = mart)
getGen+ show(g)
getGen+ }
Error in martCheck(mart, "ensembl") : 
  This function only works when used with the ensembl BioMart.
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] biomaRt_2.26.1

loaded via a namespace (and not attached):
 [1] IRanges_2.4.4        tools_3.2.2          parallel_3.2.2      
 [4] DBI_0.3.1            RCurl_1.95-4.7       Biobase_2.30.0      
 [7] AnnotationDbi_1.32.0 RSQLite_1.0.0        S4Vectors_0.8.3     
[10] BiocGenerics_0.16.1  stats4_3.2.2         bitops_1.0-6        
[13] XML_3.98-1.3      
biomart • 1.3k views
ADD COMMENT
0
Entering edit mode
Thomas Maurel ▴ 800
@thomas-maurel-5295
Last seen 14 months ago
United Kingdom

Hello,

If you replace:

mart = useMart("ensembl", dataset="hsapiens_gene_ensembl")

with

mart = useMart(biomart="ENSEMBL_MART_ENSEMBL", host="www.ensembl.org", path="/biomart/martservice", dataset="hsapiens_gene_ensembl")

or

mart = useEnsembl(biomart="ensembl",dataset="hsapiens_gene_ensembl")

it should work.

Hope this helps,

Thomas

ADD COMMENT
0
Entering edit mode

Hi Thomas,

I've tried both your suggestions, but I still get the same error. Does this solution work for you? Can you replicate my error?

Thanks!

ADD REPLY

Login before adding your answer.

Traffic: 863 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