How to install biomaj?
Requirements: mongodb 3.x , redis
Create your BioMAJ directories:
mkdir data/
mkdir data/conf
mkdir data/lock
mkdir data/db
mkdir data/process
mkdir data/cache
mkdir data/log
Create a Python virtual environment to install BioMAJ and every associated package:
python3 -mvenv envbiomaj
Every time you will want to use BioMAJ you will have to activate the Python virtual environment:
source envbiomaj/bin/activate
Getting out of the virtual environment :
deactivate
Pip and requests installation:
pip install --upgrade pip
easy_install pip
pip uninstall requests
easy_install requests
Installation of all required packages for BioMAJ (specifications for Ubuntu, it may require adaptations for another OS):
apt-get install libssl-dev libcurl4-openssl-dev python-dev
cd biomaj
Creation of the configuration file and addition of an example to test the BioMAJ installation:
git clone https://github.com/genouest/biomaj.git
cd biomaj
cp global.properties.example global.properties
#Copy the example of the bank alu:
cp biomaj/tests/alu.properties <your path>/data/conf
#Modify root.dir in the global.properties file to match the path of all your data (<your path>/data) and mongodb/redis/smtp connection parameters:
vim global.properties
#For Ubuntu
apt-get install libssl-dev libcurl4-openssl-dev python-dev
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
Mongodb installation for ubuntu, short version(more information):
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo service mongod start
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
Installation of the BioMAJ packages:
pip install biomaj-cli
pip install biomaj-daemon
pip install biomaj-user
pip install biomaj-download
pip install biomaj-process
pip install biomaj-cron
pip install biomaj-ftp
For biomaj-watcher :
git clone https://github.com/genouest/biomaj-watcher
cd biomaj-watcher
python setup.py develop
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
biomaj-cly.py --bank alu --update
You are ready to start, go to Tutorial.