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

(Created page with "<html> <head> <meta charset="UTF-8"> <title>Team:USTC-Software - 2016.igem.org</title> <link rel="stylesheet" type="text/css" href="https://2016.igem.org/Template:UST...")
 
 
(9 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">Requirments</a>
+
<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 style="font-family:'Courier New' !important">
 +
docker run -d --name biohubdb -e MYSQL_ROOT_PASSWORD=password mysql
 +
<br />
 +
docker run -d --name biohub --link biohubdb:db -p 80:5000 biohubtech/biohub
 +
</p>
 
<p>
 
<p>
We suggest users use Docker to deploy BioHub. It just needs two steps:
+
You can also use <span style="font-family:'Courier New' !important">-e BIOHUB_DB_HOST=&lt;host&gt;<span> and/or <span style="font-family:'Courier New' !important">-e BIOHUB_DB_USER=&lt;user&gt; -e BIOHUB_DB_PASSWORD=&lt;password&gt;</span> to connect to other databases.
 
</p>
 
</p>
 
<p>
 
<p>
<pre>
+
Also, you can clone the repo and run it manually. We've tested this on Debian 8:
docker run -d --name biohubdb -e MYSQL_ROOT_PASSWORD=password mysql
+
docker run -d --name biohub --link biohubdb:db -p 80:5000 biohubtech/biohub
+
</pre>
+
 
</p>
 
</p>
 +
<p style="font-family:'Courier New' !important">
 +
sudo apt update<br />
 +
sudo apt install git python3 python3-pip python3-biopython python3-flask python3-sqlalchemy python3-scipy libmysqlclient-dev mysql-server mysql-client wget<br />
 +
git clone https://github.com/igemsoftware2016/USTC-Software-2016.git<br />
 +
cd USTC-Software-2016<br />
 +
sudo pip3 install flask_login mysqlclient pymysql<br />
 +
echo CREATE DATABASE biohub | mysql -u&lt;user&gt; -p # please fill in the blanks<br />
 +
wget http://parts.igem.org/partsdb/download.cgi?type=parts_sql -O biobricks.sql.gz<br />
 +
gunzip biobricks.sql.gz<br />
 +
mysql -u&lt;user&gt; -p biohub &lt; biobricks.sql # please fill in the blanks<br />
 +
echo "DATABASE_URI = 'mysql://&lt;username&gt;:&lt;password&gt;@localhost/biohub'" &gt;config.py # please fill in the blanks<br />
 +
echo "SECRET_KEY = '&lt;a random string&gt;'" &gt;&gt;config.py # please fill in the blanks<br />
 +
./run.py<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>
 
<p>
You can also use <pre>-e BIOHUB_DB_HOST=&lt;host&gt;</pre> and/or <pre>-e BIOHUB_DB_USER=<user> -e BIOHUB_DB_PASSWORD=&lt;password&gt;</pre> to connect to other databases.
+
Copy and run the code below to install ABACUS:
 
</p>
 
</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>
 
<p>
Also, you can clone the repo and run it manually. We've tested this on Debian 8:
+
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>
 
<p>
 
<p>
<pre>
+
To create database for pathfinder, execute the following SQL statement:<br />
sudo apt update
+
<span style="font-family:'Courier New' !important">
sudo apt install git python3 python3-pip python3-biopython python3-flask python3-sqlalchemy python3-scipy libmysqlclient-dev mysql-server mysql-client wget
+
create table biosys_562 (<br />
git clone https://github.com/igemsoftware2016/USTC-Software-2016.git
+
id int primary key AUTO_INCREMENT,<br />
cd USTC-Software-2016
+
gene_id char(10),<br />
sudo pip3 install flask_login mysqlclient pymysql
+
tax_id  char(10),<br />
echo CREATE DATABASE biohub | mysql -u&lt;user&gt; -p # please fill in the blanks
+
bsid    int,<br />
wget http://parts.igem.org/partsdb/download.cgi?type=parts_sql -O biobricks.sql.gz
+
Symbol  char(64));<br />
gunzip biobricks.sql.gz
+
<br />
mysql -u&lt;user&gt; -p biohub &lt; biobricks.sql # please fill in the blanks
+
alter table biosys_562 add index all_index(gene_id, bsid);<br />
echo "DATABASE_URI = 'mysql://&lt;username&gt;:&lt;password&gt;@localhost/biohub'" &gt;config.py # please fill in the blanks
+
<br />
echo "SECRET_KEY = '&lt;a random string&gt;'" &gt;&gt;config.py # please fill in the blanks
+
insert into biosys_562 (gene_id, tax_id, bsid, Symbol)<br />
./run.py
+
select a.gene_id, a.tax_id, b.bsid, a.Symbol<br />
# then the server will start on port 5000
+
from allgeneinfo_all a, biosystems b<br />
</pre>
+
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

Team:USTC-Software - 2016.igem.org


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%';


Links

USTC

Biopano


Contact Us

igemustc2016@gmail.com

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