Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install demo for beRi Suite of Tools
# Make directories
mkdir scripts
mkdir GitHub
mkdir demo
# Download and/or install important dependencies
if ! type "pip" > /dev/null; then
cd ~/scripts
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3.6 get-pip.py --user
exec bash --login
pip install --user poetry cookiecutter
else
pip install --user poetry cookiecutter
fi
# Setup renv
cd ~/GitHub
git clone https://github.com/datasnakes/renv
cd renv
git checkout santina/symlink
poetry install -vvv
poetry build
pip install --user dist/renv*.whl
# Setup rinse
cd ~/GitHub
git clone https://github.com/datasnakes/rinse
cd rinse
poetry install -vvv
poetry build
pip install --user dist/rinse*.whl
# Setup rut
cd ~/GitHub
git clone https://github.com/datasnakes/rut
cd rut
git checkout old_remotes
poetry install -vvv
poetry build
pip install --user dist/rut*.whl
cd ~/demo

beRi demo (tested on Ubuntu-16.04)

This demo was tested on Ubuntu-16.04 which comes pre-installed with bash, Python 3.6, git, and curl. The beRi package have been built using Python 3.6. Other versions of Python have not been tested. Other operating systems have not been tested. Know bugs include renv Issue #32

WARNING: USE THIS AT YOUR OWN RISK. THIS CODE IS UNTESTED.

beRi LICENSING: beRi

renv LICENSING: renv

rut LICENSING: rut

rinse LICENSING: rinse

Instructions

First download the beRi_setup.sh file into your home directory

$ cd
$ curl -O https://gist.githubusercontent.com/grabear/498b67b89ba1c0d45fe3a7fef6271f29/raw/e47cd735ec5432edf6f4795a45481a7182ab4f14/beRi_setup.sh
# Source the file once if pip is already installed.
$ source beRi_setup.sh
# Source the file twice if pip is not installed.  The bash shell needs to be reloaded.
$ source beRi_setup.sh

Install R from source using rinse if it's not already installed on the system

# should already be in the ~/demo directory
$ cd ~/demo
# install the latest version of R from source
# This will take a while
$ rinse
# Add the folder where R is located to PATH (may not be the same as below)
# You can also add this line to your .bashrc and then source .bashrc
$ export PATH="$PATH:~/src/bin/"
$ which R

Create a virtual environment with renv

# If R is in your PATH
$ renv -d ~/hackseq2018
$ source hackseq2018/bin/activate
# The environment should be activated.
# If you call R it will be the R in the environment.  The default .Rprofile will ask some questions.
# For a quick demo select yes for bioconductor and no for the rest
$ R

R version 3.5.1 (2018-07-02) -- "Feather Spray"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.


Attaching package: ‘utils’

The following object is masked _by_ ‘.GlobalEnv’:

    askYesNo


..................Attempting to Load Bioconductor...................

Warning: Prompting for Bioconductor Installation...

Do you want to install Bioconductor??? [Y/N]
Y

..................Attempting to Load Devtools...................

Warning: Prompting for Devtools Installation...

Do you want to install Devtools??? [Y/N]
N

..................Attempting to Load Tidyverse...................

Warning: Prompting for Tidyverse Installation...

Do you want to install Tidyverse??? [Y/N]
N

Warning: Installing Bioconductor from /home/demo/.Rprofile.
 into /home/demo/hackseq2018/lib/R/library
trying URL 'https://bioconductor.org/packages/3.7/bioc/src/contrib/BiocInstaller_1.30.0.tar.gz'
Content type 'application/x-gzip' length 19149 bytes (18 KB)
==================================================
downloaded 18 KB

WARNING: ignoring environment value of R_HOME
* installing *source* package ‘BiocInstaller’ ...
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
WARNING: ignoring environment value of R_HOME
Bioconductor version 3.7 (BiocInstaller 1.30.0), ?biocLite for help
* DONE (BiocInstaller)

The downloaded source packages are in
        ‘/tmp/Rtmp89KFhA/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Bioconductor version 3.7 (BiocInstaller 1.30.0), ?biocLite for help

..............Bioconductor was successfully installed...............


..............Bioconductor was successfully installed!!...............

# Now install something from bioconductor
> biocLite('edgeR')

Bash script preview

# Make directories
mkdir scripts
mkdir GitHub
mkdir demo

# Download and/or install important dependencies
if ! type "pip" > /dev/null; then
    cd ~/scripts
    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
    python3.6 get-pip.py --user
    exec bash --login
    pip install --user poetry cookiecutter
else
    pip install --user poetry cookiecutter
fi

# Setup renv
cd ~/GitHub
git clone https://github.com/datasnakes/renv
cd renv
git checkout santina/symlink
poetry install -vvv
poetry build
pip install --user dist/renv*.whl

# Setup rinse
cd ~/GitHub
git clone https://github.com/datasnakes/rinse
cd rinse
poetry install -vvv
poetry build
pip install --user dist/rinse*.whl

# Setup rut
cd ~/GitHub
git clone https://github.com/datasnakes/rut
cd rut
git checkout old_remotes
poetry install -vvv
poetry build
pip install --user dist/rut*.whl

cd ~/demo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.