Personal tools


From UABgrid Documentation

Revision as of 15:20, 15 February 2011 by (Talk | contribs)

Jump to: navigation, search



Galaxy is an easy-to-use, open-source, scalable framework for tool and data integration. Galaxy provides access to tools (mainly comparative genomics) through an interface (e.g., a web-based interface). The Galaxy framework is implemented in the Python programming language.

End Users

A public instance of Galaxy maintained by Penn State University is at


To get started with installing your own Galaxy instance, the only required component is Python (2.4,2.5, and 2.6). Four simple steps will get you started with your own Galaxy instance

  1. clone the mercurial galaxy distribution
    hg clone galaxy_dist
    or get a source tarball
  2. execute
  3. execute
  4. go to http://localhost:8080
  • Galaxy runs on a local webserver, PasteScript written in Python. PasteScript is based on Python's library module simplehttpserverand implemented with the help of python package, WSGIUtils
<Proxy http://localhost:8080>
        Order deny,allow
        Allow from all

RewriteEngine on
RewriteRule ^/galaxy$ /galaxy/ [R]
RewriteRule ^/galaxy/static/style/(.*) /Users/pnm/project/galaxy_dist/static/june_2007_style/blue/$1 [L]
RewriteRule ^/galaxy/static/scripts/(.*) /Users/pnm/project/galaxy_dist/static/scripts/packed/$1 [L]
RewriteRule ^/galaxy/static/(.*) /Users/pnm/project/galaxy_dist/static/$1 [L]
RewriteRule ^/galaxy/favicon.ico /Users/pnm/project/galaxy_dist/static/favicon.ico [L]
RewriteRule ^/galaxy/robots.txt /Users/pnm/project/galaxy_dist/static/robots.txt [L]
RewriteRule ^/galaxy(.*) http://localhost:8080$1 [P]

  • Change the path to where you have cloned/installed Galaxy
  • http://localhost/galaxy should bring up Galaxy on port 80 now

Note: if you are using CentOS/RedHat as your platform, you may need to adjust or disable SELinux in order to allow Apache to access parts of the file system that are not part of the shipped default Directory directives of the Apache config. You will see unexplained "permission denied" errors in the errors.log if you are bitten by this.

Apache and Postgres Setup

In production mode it is recommended that something other than SQLlite and the python web server be used, preferably postgres and apache. When setting up apache to proxy requests to the python web server on CentOS it is critical that the default CentOS security policy be overridden to allow proxying as shown below.

setsebool -P httpd_can_network_relay=1

Additionally, redirects to the file system are blocked by selinux security policy. The current workaround for that is to running:

setenforce 0

A better solution will be to allow access to the required directories using chcon like this:

chcon -R -t httpd_user_content_t galaxy_dist/

This has been done and appears to work, allowing selinux to be turned back on.

Additionally, postgres ident privileges should be changed. One workaround is to set postgres to trust all local users as shown below in /var/lib/pgsql/data/pg_hba.conf

local   all         all                               trust

SMTP Configuration In lib/galaxy/ and universe_wsgi.ini

self.smtp_server = kwargs.get( 'smtp_server', "" )
#smtp_server =

Shibboleth Installation

The instructions for the base rpm install on the SP (your galaxy box) are here:

When doing a yum install, it will install both 32 bit and 64 bit giving this error:

Cannot load /usr/lib/shibboleth/ into server: /usr/lib/shibboleth/ wrong ELF class: ELFCLASS32 

This can be fixed by doing:

I have found that if you edit "/etc/httpd/conf.d/shib.conf" and alter the LoadModule line and change

"LoadModule mod_shib /usr/lib/shibboleth/"


"LoadModule mod_shib /usr/lib64/shibboleth/"

shibboleth sp will then start correctly. 


Galaxy makes some assumptions about python being > 2.4 as of February 2011. A completely new galaxy specific install of python 2.6.6 was done on the CentOS 5 galaxy VM. Some directions are found here:

RPy, R, Numpy,Nose, Atlas, BLAS, LAPACK, gFortran or g77

RPy requires R. R must be entirely rebuild with shared library option set on. Not a major problem. R can also be installed without shared libs using yum install R.

Rpy strongly suggests that numerical python (Numpy) be installed, which is dependent on Atlas, BLAS, LAPACK and needs Nose for testing. These packages can build with either the GNU of g77 fortran compiler, but they must use all the same one (I choose GNU) and renamed g77 to diable_g77 as numpy searches for g77 first.

CentOS using yum install, can install atlas, blast and lapack but it cannot build rpy with it do to fortran incomaptibilies.

Atlas and atlas-dev installs won't be compaitible with numpy.

Additionally, steps on installing mercurial can be found here:

Current issue is that rpy is old, didn't recognize the version of R (since it used 2 digits). Fixed rpy code to handle this, but rpy still looks for non-existent files in numpy. Probably these files existed in an earlier version of numpy. Will try using an earlier version of numpy. The proper correct solution is to update galaxy so that it can use rpy2.

Another workaround from:

Just substitute line 77 of src/RPy.h

  1. include <Rdevice.h> /* must follow Graphics.h */


  1. include <Rembedded.h> /* must follow Graphics.h */

it builds and seems to work


As per galaxy-dev email I sent the file: lib/galaxy/model/migrate/versions/ Contains SQL errors as it tries to rename a SEQUENCE with the incorrect sytax. ALTER TABLE should be used, not ALTER SEQUENCE. This file has errors in 2 locations. The problem remains as of February the 7th, 2011.