Table of contents
Installing bngal
Although bngal is released as a standalone R package and can be interactively used in an IDE such as RStudio, I strongly recommend running the command-line utility wrapper (bngal-cli) to simplify its use, especially for first-time users. bngal-cli is currently only tested on MacOS and Linux.
You can quickly install both the bngal R package and its command-line utility wrapper via the following instructions:
Command line utility (recommended)
There are two ways to install the command line utility: DockerHub or Singularity/Apptainer. I recommend using one of the images hosted on DockerHub (do note your chip architecture - discussed further below). An installation route is also available from Anaconda or CRAN.
Docker (and Singularity/Apptainer)
Multi-platform Docker images for BNGAL are maintained here. Supported architectures for each release version are noted in the table below.
| Image Tag | Version | Architecture |
|---|---|---|
mjsel/bngal:1.0.1 | 1.0.1 | amd64 / arm64 |
mjsel/bngal:1.0.0 | 1.0.0 | amd64 / arm64 |
bngal-cli is easily installable if you use Docker:
docker pull mjsel/bngal:1.0.1
Alternatively, you can pull the same image if you use Singularity/Apptainer:
apptainer pull docker://mjsel/bngal:1.0.1
Anaconda virtual environment
If you instead prefer to use conda, please follow the instructions as follows.
- Install the appropriate Anaconda version for your operating system if you don’t have it already.
- Clone the
bngal-cliGitHub repository into your directory of choice (my-directory) and run the setup script in a bash or zsh shell session. This will install thebngalR package within a new conda environment called “bngal”:
cd my-directory
git clone https://github.com/mselensky/bngal-cli --branch v.1.0
cd bngal-cli
bash bngal-setup.shAnd that’s it! Sit tight and grab a coffee while bngal-cli installs. It may take a few minutes.
Once you successfully install and activate the bngal environment, you can remove the bngal-cli folder. When the bngal environment is active, you will have access to two bngal-cli functions:
bngal-cli functions
| Function | Application |
|---|---|
bngal-build-nets | Build network model(s) according to defined cutoffs |
bngal-summarize-nets | Summarize and visualize network statistics from bngal-build-nets |
R package only with CRAN
If you only want to use the bngal R package interactively, you can install it and its dependencies within an active R session via:
source("https://raw.githubusercontent.com/mselensky/bngal-cli/main/R/install-R-pkgs.R")
Please refer to the internal documentation when using the standalone R package.