WebArray 1.1

----------- Requirements -----------

1. Unix-like OS
2. Apache
3. MySQL
4. Python
5. R/Bioconductor

	Apache should be configured to use python script as CGI, better with mod_python

	Need privilege to create database and add user

Python need modules:
	1. Rpy (http://rpy.sourceforge.net/)
	2. MySQLdb (http://sourceforge.net/projects/mysql-python)
	3. pycrypto (http://www.amk.ca/python/code/crypto.html)
	4. Karrigell (necessary modules were already packed in WebArray)

	1. R Should be built as shared library, i.e. configure it with option "--enable-R-shlib" before making R. Otherwise you cannot use Rpy.
	2. Bioconductor (http://www.bioconductor.org) with packages: limma, vsn, affy, sma, modstat

----------- Steps to install WebArray------------

1. Get the packages of WebArray: WebArray-1.0.tar.gz

Their destination directories are respectively /var/www/html and /var/www/cgi-bin (or /home/Your_ID/public_html and /home/Your_ID/public_html/cgi-bin for personal use)

2. unpack them:
	# tar xzf WebArray-1.0.tar.gz

3. put them to correct locations:
	Now you get a folder "WebArray-1.0" with two sub-directories: "webarray-1.0" and "cgi-bin/webarray-1.0", containing pages and CGI scripts. Their destination directories are respectively /var/www/html and /var/www/cgi-bin (or /home/Your_ID/public_html and /home/Your_ID/public_html/cgi-bin for personal use)
	# cd WebArray-1.0
	# mv webarray-1.0 /var/www/html
	# mv cgi-bin/webarray-1.0 /var/www/cgi-bin

	Make the "index.html" file. (Use "index_user.html" instead of "index_root.html" if you install WebArray under "/home/Your_ID/public_html")
	# cd /var/www/html/webarray-1.0
	# cp index_root.html index.html 
	Make correct links for webpages:
	# cp WebArray-1.0.tar.gz /var/www/html/webarray-1.0/sources/1.0
	# cp /var/www/html/webarray-1.0/README /var/www/html/webarray-1.0/sources/1.0
	if you prefer http://localhost/webarray, you may create links:
	# ln -s /var/www/html/webarray-1.0 /var/www/html/webarray && ln -s /var/www/cgi-bin/webarray-1.0 /var/www/cgi-bin/webarray

3. create user directory:
	# cd /var/www/html 
	# mkdir webarray_users
	# chown apache: webarray_users
	# cd webarray-1.0
	# ln -s ../webarray_users users

	The users directory will be used to store user uploaded data and analysis results.
4. create database:
	# cd /var/www/cgi-bin/webarray-1.0
	Then, edit the file 'DBSRC' to suit your case, typically, change the password. If you have privilege to create MySQL database, you may go forward:

	# ./mkDB -u mysql_manager_id -p

	Now the database was created. An encrpted version of 'DBSRC', named 'DB', was created too while the orignal file 'DBSRC' was deleted.
5. run the daemon for computation:
	# cd /var/www/cgi-bin/webarray-1.0
	# ./analyze_dmp

	To kill the daemon:
	# ./analyze_dmp stop
	# kill `ps -a | grep analyze_dmp | cut -d' ' -f1`

	You may want to run it as a service by writing some scripts in /etc/rc.d too. It's OK, but bear in mind that analyze_dmp should be launched at the directory /var/www/cgi-bin/webarray-1.0 since it depend on some other modules here. 
6. Some other necessary modifications:
	a) In the CGI script "register", change the email address from xqxia70@gmail.com to what you will use. (There are two occurrences) 
	b) In the web page file "intro.html", change related contact email and other information.