[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.
http://www.bioconductor.org/packages/bioc/stable/src/contrib/html/biomaRt.html

The XML package for Windows was easily available from CRAN
http://cran.r-project.org/src/contrib/Descriptions/XML.html

But the RMySQL package for Windows is NOT available from CRAN:
http://cran.r-project.org/src/contrib/Descriptions/RMySQL.html

A friend here at Stowers told me about the Windows version of RMySQL here:
http://stat.bell-labs.com/RS-DBI/download/

I downloaded RMySQL 0.5-6.zip and installed it
http://stat.bell-labs.com/RS-DBI/download/RMySQL_0.5-6.zip

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,
including:
http://downloads.mysql.com/archives.php?p=mysql-4.1&v=4.1.12a

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
to
     C:\Windows\System32

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":
$GOID
[1] "GO:0000166" "GO:0003723" "GO:0006397" "GO:0005654" "GO:0030530"
"GO:0005634"

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

$evidence
[1] "IEA" "TAS" "IEA" "TAS" "TAS" "IEA"

$martID
[1] "ENSG00000104824" "ENSG00000104824" "ENSG00000104824" "ENSG00000104824"
"ENSG00000104824" "ENSG00000104824"

> martDisconnect(mart)


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

efg
Stowers Institute



More information about the Bioconductor mailing list