Skip to content

Installation

palmerito0 edited this page Apr 27, 2023 · 44 revisions

The kboolnet package and associated dependencies can be installed locally/manually or can be accessed via a prebuilt Docker container.

Local/manual installation

The installation of kboolnet consists of three main tasks: 1. installing rxncon and its dependencies, 2. installing the kboolnet R package, and 3. setting up the kboolnet package.

Manual installation has been tested on the following platforms:

  • Windows 10
  • Ubuntu 22.04.2, 21.10, 20.04.1
  • Fedora 37
  • CentOS 7
  • MacOS 13.2.1

Installing python3, pip, rxncon, and relevant python dependencies

Installing python3

rxncon is a python package and requires python3. If you don’t have python3 installed on your computer, there are several ways to install it:

Note for Linux users: on some Linux distributions it may be necessary to also install the python3-dev/python3-devel packages with the system package manager (i.e. apt, yum, dnf, etc.) to provide C headers needed for rxncon dependency compilation.

Following installation, make sure the directory where the python3 executable resides is added to the PATH system environment variable. Successful installation and PATH configuration can be verified by opening a new terminal (on Linux or MaxOS) or command prompt (on Windows) and typing python --version or python3 --version.

Installing pip

rxncon is a python package and requires pip (the python package manager) for its installation. Pip is usually installed automatically alongside python3; if not, there are several ways to install it:

Verify the successful installation by typing python -m pip --version in a terminal (on Linux or MacOS) or command prompt (on Windows).

Installing rxncon and openpyxl

Given working installations of python3 and pip, the rxncon python package can be installed in any environment by running python-m pip install rxncon in the command line. More information about rxncon is available at https://rxncon.org/

Note for Windows users: There is a known issue with installation of PyEDA, a package rxncon depends on, on Windows. See the FAQ for instructions on how to resolve this.

An additional python package required for kboolnet is openpyxl, which can be installed by running the following in the command line: python -m pip install openpyxl.

Successful installation of both rxncon and openpyxl can be verified by typing python -c "import rxncon; import openpyxl" at the command line; if both packages are properly installed, no errors will be produced.

Installing the kboolnet R package

Installing system build dependencies

Windows

Linux

  • Install R version 4.0 or above (https://cran.r-project.org/)
    • NOTE: Both the R-base-core and R-base-dev packages are required. Naming for these packages is inconsistent across distributions, see below for a limited list:
      • on Ubuntu (22.04): sudo apt install r-base-core r-base-dev
      • on Fedora 37: sudo dnf install R (this installs R-core, R-core-devel, and other recommended packages)
      • on CentOS 7: sudo yum install TODO
  • Install system libraries: libssl, libcurl4, and libxml2
    • NOTE: THIS IS NOT AN EXHAUSTIVE LIST. Installation of the devtools R package in the next step may still fail. If it does, carefully read the output of install.packages("devtools"), identify which libraries are missing, and install them.
    • on Ubuntu: sudo apt install libssl-dev libcurl4-openssl-dev libxml2-dev
    • on Fedora: sudo dnf install openssl-devel libcurl-devel libxml2-devel

MacOS

Installing R build dependencies

  • Install devtools R package by running install.packages('devtools') in an R shell
  • Install BiocManager R package by running the following in an R shell:
if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("remotes")

Installing kboolnet itself

Once all build dependencies are installed, the kboolnet R package can be installed using either BiocManager::install() or by manually building the package from source. The BiocManager method is highly recommended for most users; manually building from source is only necessary during package development.

BiocManager method

  • Install kboolnet by running BiocManager::install("Kufalab-UCSD/kboolnet") in an R shell

Manually build from source

  • Install R dependencies with BiocManager::install(c("numbers", "BoolNet", "googledrive", "tidyr", "dplyr", "ggplot2", "egg", "openxlsx", "optparse", "igraph", "RCy3", "rappdirs"))
  • Clone/otherwise download the repository from https://github.com/Kufalab-UCSD/kboolnet
  • Build the package and install it. This can be done via command line, but we recommend using Rstudio.

Optional: install BioNetGen

To allow for BioNetGen rule-based reaction modeling, install BioNetGen 2.5.2 by downloading and extracting the appropriate archive from https://github.com/RuleWorld/bionetgen/releases/tag/BioNetGen-2.5.2

Set up kboolnet package

  • Run library(kboolnet) in an interactive R shell
  • Run setupKboolnet() in an R shell and follow the prompts

Docker container installation

TODO

Clone this wiki locally