[BioC] How to use biomaRt with RMySQL under Windows

Earl F. Glynn efg at stowers-institute.org
Thu Jan 26 20:16:38 CET 2006

I wanted to extract data using the biomaRt package, but ran into a problem
with the Windows installation.

This page shows that biomaRt requires RMySQL and XML.

The XML package for Windows was easily available from CRAN

But the RMySQL package for Windows is NOT available from CRAN:

A friend here at Stowers told me about the Windows version of RMySQL here:

I downloaded RMySQL 0.5-6.zip and installed it

For some reason a DLL was missing:  libMySQL.dll.  I tried moving this DLL
from the most current version of the MySQL Query Browser, but that caused a
DLL version mismatch in R.
C:\Program Files\MySQL\MySQL Query Browser 1.1\libmySQL.dll

After some searching I found this MySQL archive of older versions,

I had to download and install this old MySQL server just to get its
libmySQL.dll.  After moving this DLL from
     C:\Program Files\MySQL\MySQL Server 4.1\bin

I can now use RMySQL and biomaRt (using this sample code posted to BioC on
23 Nov 2005):

> library(biomaRt)
Loading required package: RMySQL
Loading required package: DBI
Loading required package: XML
Warning message:
DLL attempted to change FPU control word from 8001f to 9001f

> mart <- martConnect()
connected to:  ensembl_mart_36

> getGO(id="NM_001533",type="refseq",species="hsapiens",mart=mart)
An object of class "martTable"
Slot "id":
[1] "NM_001533" "NM_001533" "NM_001533" "NM_001533" "NM_001533" "NM_001533"

Slot "table":
[1] "GO:0000166" "GO:0003723" "GO:0006397" "GO:0005654" "GO:0030530"

[1] "nucleotide binding"                              "RNA binding"
[3] "mRNA processing"                                 "nucleoplasm"
[5] "heterogeneous nuclear ribonucleoprotein complex" "nucleus"

[1] "IEA" "TAS" "IEA" "TAS" "TAS" "IEA"

[1] "ENSG00000104824" "ENSG00000104824" "ENSG00000104824" "ENSG00000104824"
"ENSG00000104824" "ENSG00000104824"

> martDisconnect(mart)

Perhaps this may help someone else get start using biomaRt under Windows.

Stowers Institute

More information about the Bioconductor mailing list