-
Notifications
You must be signed in to change notification settings - Fork 5
Home
Welcome to the ONION wiki!
To develop, build and etc. ONION on your own computer you have to install some necessary packages. It is also nice to set up some optional one to help you with process of developing and so on. Optional steps are with asterix *.
- Install R on your machine:
sudo su
echo "deb http://www.stats.bris.ac.uk/R/bin/linux/ubuntu precise/" >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
apt-get update
apt-get install r-base r-base-dev
apt-get install libatlas3-base
apt-get install libopenblas-base - Install RStudio*:
Go to https://www.rstudio.com/products/rstudio/download/ and download for example rstudio-1.0.136-amd64.deb
dpkg -i rstudio-1.0.136-amd64.deb - Install GIT and get sources of ONION project:
sudo apt-get install git
git clone https://github.com/wjurkowski/ONION.git
To build ONION with vignettes you need to follow instructions in Build process. Some known issues are describe in Known problems part.
- download, update sources by cloning, pulling this repository: https://github.com/wjurkowski/ONION.git
- Install all dependencies of ONION package from R console:
source("https://bioconductor.org/biocLite.R")
biocLite(c("igraph", "plyr", "RCurl", "RJSONIO", "XML", "testthat", "pls", "corrplot", "yacca", "FRCC", "httr", "STRINGdb", "BiocCheck", "CCA", "gridExtra", "mygene", "ChemmineR", "ChemmineOB", "knitr", "rmarkdown")) - open the ONION.Rproj project in R Studio
- build package
install.packages(c("devtools", "roxygen2"))
devtools::install_github("hadley/devtools", force = TRUE)
library(devtools)
devtools::build(vignettes = FALSE)
devtools::install(reload = TRUE, build_vignettes = FALSE)
library(ONION)
vignette("ONION")
You can also build it with vignettes, but it could be harder. So please use proposed way of building.
- Install R on your machine:
Download and install appropriate file from https://cran.r-project.org/bin/windows/base/ - Install RStudio*:
Go to https://www.rstudio.com/products/rstudio/download/ and download RStudio for Windows - Install GIT and get sources of ONION project:
Download GIT from https://desktop.github.com/ git clone https://github.com/wjurkowski/ONION.git
To build ONION follow the instructions in Build process.
- Install R on your machine:
Download and install appropriate file from https://cran.r-project.org/ - Install RStudio*:
Go to https://www.rstudio.com/products/rstudio/download/ and download RStudio for MacOS - Install GIT and get sources of ONION project:
Download GIT from https://desktop.github.com/ git clone https://github.com/wjurkowski/ONION.git
To build ONION follow the instructions in Build process.
If you see some similar message to that:
ERROR: dependencies ‘RCurl’, ‘rtracklayer’, ‘biomaRt’ are not available for package ‘GenomicFeatures’
* removing ‘/usr/users/TGAC_ga002/turekc/R/x86_64-pc-linux-gnu-library/3.3/GenomicFeatures’
You need to manually install each dependency for package GenomicFeatures. To do it for example for RCurl put into R console:
biocLite("RCurl")
Then you can see what is the problem with instalation of that library. In our case important part of the message looks like that:
checking for curl-config... no
Cannot find curl-config
ERROR: configuration failed for package ‘RCurl’
* removing ‘/usr/users/TGAC_ga002/turekc/R/x86_64-pc-linux-gnu-library/3.3/RCurl’
After a short research you will find that you do not have required lib on your system. In this case you need to install it by run this command in terminal:
sudo apt-get install libcurl4-gnutls-dev
Then try to install Rcurl again by performing biocLite("RCurl") in R console.
In case of XML or rtracklayer packages, the fastest way is install R package from Advanced Packaging Tool (apt). If you see message like that:
checking for xml2-config... no
Cannot find xml2-config
ERROR: configuration failed for package ‘XML’
You probably should run this command in terminal:
sudo apt-get install r-cran-xml
As you can see some R packages are available in this way. This is equivalent to install.packages("XML") or biocLite("XML"). It mean that you shouldn't run this commands again in R console.
Nice approach is always reload R session. I our case just restart RStudio.
Sometimes error message show you what you should do. Always read the error message carefully:
** package ‘openssl’ successfully unpacked and MD5 sums checked
Using PKG_CFLAGS=
Using PKG_LIBS=-lssl -lcrypto
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because openssl was not found. Try installing:
* deb: libssl-dev (Debian, Ubuntu, etc)
* rpm: openssl-devel (Fedora, CentOS, RHEL)
* csw: libssl_dev (Solaris)
* brew: [email protected] (Mac OSX)
If openssl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a openssl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘openssl’
As it is included into error message you need to install libssl-dev:
sudo apt-get install libssl-dev
Similar case is with BiocCheck package, you need to read with understanding ;) :
Failed to copy the script/BiocCheck script to /usr/lib/R/bin. If you
want to be able to run 'R CMD BiocCheck' you'll need to copy it
yourself to a directory on your PATH, making sure it is executable. See
the BiocCheck vignette for more information.
You can localized where package is installed by find.package("BiocCheck").
Problems related to openbabel are solvable by:
sudo apt-get install openbabel
sudo apt-get install libchemistry-openbabel-perl
sudo apt-get install libopenbabel-dev