(7 intermediate revisions by 3 users not shown) | |||
Line 37: | Line 37: | ||
</li> | </li> | ||
<li class="column small-4 large-2 ar3"> | <li class="column small-4 large-2 ar3"> | ||
− | <a href="https://2016.igem.org/Team:USTC-Software/Requirements"> | + | <a href="https://2016.igem.org/Team:USTC-Software/Requirements">Requirements</a> |
<ul class="menu"> | <ul class="menu"> | ||
<li><a href="https://2016.igem.org/Team:USTC-Software/Medals">Medals</a></li> | <li><a href="https://2016.igem.org/Team:USTC-Software/Medals">Medals</a></li> | ||
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 72: | Line 78: | ||
<div class="column small-12 large-12 ar0 textcontainer"> | <div class="column small-12 large-12 ar0 textcontainer"> | ||
<h1><a href="#Install_BioHub">Install BioHub</a></h1> | <h1><a href="#Install_BioHub">Install BioHub</a></h1> | ||
− | + | <p>If you just want to try it, please visit out website <a href="http://biohub.tech/">biohub.tech</a>. Or, if you want to install BioHub on your own server, we suggest users use Docker to deploy BioHub. It just needs two steps: | |
− | + | ||
</p> | </p> | ||
<p style="font-family:'Courier New' !important"> | <p style="font-family:'Courier New' !important"> | ||
Line 81: | Line 86: | ||
</p> | </p> | ||
<p> | <p> | ||
− | You can also use <span style="font-family:'Courier New' !important">-e BIOHUB_DB_HOST=<host><span> and/or <span style="font-family:'Courier New' !important">-e BIOHUB_DB_USER= | + | You can also use <span style="font-family:'Courier New' !important">-e BIOHUB_DB_HOST=<host><span> and/or <span style="font-family:'Courier New' !important">-e BIOHUB_DB_USER=<user> -e BIOHUB_DB_PASSWORD=<password></span> to connect to other databases. |
</p> | </p> | ||
<p> | <p> | ||
Line 100: | Line 105: | ||
./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>We assume that USTC-Software-2016 is the path to our git repo.</p> | ||
+ | <p style="font-family:'Courier New' !important"> | ||
+ | wget http://download.biohub.tech/ABACUS.tar.gz<br /> | ||
+ | wget http://download.biohub.tech/ABACUS.db.tar.gz<br /> | ||
+ | tar -xvzf ABACUS.tar.gz<br /> | ||
+ | tar -xvzf ABACUS.db.tar.gz<br /> | ||
+ | mv ABACUS $BioHubPath/USTC-Software-2016/plugins/ABACUS/<br /> | ||
+ | # $BioHubPath is the path you install BioHub<br /> | ||
+ | cd $BioHubPath/USTC-Software-2016/plugins/ABACUS/ABACUS/<br /> | ||
+ | sh setup.sh<br /> | ||
+ | # You will get a message like set ABACUSPATH=$BioHubPath/USTC-Software-2016/plugins/ABACUS/ABACUS<br /> | ||
+ | export ABACUSPATH=$BioHubPath/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://download.biohub.tech/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> |
Latest revision as of 03:59, 20 October 2016
Install BioHub
If you just want to try it, please visit out website biohub.tech. Or, if you want to install BioHub on your own server, 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=$BioHubPath/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%';