Skip to content

Instantly share code, notes, and snippets.

@adefelicibus
Last active August 18, 2016 19:17
Show Gist options
  • Save adefelicibus/361de45567b539cc4d74d087abbfc7b4 to your computer and use it in GitHub Desktop.
Save adefelicibus/361de45567b539cc4d74d087abbfc7b4 to your computer and use it in GitHub Desktop.
Install caRpools on Linux using Conda

Create a conda environment to be used with caRpools

$ conda create -n carpools -y pip

Activate the new env

$ source activate carpools

You have to install Pandoc as sudo (sorry :( ), if you don't have already installed it.

# Ubuntu
$ sudo apt-get install pandoc
# CentOS
$ sudo yum install pandoc

Download and compile new packages

Install Mageck

$ mkdir $HOME/caRpools
$ cd ~/caRpools
$ wget https://sourceforge.net/projects/mageck/files/0.5/mageck-0.5.4.tar.gz/download -O mageck-0.5.4.tar.gz
$ tar zxvf mageck-0.5.4.tar.gz
$ cd mageck-0.5.4
$ python setup.py install --prefix=$HOME/caRpools

Modif your .bashrc with this new entries. To save the path configuration (so you don't have to type it every time), place the above command in your ~/.bashrc (for Linux)

$ export PATH="$HOME/caRpools/bin:$PATH"
$ export PYTHONPATH="$HOME/caRpools/lib/python3.5/site-packages:$PYTHONPATH"
$ source ~/.bashrc

Install TexLive

$ mkdir $HOME/caRpools/texlive
$ cd ~/caRpools/texlive
$ wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
$ tar xzvf install-tl-unx.tar.gz
$ cd install-tl{data}
$ ./install-tl
D
1
$HOME/caRpools/texlive {Note: You have to put the full path here. Do not use $HOME}
R
I {Note: This will take a while. You can go to have a coffee :P}

Modif your .bashrc with this new entries.

$ export PATH="$HOME/caRpools/texlive/bin/x86_64-linux:$PATH" 
$ source ~/.bashrc

Install packages to conda

$ conda install -y -c bioconda bowtie2
$ conda install -y -c cyclus java-jdk=8.45.14
$ conda install -y -c cyclus java-jre=8.45.14
$ conda install -y -c anaconda gcc=4.8.5
$ conda install -y -c r r-base=3.3

Configure Java to be used by R

$ export PATH="$HOME/miniconda3/envs/carpools/bin:$PATH"
$ export JAVA_HOME="$HOME/miniconda3/envs/carpools/bin"
$ export JAVA_LD_LIBRARY_PATH="$HOME/miniconda3/envs/carpools/jre/lib/amd64/server"
$ source ~/.bashrc

It is better if you logoff and login again with your user. Set Java to be available to R.

# Dry-run to check if all the variables is ok .
R CMD javareconf -n
R CMD javareconf -e
R
install.packages('rJava') {Note: You will need to select a mirror to download the package. Select the better one for you. If you are in Brazil, you can use the mirror from SP (6) }
source("http://bioconductor.org/biocLite.R")
biocLite(c("BiocGenerics"))
biocLite(c("biomaRt"))
biocLite(c("DESeq2"))
install.packages('seqinr')
install.packages('xlsx')
install.packages('xlsxjars')
install.packages('stringi')
install.packages('scatterplot3d')
install.packages('rmarkdown')
install.packages('knitr')
install.packages('VennDiagram')
install.packages('sm')
install.packages("caRpools")

Still using R, check if the installation were ok.

library('caRpools')
check.caRpools()
q()

Deactivate the enviroment

$ source deactivate carpools

Test of caRpools

Download the example data and test if all the components of the software are working good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment