For GPU support you will most likely have to install SNPsyn on a physical machine. Otherwise, we recommend to install SNPsyn into a virtual machine.
Get the latest Ubuntu Server Edition using your web browser or by typing:
curl http://ftp.arnes.si/pub/mirrors/ubuntu-cdimage/oneiric/ubuntu-11.10-serv\
er-amd64.iso > ubuntu-11.10-server-amd64.iso
Boot image in vmware (or on a physical machine) and select “Install ubuntu server”. When asked, select:
Note
This is the default password for the virtual server image we can provide. Please, select/change to some other, more secure password for your local installation.
In the software selection section select:
Set MySQL “root” user password. Default is “snpsyn_change_this!”. Please, select some other password for your local installation.
After first login update all packages and the kernel, and install g++ by running:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install g++
#reboot for new kernel to load
sudo /sbin/shutdown -r now
Read documentation and perform these steps:
# install kernel modules
sudo apt-get install --no-install-recommends open-vm-dkms
# headless install (no need for the xorg install)
sudo apt-get install --no-install-recommends open-vm-tools
# check that the system reboots without any warnings
sudo /sbin/shutdown -r now
A number of third-party packages is required for SNPsyn web server to work.
Install mod_python first:
sudo apt-get install libapache2-mod-python
Enable server-side includes, which are needed to render the web-page correctly:
sudo a2enmod include
Create the folder where SNPsyn will reside:
sudo mkdir /var/www/SNPsyn
Grant your user permission to access the folder:
sudo chown www-data.www-data /var/www
sudo chown snpsyn:www-data /var/www/SNPsyn
Edit the server configuration file:
sudo vi /etc/apache2/sites-enabled/000-default
Example of apache server configuration files can be found here:
documentation/SNPsyn_server/default
documentation/SNPsyn_server/httpd.conf
These are the most importat lines to add:
<Directory "/var/www/SNPsyn">
Options -Indexes FollowSymLinks +Includes
AddType text/html .html
AddHandler server-parsed .html
AllowOverride All
Order deny,allow
Allow from all
</Directory>
<Directory "/var/www/SNPsyn/script">
Options -Indexes FollowSymLinks +Includes
AddHandler mod_python .py
PythonInterpreter main_interpreter
PythonHandler mod_python.publisher
PythonPath "sys.path+['/var/www/SNPsyn/script/admin']"
PythonDebug On
AllowOverride All
Order deny,allow
Allow from all
</Directory>
<Directory "/var/www/SNPsyn/run">
Options -Indexes -FollowSymLinks -Includes
DirectoryIndex index.py
AddHandler mod_python .py
PythonInterpreter main_interpreter
PythonHandler mod_python.publisher
PythonDebug On
AllowOverride All
Order deny,allow
Allow from all
</Directory>
<Directory "/var/www/SNPsyn/data_submit">
Options Indexes FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
<Directory "/var/www/SNPsyn/download">
RemoveHandler .py
AddType text/plain .py
</Directory>
<Directory "/var/www/SNPsyn/documentation/SNPsyn_cmdl">
Options +Indexes
RemoveHandler .html
</Directory>
<Directory "/var/www/SNPsyn/documentation/SNPsyn_cmdl/scripts">
Options +Indexes
RemoveHandler .html
</Directory>
Add the correct MIME type for .syn files by editing /etc/apache2/mods-available/mime.conf:
AddType application/octet-stream .syn
Modify records allow-access-from in cross-domain.xml to reflect your server’s IP address(es) and then move it to the server root folder:
sudo mv /var/www/SNPsyn/cross-domain.xml /var/www
Restart the web server:
sudo /etc/init.d/apache2 restart
Install subversion and other required packages:
sudo apt-get install subversion mercurial
sudo apt-get install make g++ python-dev python-numpy python-imaging cmake python-sip-dev
sudo apt-get install python-qt4 python-qwt5-Qt4 python-pygraphviz
Check-out Orange (somewhere in your home folder):
svn checkout http://orange.biolab.si/svn/orange/trunk/orange
cd orange
svn checkout http://orange.biolab.si/svn/orange/trunk/source
Compile the C++ sources:
cd source
make
cd ..
sudo mkdir /usr/lib/python2.7/dist-packages/orange
tar -cf - --exclude='.svn' * | sudo tar --no-same-owner -xf - -C /usr/lib/python2.7/dist-packages/orange
sudo sh -c "echo '/usr/lib/python2.7/dist-packages/orange' > /usr/lib/python2.7/dist-packages/orange.pth"
sudo ln -s /usr/lib/python2.7/dist-packages/orange/liborange.so /usr/lib/liborange.so
cd ..
Install the Bioinformatics add-on and get the latest GO annotation and other data:
svn checkout http://orange.biolab.si/svn/orange/trunk/add-ons/Bioinformatics
cd Bioinformatics
python setup.py install
python post_install_script.py install
sudo chgrp -R www-data /home/snpsyn/.orange/buffer
Check-out the latest version of SNPsyn directly into your web server folder:
cd /var/www/SNPsyn
hg clone ssh://hg@bitbucket.org/tomazc/snpsyn .
Change permissions for data upload:
chmod go+w /var/www/SNPsyn/data_submit
Test the mod_python installation by pointing your web browser to http://yourserver/SNPsyn/script/test.py. A simple web page with the following content should appear:
mod_python installed successfully
Note
Substitute yourserver with the actual name of your server.
Remove test.py:
sudo rm /var/www/SNPsyn/script/test.py
Then run a script to set-up the database:
python /var/www/SNPsyn/script/admin/SNPsyn_db.py reset
chmod go+w /var/www/SNPsyn/script/admin
chmod go+w /var/www/SNPsyn/script/admin/SNPsyn.db
File “SNPsyn.db” should appear in /var/www/SNPsyn/script/admin. If you decide to put the database file into some other location, please update the “_db_filename” string in /var/www/SNPsyn/script/request.py accordingly.
Set correct web server IP address by setting in parameter data_server of function index in file:
/var/www/SNPsyn/run/index.py
Remove debug.py to prevent unauthorized access and manipulation of the database:
sudo rm /var/www/SNPsyn/script/debug.py
Note
If using a checked-out version of SNPsyn, file debug.py will reappear after an “update” from the repository. Remember to remove it every time after an update.
For the purpose of extending SNP ids (rs*) with chromosome and gene information a local SNP to gene mapping database can be build. The mapping information is downloaded from NCBI. Example scripts that will download and prepare human and mouse mapping databases are:
cd /var/www/SNPsyn/script/admin
python prepare_human_9606.py
python prepare_mouse_10090.py
and the databases will be created in:
/var/www/SNPsyn/script/admin/human_9606/mapping
/var/www/SNPsyn/script/admin/mouse_10090/mapping
The simplest way to add a new mapping database is to create a new prepare_my_species.py script by using the human/mouse prepare script as a template. Another important step is to edit:
/var/www/SNPsyn/script/go_data.py
and add the correct GO annotation species name.
The SNPsyn web and AIR interface automatically detect the available mappings by looking at files in:
admin/*/mapping/tags.xml
Restart the web server:
sudo /etc/init.d/apache2 restart
And then check that the GO service is running by visiting http://yourserver/SNPsyn/script/index.py/go.
Note
Substitute yourserver with the actual name of your server.
The SNPsyn web interface connects to the SNPsyn server to perform GO enrichment analysis and to extend SNPs with gene and chromosome information. The SNPsyn server location for the web interface can be modified by editing:
/var/www/SNPsyn/run/index.py, argument data_server (line 1)
For the SNPsyn AIR interface, the server address can be edited directly in the settings window.
SNPsyn comes with precompiled binaries for Linux, Mac OS X and Windows. To compile the code yourself, see file INSTALL inside the zipped source file and also available in:
/var/www/SNPsyn/source/SNPsyn_cmdl/INSTALL
The daemon process scans the database for newly submitted analyses. When data and parameters for a new analysis get submitted, the daemon will run the SNPsyn command-line program to perform the analysis. It will update the progress status. When an analysis is done, it will prepare a set of files to be read and displayed by the Flash-based SNPsyn web interface for exploratory analytics.
Note
If you change the default locations of the data_submit folder, SNPsyn_daemon.py file or the command-line SNPsyn program, you must change the SETTINGS section in /var/www/SNPsyn/script/admin/SNPsyn_daemon.py accordingly.
Note
For GPU support, review the SETTINGS section in /var/www/SNPsyn/script/admin/SNPsyn_daemon.py.
Important, only AFTER you have reviewed the SETTINGS section in /var/www/SNPsyn/script/admin/SNPsyn_daemon.py, configure the daemon to start at boot:
sudo cp /var/www/SNPsyn/script/admin/SNPsyn_boot_script /etc/init.d/SNPsyn
sudo chmod gu+x /var/www/SNPsyn/script/admin/SNPsyn_daemon.py
sudo chmod +x /etc/init.d/SNPsyn
sudo update-rc.d SNPsyn start 99 2 3 4 5 . stop 99 0 1 6 .