beRi “beri environments for R installations” is an R environment, R installation, and R package management system for the R programming language.
View our isc proposal to the R Consortium for beRi.
background
Are you a biologist or bioinformatician who desires to manage R environments, install R, and install R packages using the command-line? Help develop beRi!
What is beRi
?
beRi is a suite of Python packages composed of the following components: (1) renv, a virtual environment manager for R; rinse, an R installation and R version manager; and (3) rut, an R utility tool for installing packages, managing native R configuration files, and setting up local CRAN-like repositories. These packages will be developed in separate repositories as standalone command-line interfaces (CLIs). beRi will also be developed in a separate repository but will depend on the other three packages.
These packages will be built in Python for Linux systems starting with the latest long-term support (LTS) Ubuntu release. We have opted to use Python because of the ease of developing CLIs with the powerful tooling available in Python compared to R or Bash. Specifically, we are using the click Python package to build the CLIs. We will optimize our Python packages for the R ecosystem by using the R manuals, which can be found on the CRAN website. Once we have achieved stable builds on Ubuntu, we will broaden our compatibility to include additional popular Linux distributions, Windows 7 and above, and macOS.
Features
▶ Creation of an R environment using the command-line
▶ Installing different versions of R from source using the command-line with a one liner
▶ Installing R packages using the command-line with a one liner
▶ Creating and managing a `.Rprofile` using the command-line
▶ Improved reproducibility of R projects
Why beRi
?
Reproducibility is one of the cornerstones of scientific advancement according to the NIH. Organizations such as RStudio and rOpenSci promote these values, which makes R based data analysis increasingly more attractive. This is especially true in academia and in the health care industry, where R’s popularity has created a demand for easy to use tools that improve reproducible research. Currently, several technologies exist that seek to accomplish this goal. The containerit and rocker projects are examples that incorporate containerization via docker. The Docker strategy is a way to perfectly reproduce a project on any system. However, many R users in academia and in the health care industry usually don’t have access to docker, primarily because of system vulnerabilities, and because it typically requires administrative privileges. These issues are compounded in situations where system administrators are either inexperienced, overworked, or both. To ameliorate these issues, conda is the preferred framework and is by far one of the most popular options for reproducibility. In other use cases, researchers also prefer various R packages including packrat, checkpoint (MRAN), miniCRAN, drat, workflowr, and drake. While these packages add tremendous value to data analysis projects, they limit users to using an interactive R session (the R shell). The proposed solution is the beRi suite of tools for managing R. beRi is a recursive acronym, which stands for “beRi Environments for R Installations”. The tools created for beRi will aim to support reproducibility by allowing virtualization and standardization for data analysis, while also supporting R’s native infrastructure by developing command-line tools present in other popular programming languages.
install
Installing beRi
beRi
is currently not available on pypi, but it will be soon. However, you may build beRi
using poetry. The first official release is coming soon!
You can still install and use each tool individually (renv
, rinse
, and rut
). Those instructions are below.
Dependencies
R dependencies include remotes, packrat, jetpack, and checkpoint.
Python (version 3.6) dependencies include click, poetry, and PyYaml
renv
renv
is a cli for creating and managing virtual environments for R.
Currently, this project is not on pypi, but you can install using the below instructions if you have poetry installed.
Creating an R environment
rinse
rinse
is a configurable installer CLI for installing R from source (sudo and non-sudo).
Currently, this project is not on pypi, but you can install using the below instructions if you have poetry installed.
Install the latest (3.5.1) version of R
You can install the latest version of R into your home directory with a single short command.
rut
rut
is a cli of r utilities aimed at package and .Rprofile management.
Currently, this project is not on pypi, but you can install using the below instructions if you have poetry installed.
Install packages using R’s remotes
package
hackseq18
hackseq is a Vancouver-based hackathon focused on genomics, and it aims to bring individuals with diverse backgrounds together to collaborate on scientific questions and problems in genomics.
w00t w00t Congratz to team beRi for being selected the #hackseq18 winners!https://t.co/I43sRmRTNz#HackTheGenome #R4Lyfe
— hackseq (@hackseq) October 15, 2018
I had a blast working with everyone on my team, including @IAmShaurita, who was participating remotely from Jackson, Mississippi. pic.twitter.com/UzcfjDhjoc
— Bruno Grande (@scientificbruno) October 15, 2018