[BioC] error with biomaRt in mysql mode

James MacDonald jmacdon at med.umich.edu
Sun Dec 23 20:23:08 CET 2007


Hi Janet,

Janet Young wrote:
> Hi,
> 
> I'm having trouble using biomaRt in mysql mode to access genes from  
> an older human assembly (NCBI35).
> 
> My query works fine in the web query mode:
> 
>  > ensemblnew<-useMart("ensembl",dataset="hsapiens_gene_ensembl")
> Checking attributes and filters ... ok
>  > allgenes<-getBM( c("hgnc_symbol","go","entrezgene"), mart=ensemblnew)
>  > dim(allgenes)
> [1] 184982      3
> 
> but now I'm trying to work with the older assembly, and get the  
> following error with getBM:
>  > ensemblmysql<-useMart 
> ("ensembl_mart_37",dataset="hsapiens_gene_ensembl",archive=T,mysql=T)
> connected to:  ensembl_mart_37
> Reading database configuration of: hsapiens_gene_ensembl
> Checking attributes and filters ... ok
> Checking main tables ... ok
>  > allgenesmysql<-getBM( c("hgnc_symbol","go_id","entrezgene"),  
> mart=ensemblmysql)
> Error in exists(filter, martFilters(mart)) : invalid first argument

You need to specify a filter and value. Might be a better way to do this 
but:

 > mart <- useMart("ensembl_mart_37", "hsapiens_gene_ensembl", 
archive=T, mysql=T)
connected to:  ensembl_mart_37
Reading database configuration of: hsapiens_gene_ensembl
Checking attributes and filters ... ok
Checking main tables ... ok
 > tmp2 <- getBM(c("hgnc_symbol", "go_id", 
"entrezgene"),filters="chr_name", values=c(1:24), mart=mart)
 > dim(tmp2)
[1] 177700      3

Lots of <NA> in that table -- you might be better off using 
output="list", but that's up to you.

Best,

Jim


> 
> I also tried it with ensembl_mart_47, substituting "go" for "go_id"  
> and it gave the same error.   I can't figure out whether I've found a  
> bug, or I'm just doing something wrong.
> 
> My sessionInfo output is below. I noticed that my RMySQL_0.6-0 is  
> loaded in my session, but not the sessionInfo output given in the  
> vignette (might be using RSQLite_0.6-4 instead) - could that be  
> something to do with it?
> 
>  > sessionInfo()
> R version 2.6.1 (2007-11-26)
> i386-apple-darwin8.10.1
> 
> locale:
> 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] RMySQL_0.6-0   DBI_0.2-4      biomaRt_1.12.2 RCurl_0.8-3
> 
> loaded via a namespace (and not attached):
> [1] XML_1.93-2
> 
> 
> 
> thanks in advance for any help,
> 
> Janet Young
> 
> -------------------------------------------------------------------
> Dr. Janet Young (Trask lab)
> 
> Fred Hutchinson Cancer Research Center
> 1100 Fairview Avenue N., C3-168,
> P.O. Box 19024, Seattle, WA 98109-1024, USA.
> 
> tel: (206) 667 1471 fax: (206) 667 6524
> email: jayoung at fhcrc.org
> 
> http://www.fhcrc.org/labs/trask/
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
James W. MacDonald, MS
Biostatistician
UMCCC cDNA and Affymetrix Core
University of Michigan
1500 E Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623



More information about the Bioconductor mailing list