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

Line 62: Line 62:
 
<li>
 
<li>
 
<a href="#Install_BioHub">Install BioHub</a>
 
<a href="#Install_BioHub">Install BioHub</a>
 +
</li>
 +
<li>
 +
<a href="#Install_ABACUS">Install ABACUS</a>
 +
</li>
 +
<li>
 +
<a href="#Upload_Data_File_From_NCBI">Upload From NCBI</a>
 
</li>
 
</li>
 
</ul>
 
</ul>
Line 100: Line 106:
 
./run.py<br />
 
./run.py<br />
 
# then the server will start on port 5000<br />
 
# then the server will start on port 5000<br />
 +
</p>
 +
</div>
 +
</div>
 +
 +
<div class="row ar1" id="Install_ABACUS" data-magellan-target="Install_ABACUS">
 +
<hr />
 +
<div class="column small-12 large-12 ar0 textcontainer">
 +
<h1><a href="#Install_ABACUS">Install ABACUS</a></h1>
 +
<p>
 +
Copy and run the code below to install ABACUS:
 +
</p>
 +
<p style="font-family:'Courier New' !important">
 +
wget http://example.com/ABACUS.tar.gz<br />
 +
wget http://example.com/ABACUS.db.tar.gz<br />
 +
tar -xvzf ABACUS.tar.gz<br />
 +
tar -xvzf ABACUS.db.tar.gz<br />
 +
mv ABACUS XXX/USTC-Software-2016/plugins/ABACUS/<br />
 +
cd XXX/USTC-Software-2016/plugins/ABACUS/ABACUS/<br />
 +
sh setup.sh<br />
 +
# You will get a message like set ABACUSPATH=XXX/USTC-Software-2016/plugins/ABACUS/ABACUS<br />
 +
export ABACUSPATH=XXX/USTC-Software-2016/plugins/ABACUS/ABACUS/<br />
 +
# Don’t forget the last slash<br />
 +
cd bin<br />
 +
mkdir pdbs<br />
 +
# If you are on Intel platform, please do the following steps<br />
 +
rm psdSTRIDE<br />
 +
wget http://example.com/psdSTRIDE<br />
 +
# All done!
 +
</p>
 +
</div>
 +
</div>
 +
 +
<div class="row ar2" id="Upload_Data_File_From_NCBI" data-magellan-target="Upload_Data_File_From_NCBI">
 +
<hr />
 +
<div class="column small-12 large-12 ar0 textcontainer">
 +
<h1><a href="#Upload_Data_File_From_NCBI">Upload Data File From NCBI</a></h1>
 +
<p>
 +
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.
 +
</p>
 +
<p>
 +
It’s recommended to download file from following url:<br />
 +
ftp://ftp.ncbi.nlm.nih.gov/gene/DATA/GENE_INFO/All_Data.gene_info.gz, column_num=15.<br />
 +
ftp://ftp.ncbi.nlm.nih.gov/pub/biosystems/biosystems.20161008/biosystems_gene_all.gz, column_num=3
 +
 +
</p>
 +
<p>
 +
Add index for tables:<br />
 +
<span style="font-family:'Courier New' !important">
 +
alter table biosystems add index all_index (gene_id, bsid);<br />
 +
alter table allgeneinfo_all add index all_index (gene_id, tax_id, Symbol);<br />
 +
alter table allgeneinfo_all add fulltext('Symbol');
 +
</span>
 +
</p>
 +
<p>
 +
To create database for pathfinder, execute the following SQL statement:<br />
 +
<span style="font-family:'Courier New' !important">
 +
create table biosys_562 (<br />
 +
id int primary key AUTO_INCREMENT,<br />
 +
gene_id char(10),<br />
 +
tax_id  char(10),<br />
 +
bsid    int,<br />
 +
Symbol  char(64));<br />
 +
<br />
 +
alter table biosys_562 add index all_index(gene_id, bsid);<br />
 +
<br />
 +
insert into biosys_562 (gene_id, tax_id, bsid, Symbol)<br />
 +
select a.gene_id, a.tax_id, b.bsid, a.Symbol<br />
 +
from allgeneinfo_all a, biosystems b<br />
 +
where a.gene_id = b.gene_id and a.tax_id='%tax_id%';
 +
</span>
 
</p>
 
</p>
 
</div>
 
</div>

Revision as of 02:45, 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:

wget http://example.com/ABACUS.tar.gz
wget http://example.com/ABACUS.db.tar.gz
tar -xvzf ABACUS.tar.gz
tar -xvzf ABACUS.db.tar.gz
mv ABACUS XXX/USTC-Software-2016/plugins/ABACUS/
cd XXX/USTC-Software-2016/plugins/ABACUS/ABACUS/
sh setup.sh
# You will get a message like set ABACUSPATH=XXX/USTC-Software-2016/plugins/ABACUS/ABACUS
export ABACUSPATH=XXX/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://example.com/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.