How to use biomaRt with RMySQL under Windows
3
0
Entering edit mode
Glynn, Earl ▴ 170
@glynn-earl-952
Last seen 10.2 years ago
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/biom aRt.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
biomaRt biomaRt • 1.8k views
ADD COMMENT
0
Entering edit mode
Glynn, Earl ▴ 170
@glynn-earl-952
Last seen 10.2 years ago
"James W. MacDonald" <jmacdon at="" med.umich.edu=""> wrote in message news:43D924A5.80904 at med.umich.edu... Jim, Thanks for your reply > That binary *does* contain the libMySQL.dll in the libs directory (I > just downloaded and checked). INSTALL.win in the top directory of that > package contains the following hint from BDR: > > You need to move libs/libMySQL.dll into the PATH, or add > ...\library\mysql\libs to the path. > > BDR 2002-06-19 > > I simply added R_HOME\library\RMySQL\libs to my path and it works out of > the box. I'm confused. There is no libs/libMySQL.dll but only a libs/libMySQL.lib file. After installation I'm seeing a libmysql.lib (not a .DLL) and a RMySQL.dll in this directory: C:\Program Files\R\R-2.2.1\library\RMySQL\libs. I checked the libs in the original ZIP and it has the same two files. The file libmysql.lib is only 34 KB while the file C:\WINDOWS\system32\lilbMySQL.DLL is 1,128 KB (for the MySQL Version version 4.1.12a). How does this 34 KB LIB file do the work of the 1,128 KB DLL? The RMySQL.dll isn't very large either, only 37 KB. I am not aware of any other R package that requires a path change or file movement after installation (perhaps there are others). Shouldn't any dependency like this be taken care of by the installation program? efg
ADD COMMENT
0
Entering edit mode
Earl, Earl F. Glynn wrote: > I'm confused. There is no libs/libMySQL.dll but only a libs/libMySQL.lib > file. Odd. Maybe you got a bum download? I checked my RMySQL installation, and also re-downloaded the binary package, and I have libMySQL.dll libMySQL.lib RMySQL.dll in R_HOME\library\RMySQL\libs. > > After installation I'm seeing a libmysql.lib (not a .DLL) and a RMySQL.dll > in this directory: > C:\Program Files\R\R-2.2.1\library\RMySQL\libs. I checked the libs in the > original ZIP and it has the same two files. > > The file libmysql.lib is only 34 KB while the file > C:\WINDOWS\system32\lilbMySQL.DLL is 1,128 KB (for the MySQL Version version > 4.1.12a). How does this 34 KB LIB file do the work of the 1,128 KB DLL? > The RMySQL.dll isn't very large either, only 37 KB. The lib file doesn't - there should be a dll there as well. > > I am not aware of any other R package that requires a path change or file > movement after installation (perhaps there are others). Shouldn't any > dependency like this be taken care of by the installation program? Normally, to use RMySQL on Windows you need to have MySQL installed and do a bunch of manipulations to get things to work (I have never been successful). Really it is a *NIX package that David James is kind enough to compile and make available for Windows users. Ideally the installation of the package would take care of everything, but I don't know if there is a reasonable way to modify your PATH during the installation process. Somebody like Seth or Robert might know if this is possible. Anyway, given how difficult it is to compile a binary RMySQL package on Windows, I am just happy that there is an easy work around. Best, Jim > > efg > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor -- James W. MacDonald Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 11 hours ago
United States
Hi Earl, Earl F. Glynn wrote: > 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/bi omaRt.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 That binary *does* contain the libMySQL.dll in the libs directory (I just downloaded and checked). INSTALL.win in the top directory of that package contains the following hint from BDR: You need to move libs/libMySQL.dll into the PATH, or add ...\library\mysql\libs to the path. BDR 2002-06-19 I simply added R_HOME\library\RMySQL\libs to my path and it works out of the box. Best, Jim -- James W. MacDonald Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD COMMENT
0
Entering edit mode
Glynn, Earl ▴ 170
@glynn-earl-952
Last seen 10.2 years ago
"James W. MacDonald" <jmacdon at="" med.umich.edu=""> wrote in message news:43D9335A.3050908 at med.umich.edu... > > I'm confused. There is no libs/libMySQL.dll but only a libs/libMySQL.lib > > file. > > Odd. Maybe you got a bum download? I checked my RMySQL installation, and > also re-downloaded the binary package, and I have Jim, you're absolutely right. I was having problems downloading the file http://stat.bell-labs.com/RS-DBI/download/ The problem could have been a proxy server problem on my end, a fire wall problem somewhere, or a high level of cosmic rays somewhere . I could see the page, but all attempts to download any file from that page timed out on me earlier today. I gave up after about a dozen attempts. Since Google didn't seem to know about any other copies of the file on the Internet, I requested one by E-mail from David James. He was so kind to send me one very quickly, but the one I received by E-mail didn't have the .DLL your were describing. So, I found the needed DLL somewhere else. . The problem preventing my direct downloads has gone away, and yes, I can now see the DLL file you're describing. All is well now, and RMySQL and biomaRt are working quite nicely under Windows -- and installed but not yet tested under Linux. I try to keep the same tools working on both platforms whenever possible. Thanks again, efg
ADD COMMENT
0
Entering edit mode
Hi, Normally installing RMySQL under Windows is not extremely difficult, but indeed you have to manually intervene during the installation process and move the .dll files from the RMySQL/libs directory to the R/bin directory. No MySQL client installation is necessary on Windows. However on Linux you need to install a MySQL client. I'm currently working on a new version of biomaRt that by default will do the queries over HTTP and not via MySQL (although queries with MySQL will still be an option). With this I hope the biomaRt package will be easier to install and won't have firewall problems. I expect to put the update in the repository by early February. best, Steffen > "James W. MacDonald" <jmacdon at="" med.umich.edu=""> wrote > in message news:43D9335A.3050908 at med.umich.edu... > >> > I'm confused. There is no libs/libMySQL.dll but only a > libs/libMySQL.lib >> > file. >> >> Odd. Maybe you got a bum download? I checked my RMySQL installation, and >> also re-downloaded the binary package, and I have > > Jim, you're absolutely right. I was having problems downloading the file > http://stat.bell-labs.com/RS-DBI/download/ > The problem could have been a proxy server problem on my end, a fire wall > problem somewhere, or a high level of cosmic rays somewhere . I could > see the page, but all attempts to download any file from that page timed > out > on me earlier today. I gave up after about a dozen attempts. > > Since Google didn't seem to know about any other copies of the file on the > Internet, I requested one by E-mail from David James. He was so kind to > send me one very quickly, but the one I received by E-mail didn't have the > .DLL your were describing. So, I found the needed DLL somewhere else. > . > > The problem preventing my direct downloads has gone away, and yes, I can > now > see the DLL file you're describing. All is well now, and RMySQL and > biomaRt > are working quite nicely under Windows -- and installed but not yet tested > under Linux. I try to keep the same tools working on both platforms > whenever possible. > > Thanks again, > > efg > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor >
ADD REPLY

Login before adding your answer.

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