Once you have downloaded the scripts (here),
you can follow this instructions to make EST-PAC working on your machine.
Step 1:
Installation of Mysql, PHP and Apache :
As the originally shipped PHP does not come with the possibility of displaying GD image, one have to download and install MySQL and PHP packages:
MySQL
Get the correct DMG (standard 5.0) here
And the Installation instructions are here
Install the MySQLStartupItem.pkg if you want to start MySQL at Startup
and don't forget to install the Mysql preference panel (MySQL.prefPane) by double click on it.
After having installed MySQL, it is recommended (by the MySQL team), to run the mysql_secure_installation script,
you should use this version
as the original script did not update the root password with the OLD_PASSWORD function.
To do so
download the file, then move it to /usr/local/mysql/bin/ by typing in the same Terminal you used for installing MySQL
sudo mv /Where you have downloaded/mysql_secure_installation_old /usr/local/mysql/bin/mysql_secure_installation_old
Your administrator password will be needed here
Change the ownership and permissions rights
sudo chown root bin/mysql_secure_installation_old
sudo chgrp wheel bin/mysql_secure_installation_old
sudo chmod 755 bin/mysql_secure_installation_old
run it also from the same
Terminal
sudo bin/mysql_secure_installation_old
And
follow the instructions appearing on the screen
PHP
Apache
The apache distributed by Mac work fine, nothing need to be done at this point
____________________________________________________________________________________
MySQL
To be on the safe side stop MySQL by using the Preferences Panel, then proceed as described above
As the package used to install MySQL doesn't contain a configuration file (my.cnf or my.ini), one need to create one.
The values contain in this configuration file depends a lot your system. To do so type in Terminal if:
Your system has little memory (<= 64M) where MySQL is only used from time to time.
sudo cp /usr/local/mysql/support-files/my-small.cnf /usr/local/mysql/data/my.cnf
Your system has little memory (32M - 64M) where MySQL plays an important part.
sudo cp /usr/local/mysql/support-files/my-medium.cnf /usr/local/mysql/data/my.cnf
Your system has 512M where the system runs mainly MySQL.
sudo cp /usr/local/mysql/support-files/my-large.cnf /usr/local/mysql/data/my.cnf
Your system has 1G-2G where the system runs mainly MySQL.
sudo cp /usr/local/mysql/support-files/my-huge.cnf /usr/local/mysql/data/my.cnf
Once the appropriate file have been copied, one should modify the file in order to make the innodb table type working.
To do so type in terminal (admin password will be needed):
# Uncomment the following if you are using InnoDB tables #innodb_data_home_dir = /usr/local/mysql/data/ #innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend #innodb_log_group_home_dir = /usr/local/mysql/data/ #innodb_log_arch_dir = /usr/local/mysql/data/ # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high #innodb_buffer_pool_size = 384M #innodb_additional_mem_pool_size = 20M # Set .._log_file_size to 25 % of buffer pool size #innodb_log_file_size = 100M #innodb_log_buffer_size = 8M #innodb_flush_log_at_trx_commit = 1 #innodb_lock_wait_timeout = 50
Then uncomment lines 2-5, 8-9, and 11-14 to get something like that:
# Uncomment the following if you are using InnoDB tables innodb_data_home_dir = /usr/local/mysql/data/ innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend innodb_log_group_home_dir = /usr/local/mysql/data/ innodb_log_arch_dir = /usr/local/mysql/data/ # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high innodb_buffer_pool_size = 384M innodb_additional_mem_pool_size = 20M # Set .._log_file_size to 25 % of buffer pool size innodb_log_file_size = 100M innodb_log_buffer_size = 8M innodb_flush_log_at_trx_commit = 1 innodb_lock_wait_timeout = 50
Then to set the permissions correctly type:
sudo
chown -R mysql /usr/local/mysql/data/
If someone find a value to be changed, please contact Yvan Strahm
PHP
In the file php.ini, normally located here: /usr/local/php/lib/php.ini, everything after a semi-colon " ; " will NOT be read by PHP.
To edit this file type in Terminal:
sudo pico /usr/local/php/lib/php.ini
Then change the following lines:
Change the line: short_open_tag = Off to
short_open_tag = On
Change the line: allow_call_time_pass_reference = Off to
allow_call_time_pass_reference = On
You will have to decide:
How long you will let PHP run to execute a script. To do so change the number of second at this line
max_execution_time = 30
to something bigger like 300 or even 3600
How much memory a script can consume at:
memory_limit = 64
Change 64M to something more close to 512M (depending of your machine's RAM)
In order to debug problems, it is wise to change these lines:
error_reporting = E_ALL to
error_reporting = E_ALL & ~E_NOTICE
display_errors = Off todisplay_errors = On
; error_log = filename could be something like that
error_log = /var/log/php_errorsThe name "php_errors" could be replaced by something of your choice.
If you plan to upload big file you should change these line
post_max_size = 8M to post_max_size = 80M
upload_max_filesize = 2M to upload_max_filesize = 80M
Here some minor changes
Remove the ; form session.save.path line
ession.gc_dvisor = 1000 to session.gc_dvisor = 100
session.bug_compat_42 = 0 session.bug_compat_42 = 1
Apache
If you used the disk image provided by entropy.ch you
shouldn't make any changes in the apache configuration. Otherwise:
You have to change (uncommented) the lines concerning the
PHP module in /private/etc/httpd/httpd.conf
- Open a Terminal
window, go to Application -> Utilities -> Terminal.
- To
become superuser type: sudo su and your password
(you need to have administrator rights).
- Open
httpd.conf in a neutral text editor: nano
/etc/httpd/httpd.conf
- In the nano window, press
Control W followed by php4 return.
It will bring you to this line #LoadModule php4_module
libexec/httpd/libphp4.so . Remove the pound sign if any.
-
Re-press Control W and type php4 until your reach
this line: #AddModule mod_php4.c. Here again remove the pound sign
if any.
- Go to System Preference -> Sharing
and under Service tick Personal Web Sharing to start apache
-
Open your favourite browser and type: http://127.0.0.1/~yourname
and if everything is fine you will see a web page.
But depending of the job's type Apache need to be tune up
Change the TimeOUT value to 3600 from 300
If someone find a value to be changed, please contact Yvan Strahm
____________________________________________________________________________________
First, you have to rename the correct config file:
In
your case rename the file config.inc.php in the folder est-pac/inc/
as follow:
config.inc.php.MAC to config.inc.php
Now you have to edit it
Line 7:
Replace
"your name" by the user name hosting the est-pac. In my
case it is $config['install_dir'] =
'/Users/yvan/Sites/est-pac/';
Lines 12 and 13:
Replace DB1 and/or delete DB2 by the name of your database, the
username and the password shouldn't be modified as they are used by
the scripts to connect the database
Line 16:
One
can blast locally if the value of $config['blast_local']
= 1 if set to 0 Blast Job are send to NCBI.
Line 22:
Change the
"db_name" by the name of the database you formatdb your
self (see formatdb note). For example if
you formatted two dbs, ecoli.nt and sts like This:
formatdb -o T
-p F -i ecoli.nt -n ecoli.nt
formatdb -o T -p F -i sts -n
sts
Then this line will look like that:
$config['blast_databases'] = array('sw/ncbi/db/ecoli.nt' ,
'sw/ncbi/db/sts');
Secondly, You have to edit the line 24 in
inc/db.inc.php
By deleting the starting # from line 24 in the
file /inc/db.inc.php
# $server = $server
.":localhost:/private/tmp/mysql.sock";
becomes
$server = $server
.":localhost:/private/tmp/mysql.sock";
This line
indicates where PHP can find the socket for MySQL. You can also fix
this problem by using the Apple recipe here
data folder
First you have to give the folder data the correct user / group and permission combination. Type in Terminal:
sudo su
chown -R "your name" /Users/"your login name"/Sites/est-pac/data
chgrp -R www /Users/"your login name"/Sites/est-pac/data
chmod 775 /Users/"your login name"/Sites/est-pac/data
Download Blast executables and database
Executable
Download from NCBI the BLASTALL programs. Look for the blast-x.x.xx-ppc32-macosx.tar.gz file.
Put them in the est-pac/sw/ncbi/ directory, then untar them (just double click them!)
Make sure that you put the content of the newly create directory (BlastX.x.x) into the est-pac/sw/ncbi/ directory and not in est-pac/sw/ncbi/BlastX.x.x/!
From NCBI download the database you are interested in, for example: ecoli.nt.gz
Move the downloaded file in est-pac/sw/ncbi/db/
In Terminal type
cd /Users/"your login name"/Sites/est-pac/sw/ncbi/db
gunzip -c ecoli.nt.gz
|../bin/formatdb -o T -p F -i stdin -t ecoli.nt -n ecoli.nt
.
This command is for a nucleotide db! If you want to formatdb
proteinic sequences type formatdb -o T -p T -i ecoli.aa -n ecoli.aa
Note: Use the -o T option only if the ID line (after>) is UNIQUE, otherwise don't use it
The name after the -n option should be put in this line in the config.inc.php file.
For the one interested this page could be interesting ....
Download HMMER and PFAM database
Download HMMER in est-pac/sw/hmmer/.
Untar put them in the est-pac/sw/hmmer/ directory
Make sure that you put the content of the newly create directory (hmmer-x.x.x) into the est-pac/sw/hmmer/ directory
Download Pfam_ls into /Sites/est-pac/hmmer/db/ and untar it
Download ESTScan
Download this already compiled version of ESTScan
Unzip it in the est-pac/sw/ directory
____________________________________________________________________________________
Before trying to open a web browser in order to connect
the database, it could be helpful if you start the program "Console"
located in Utilities.
Then open the log /var/log/httpd/error.log.
One gets useful hints here when things go wrong
____________________________________________________________________________________
In order to test the installation, type in your browser
this URL:
http://127.0.0.1/~your Mac OS X
username/est-pac/login.php
This window will appears where
you will have to enter your MySQL admin login and password,
then hit submit me!
then you will see this:
Enter root as Username and root as Password, choose the
database you want to enter,

and
hit Login, et voilà!
____________________________________________________________________________________
In Terminal type
cd /Users/Your Login
Name/Sites/est-pac
then followed by this command: php
job_runners_start.php folowed by the database's name you are working
with, if it is DB1 it will be :
php job_runners_start.php DB1
If you get this error message
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61)
Be sure you uncomment line 24 in inc/db.inc.php (See step 3)