Markdown | 94 lines | 71 code | 23 blank | 0 comment | 0 complexity | 2ecc4fc42a1ff3c460deff043611294b MD5 | raw file
1 2<!-- README.md is generated from README.Rmd. Please edit that file --> 3 4[![Build 5Status](https://api.travis-ci.org/CDK-R/cdkr.svg?branch=master)](https://travis-ci.org/CDK-R/cdkr) 6[![CRAN 7Version](https://www.r-pkg.org/badges/version/rcdk?color=green)](https://cran.r-project.org/package=rcdk) 8[![CRAN 9Downloads](http://cranlogs.r-pkg.org/badges/grand-total/rcdk?color=green)](https://cran.r-project.org/package=rcdk) 10[![CRAN Downloads 11Monthyl](http://cranlogs.r-pkg.org/badges/last-month/rcdk?color=green)](https://cran.r-project.org/package=rcdk) 12 13# rcdk: a chemistry library 14 15The goal of cdkr is to provide easy access to 16[CDK](https://github.com/cdk/cdk) chemoinformatics library to combine 17the simplicity and power of R with CDK’s powerful, tested API. 18 19# Installation 20 21rCDK package releases are available on CRAN or on Github via Devtools: 22 23``` r 24 25# releases 26install.packages("rcdk") 27 28# development releases of `cdkr` are also available on github uinsg devtools: 29library(devtools) 30install_github("https://github.com/CDK-R/rcdklibs") 31install_github("https://github.com/CDK-R/cdkr", subdir="rcdk") 32``` 33 34## Building and Development 35 36Information on building and devloping the CDKR package is available in 37teh Otherwise if you prefer the command line 38 39``` 40 cd /tmp/ 41 git clone email@example.com:CDK-R/rcdklibs.git 42 R CMD INSTALL rcdklibs 43 git clone firstname.lastname@example.org:CDK-R/cdkr.git 44 cd cdkr/rcdkjar 45 ant clean jar 46 cd ../ 47 R CMD INSTALL rcdk 48``` 49 50Before performing the install, you should have the following 51dependencies installed: 52 53 - rJava 54 - fingerprint 55 - png 56 - RUnit 57 - Java JDK \>= 1.8 58 59For the png package, I have tested 60[png-0.1-7](http://www.rforge.net/png/files/) 61 62Some users have reported that `rcdk` methods (such as `parse.smiles`) 63are returning errors related to class not found or class version 64mismatch. This can happen when you are using a prepackaged version of 65`rJava` from [CRAN](https://cran.r-project.org/) and is caused by that 66package not finding the correct JRE home if you have multiple Java 67versions installed. In such a case, reinstalling `rJava` from sources 68appears to resolve this issue. See this 69[discussion](http://stackoverflow.com/questions/26948777/how-can-i-make-rjava-use-the-newer-version-of-java-on-osx). 70 71### Installing Java 72 73rCDK uses the CDK library that requires the Java JDK \>= 1.8. In order 74to install rCDK, this requirement must be satisfied. You can check your 75java version on the command line as follows: 76 77 > java -version 78 > java version "1.8.0" 79 80If your version is not 1.8 you may need to download and install a more 81recent installation of JAVA. If you have multiple versions of JAVA you 82may be using an older version. On Mac OSX, for example, the latest OS 83installs JAVA 1.6 and you will need to reconfigure your JAVA install. 84You can try the following: 85 86 # set the java version 87 R CMD javareconf # or .... 88 sudo R CMD javareconf 89 90 # re install fromfrom R 91 install.packages('rJava', type="source") 92 93Further informaiton about R’s use of Java can be [found 94here](https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Java-support).