Difference between revisions of "Team:USTC-Software/Installation"

Line 123: Line 123:
 
tar -xvzf ABACUS.tar.gz<br />
 
tar -xvzf ABACUS.tar.gz<br />
 
tar -xvzf ABACUS.db.tar.gz<br />
 
tar -xvzf ABACUS.db.tar.gz<br />
mv ABACUS USTC-Software-2016/plugins/ABACUS/<br />
+
mv ABACUS $BioHubPath/USTC-Software-2016/plugins/ABACUS/<br />
cd USTC-Software-2016/plugins/ABACUS/ABACUS/<br />
+
                                                                # $BioHubPath is the path you install BioHub<br />
 +
cd $BioHubPath/USTC-Software-2016/plugins/ABACUS/ABACUS/<br />
 
sh setup.sh<br />
 
sh setup.sh<br />
 
# You will get a message like set ABACUSPATH=USTC-Software-2016/plugins/ABACUS/ABACUS<br />
 
# You will get a message like set ABACUSPATH=USTC-Software-2016/plugins/ABACUS/ABACUS<br />
export ABACUSPATH=USTC-Software-2016/plugins/ABACUS/ABACUS/<br />
+
export ABACUSPATH=$BioHubPath/USTC-Software-2016/plugins/ABACUS/ABACUS/<br />
 
# Don’t forget the last slash<br />
 
# Don’t forget the last slash<br />
 
cd bin<br />
 
cd bin<br />

Revision as of 03:31, 20 October 2016

Team:USTC-Software - 2016.igem.org


Install BioHub

We suggest users use Docker to deploy BioHub. It just needs two steps:

docker run -d --name biohubdb -e MYSQL_ROOT_PASSWORD=password mysql
docker run -d --name biohub --link biohubdb:db -p 80:5000 biohubtech/biohub

You can also use -e BIOHUB_DB_HOST=<host> and/or -e BIOHUB_DB_USER=<user> -e BIOHUB_DB_PASSWORD=<password> to connect to other databases.

Also, you can clone the repo and run it manually. We've tested this on Debian 8:

sudo apt update
sudo apt install git python3 python3-pip python3-biopython python3-flask python3-sqlalchemy python3-scipy libmysqlclient-dev mysql-server mysql-client wget
git clone https://github.com/igemsoftware2016/USTC-Software-2016.git
cd USTC-Software-2016
sudo pip3 install flask_login mysqlclient pymysql
echo CREATE DATABASE biohub | mysql -u<user> -p # please fill in the blanks
wget http://parts.igem.org/partsdb/download.cgi?type=parts_sql -O biobricks.sql.gz
gunzip biobricks.sql.gz
mysql -u<user> -p biohub < biobricks.sql # please fill in the blanks
echo "DATABASE_URI = 'mysql://<username>:<password>@localhost/biohub'" >config.py # please fill in the blanks
echo "SECRET_KEY = '<a random string>'" >>config.py # please fill in the blanks
./run.py
# then the server will start on port 5000


Install ABACUS

Copy and run the code below to install ABACUS:

We assume that USTC-Software-2016 is the path to our git repo.

wget http://download.biohub.tech/ABACUS.tar.gz
wget http://download.biohub.tech/ABACUS.db.tar.gz
tar -xvzf ABACUS.tar.gz
tar -xvzf ABACUS.db.tar.gz
mv ABACUS $BioHubPath/USTC-Software-2016/plugins/ABACUS/
# $BioHubPath is the path you install BioHub
cd $BioHubPath/USTC-Software-2016/plugins/ABACUS/ABACUS/
sh setup.sh
# You will get a message like set ABACUSPATH=USTC-Software-2016/plugins/ABACUS/ABACUS
export ABACUSPATH=$BioHubPath/USTC-Software-2016/plugins/ABACUS/ABACUS/
# Don’t forget the last slash
cd bin
mkdir pdbs
# If you are on Intel platform, please do the following steps
rm psdSTRIDE
wget http://download.biohub.tech/psdSTRIDE
# All done!


Upload Data File From NCBI

Goto root direction, open ncbiuploader.py. Change filepath to the path you store NCBI data file, and change column_num to the number of columns in data file.

It’s recommended to download file from following url:
ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/GENE_INFO/All_Data.gene_info.gz, column_num=15.
ftp://ftp.ncbi.nlm.nih.gov/pub/biosystems/biosystems.20161008/biosystems_gene_all.gz, column_num=3

Add index for tables:
alter table biosystems add index all_index (gene_id, bsid);
alter table allgeneinfo_all add index all_index (gene_id, tax_id, Symbol);
alter table allgeneinfo_all add fulltext('Symbol');

To create database for pathfinder, execute the following SQL statement:
create table biosys_562 (
id int primary key AUTO_INCREMENT,
gene_id char(10),
tax_id char(10),
bsid int,
Symbol char(64));

alter table biosys_562 add index all_index(gene_id, bsid);

insert into biosys_562 (gene_id, tax_id, bsid, Symbol)
select a.gene_id, a.tax_id, b.bsid, a.Symbol
from allgeneinfo_all a, biosystems b
where a.gene_id = b.gene_id and a.tax_id='%tax_id%';


Links

USTC

Biopano


Contact Us

igemustc2016@gmail.com

No.96, JinZhai RD., Hefei, Anhui, PRC.