How to install BioMAJ?

Requirements:

  • git: installation here.
  • virtualenv

Then, create your BioMAJ directory:

mkdir biomaj310
cd biomaj310

Clone all git repositories of the BioMAJ project:

git clone https://github.com/genouest/biomaj-zipkin.git
git clone https://github.com/genouest/biomaj-user.git
git clone https://github.com/genouest/biomaj-cli.git
git clone https://github.com/genouest/biomaj-process.git
git clone https://github.com/genouest/biomaj-download.git
git clone https://github.com/genouest/biomaj.git
git clone https://github.com/genouest/biomaj-daemon.git 
git clone https://github.com/genouest/biomaj-watcher.git
git clone https://github.com/genouest/biomaj-ftp.git
git clone https://github.com/genouest/biomaj-release.git
git clone https://github.com/genouest/biomaj-core.git

Create a Python virtual environment to install BioMAJ and every associated package:

virtualenv envtest310

Every time you will want to use BioMAJ you have to activate the Python virtual environment:

source envtest310/bin/activate

Getting out of the virtual environment :

deactivate

Installation of each BioMAJ modules:

for repertoire in $(ls |grep "biomaj"); 
    do echo $repertoire; 
    cd $repertoire; git pull; 
    python setup.py install; 
    cd .. ; 
done

Pip and requests installation:

apt-get install python-pip 
pip install --upgrade pip
easy_install pip
pip uninstall requests
easy_install requests

Creation of a directory necessary for the proper functioning of BioMAJ:

mkdir tmp/
mkdir tmp/mongo
mkdir tmp/biomaj
mkdir tmp/biomaj/conf # configuration file bank.properties
mkdir tmp/biomaj/db # data storage
mkdir tmp/biomaj/log # log files
mkdir tmp/biomaj/lock # bank lock files 
mkdir tmp/biomaj/process
mkdir tmp/biomaj/cache

Installation of all required packages for BioMAJ (specifications for Ubuntu, it may require adpatations for another OS):

apt-get install libssl-dev libcurl4-openssl-dev python-dev
cd biomaj
pip install -r requirements.txt
cd ..

Creation of the configuration file and addition of an example to test the BioMAJ installation:

cd biomaj
cp global.properties.example global.properties
#Copy the example of the bank alu:
cp biomaj/tests/alu.properties <your path>/tmp/biomaj/conf 
#Modify root.dir in the global.properties file to match the path of all your data (<your path>/tmp/biomaj): 
vim global.properties
cd ..

Specific indications for pycurl (for CentOS):

pip install pycurl==7.43.0.1 --global-option="--with-nss"

Or for Ubuntu:

easy_install pycurl

If you want more information or if you have ssl issues : http://pycurl.io/docs/latest/install.html#ssl

Package installation (at the location where you want to store the BioMAJ data):

pip install requests
pip install redis
pip install influxdb
pip install pyyaml

Mongodb installation for ubuntu, short version(more information):

wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.4.0.tgz
tar xvzf mongodb-linux-x86_64-3.4.0.tgz
<home>/mongodb-linux-x86_64-3.4.0/bin/mongod --dbpath <home>/tmp/biomaj/db/ &

An other example for mongodb installation for CentOS (Thanks to the Plateforme Auvergne Bioinformatique):


vi mongodb.repo
yum repolist
yum install mongodb-org.x86_64
systemctl status mongod
systemctl start mongod
mongo

You can quickly test your installation with these commands:

# from the biomaj directory or by specifying the location of the global.properties file (--config option):
cd biomaj
biomaj-cli.py --help
# optionally list available bank templates
biomaj-cli.py --data-list
# and import a bank template (or use your own)
biomaj-cli.py --data-import --bank alu
biomaj-cly.py --bank alu --update

You are ready to start, go to Tutorial.