/gas

Global AMP Survey database (GAS) backend

Primary LanguagePHPGNU General Public License v3.0GPL-3.0

How to deploy the gas?

1. INSTALL PHP development environment

INSTALL XAMPP is a quick way to INSTALL PHP development environment. XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl. The XAMPP open source package has been set up to be incredibly easy to install and to use.

  1. DOWNLOAD the 7.2.x / PHP 7.2.x version of XAMPP from https://www.apachefriends.org/download.html for your platform.
  2. INSTALL the 7.2.x / PHP 7.2.x version of XAMPP for your platform.
  3. START XAMPP(Apache and MySQL).

Be sure to read the install instructions and FAQs:

  1. Linux FAQs
  2. Windows FAQs
  3. OS X FAQs
  4. OS X XAMPP-VM FAQs

You can find additional help on forums or Stack Overflow.

2. INSTALL blast+, HMMER, and Python(MySQLdb, numpy, pandas)

  1. INSTALL blast+
  2. INSTALL HMMER
  3. INSTALL Python(MySQLdb, numpy, and pandas)

3. GIT CLONE and CONFIGURE GAS

  1. GIT CLONE gas to the XAMPP/xamppfiles/htdocs.
  2. CONFIGURE $_GAS_ROOT_PATH in gas/application/config/constants.php. Like :
$_GAS_ROOT_PATH = '/Applications/XAMPP/xamppfiles/htdocs/gas';
  1. CONFIGURE $_BLASTP_PATH in gas/application/config/constants.php. Like :
$_BLASTP_PATH = '/usr/local/bin/blastp';
  1. CONFIGURE $_HMMSEARCH_PATH in gas/application/config/constants.php. Like :
$_HMMSEARCH_PATH = '/usr/local/bin/hmmsearch';
  1. EXECUTE the gas/application/database/gas.sql to the database. Like :
/Applications/XAMPP/xamppfiles/bin/mysql -u root -p < /Applications/XAMPP/htdocs/gas/application/database/gas.sql
  1. CONFIGURE hostname, username, and password of database gas in gas/application/config/database.php. Like :
$db['default'] = array(
	'dsn'	=> '',
	'hostname' => '127.0.0.1',
	'username' => 'root',
	'password' => '',
	'database' => 'gas',

4. Import or update data

  1. Order your files. Like:
  2. CONFIGURE PYTHON_PATH in gas/import.sh. Like :
PYTHON_PATH="/Users/zhangjiyuan/opt/anaconda3/bin/python"
echo $PYTHON_PATH
  1. CONFIGURE hostname, username, and password of database gas in gas/process.py. Like :
db = MySQLdb.connect("127.0.0.1", "root", "", "gas", charset='utf8')
  1. RUN the script gas/import.sh. Like :
sh gas/import.sh -h
-s [dir] | the dir of data.

sh gas/import.sh -s /Users/zhangjiyuan/Desktop/docs/GAS_files

5. DEPLOY and VISIT gas frontend

  1. GIT CLONE gas_frontend/web to the XAMPP/xamppfiles/htdocs.
  2. VISIT http://127.0.0.1/web/#/home.

How to develop the gas?

1. Backend based on CodeIgniter

gas backend repo CodeIgniter User Guide

2. Frontend based on Vue and Element

gas frontend repo Vue Vue CLI Element