galaxy / galaxy-central

Main development repository for Galaxy. Active development happens here, and this repository is thus intended for those working on Galaxy development. See http://bitbucket.org/galaxy/galaxy-dist/ for a more stable repository intended for end-users.

Clone this repository (size: 204.1 MB): HTTPS / SSH
$ hg clone http://bitbucket.org/galaxy/galaxy-central

Galaxy Download and Installation


Note: You only need to download Galaxy if you plan to:

  1. Develop it further
  2. Add new tools
  3. Plug-in new datasources, or
  4. Run a local production server for your site

Otherwise, to simply use Galaxy, we maintain public sites: Galaxy Main and Galaxy Test.

The installation procedure is simple and is nearly identical for UNIX/Linux and Mac OS X. We are no longer supporting the Windows platform with our distribution, so you will have to build your own Python eggs if you want to install it on Windows (see Config/Windows for some tips). Of course, Windows users can use our public Galaxy server from their browsers.

These instructions describe the basic setup procedure for a development environment, more detailed instructions on how to deploy a production server can be found at the bottom of this page.

0. Check your Python version:

Currently supported Python versions are 2.4, 2.5, and 2.6. Before reporting bugs, please ensure that python --version reports one of these three versions. If this is not the case, a simple solution is to manipulate your shell's $PATH variable to place the correct version first. This can be done for only Python by creating a new directory at the front of $PATH and creating a symbolic link to python in that directory:

1
2
3
% mkdir ~/galaxy-python
% ln -s /path/to/python2.5 ~/galaxy-python/python
% export PATH=~/galaxy-python:$PATH

1. Get the latest copy from the repository:

The latest source code can be downloaded from the anonymous Mercurial repository with this command:

1
% hg clone http://www.bx.psu.edu/hg/galaxy galaxy_dist

If you don't have Mercurial, tarballs can be downloaded instead: zipped, bzipped or gzipped. However, this makes it more difficult to stay updated in the future since there's no simple way to update your copy.

2. Enable configuration files and download eggs:

Once the source code is downloaded, cd to the galaxy_dist directory and run the setup.sh script. This will copy sample configuration files and download the proper eggs for your platform:

1
2
% cd galaxy_dist
% sh setup.sh

3. Start it up:

At this point Galaxy is ready to run. Simply run the following command:

1
% sh run.sh

This will start up the server on localhost and port 8080, so Galaxy can be accessed from your web browser at http://localhost:8080 . To stop the Galaxy server, just hit Ctrl-c in the terminal from which Galaxy is running.

As shown, Galaxy is run locally and developers do not need any special environment for running and developing its code.

To access Galaxy over the network, simply modify the universe_wsgi.ini file and change the host setting to host = 0.0.0.0. Upon restarting, Galaxy will bind to any available network interfaces instead of just the loopback.

Please note that some tools do have outside dependencies that cannot be provided with Galaxy for various reasons. The list of these dependencies can be found on the ToolDependencies page.

4. Join the Mailing List:

The best way to keep up on new features and bug fixes, as well as discuss future features is to join the Galaxy Developers mailing list. The list is low-to-medium volume.

5. Keep your instance backed up :

Like any other application, your Galaxy directory and your Galaxy database tables should be backed up and your disaster recovery plan should be regularly tested to make sure everything is working as expected.

6. Keep your code up to date :

Galaxy-central source code continues to grow and change quite rapidly. The stable distribution will also be updated regularly but far less often. If you used the instructions shown on this bitbucket wiki (eg hg clone https://[your id]@bitbucket.org/galaxy/galaxy-central/ ), then you can check to see if the developers have made changes to any of the source code in your local clone by using the mercurial diff command from the root of the clone -

hg diff

If nothing appears, then there are no updates, but if the result shows that there are new changesets available, notes on all recent changes can be reviewed using the bitbucket changesets tab at the top of the wiki page. Updating is is easy - from the root of the clone, use the mercurial pull command with the update option:

hg pull -u

Note: after pulling changes, you will need to stop your Galaxy server and restart with the updated code. To keep your users happy, this should generally only be done when there are no users working or jobs running, so you should schedule a regular planned 'downtime' for this.

Note: Very rarely, updated code includes structural changes to the Galaxy database tables. Galaxy will initially refuse to load after a pull and the Galaxy log (typically paster.log) will show clear instructions, advising you to backup your Galaxy database tables and run the database update script - follow those instructions carefully - especially the part about backing up your database safely! Database updates are carefully tested before release, but it is always wise to be able to back out if something goes wrong during an update. Your system database tables backup might happen overnight, so a fresh backup is essential, in order to capture any work done since then. In the unlikely event that something does go wrong with updated code, as long as you have issued no other mercurial commands that change your local copy after hg pull -u then it should be possible to revert back to the previous code in your local copy by using

hg rollback

Restore the fresh backup if a database update was required, and then restart Galaxy to get back to where you started.

Advanced Configuration

The above instructions are intended for those wishing to develop tools and the Galaxy framework. To deploy a local site installation of Galaxy, some changes from the default configuration are highly recommended. If nothing else, switching to PostgreSQL or MySQL (from the default SQLite) is highly recommended to prevent database locking issues that can arise with multiple users.

Please see the Running Galaxy in a production environment page for more details.