BINF 6215: Get your own Galaxy
If you want to have some flexibility about what tools are available in your Galaxy instance, you can set up your own local instance. Remember that whatever you do with a local Galaxy instance will be limited by the available memory and processor speed of your computer — so a genome assembly that won’t happen fast at your command line isn’t going to be speeded up just by virtue of putting it in Galaxy. But it’s a great way to be able to tinker and try out new things.
Find Galaxy on your computer
It’s installed in a directory called galaxy-dist. If you can’t find it, try typing:
find / -name galaxy-dist
Change into that directory. Type
Don’t close this window — as long as you want to work with your instance. Killing the window will kill the Galaxy process as well. Now go to your web browser and open this URL:
Holy cats! It’s a Galaxy instance! Register yourself as a user with a password and username that you’ll remember.
Customize your instance
Hit Ctrl-C in your shell window to kill the Galaxy instance temporarily so you can give yourself admin privileges. You’re going to edit Galaxy’s master configuration file here, so be careful. You might even want to make a backup copy of the file before you start tinkering.
Open the file universe_wsgi.ini with vi (or nano).
Then, find the place in the file where the admin users variable is set. You can search for this in your file in vi by typing “/admin” Enter, and to move from instance to instance of that pattern in the file, you can just type “/” Enter. Here’s what it looks like unmodified:
Once you find the right line, uncomment the line (remove the hashtag at the beginning) and type the e-mail address you used to register yourself in your local Galaxy. This is what it should look like after you modify it (except with your e-mail address instead of mine).
Next, find the line where the tool dependencies directory variable is set. In your galaxy-dist directory, you’ll have to mkdir a directory for this. I called mine tool-dependencies. Then the value of the variable will just be tool-dependencies (Galaxy will look in its own path for the directory). Or you could give the whole path to the directory. Either will work.
Save the modified configuration file, and then restart the Galaxy instance again and open it up in your browser. Now when you log in, you can use your admin powers for good. There’s a whole lot of administration power here and we are not going to use too much of it, because you’re not going to open this instance up to serve Galaxy to other users on the web. But you could if you had the resources.
Adding a tool from the Tool Shed
The reason you want your own Galaxy instance in the first place is that you can have access to some tools that you would not have access to on Galaxy Main.
In the figure above you can see the menu item “Tool Sheds” down at the bottom right. Tool Sheds are places where people who have developed Galaxy wrappers for tools make them publicly available. (A “wrapper” is script-y code that creates an interface between the software itself and Galaxy). Installing a tool from the Tool Shed will make that tool part of your Galaxy instance. Tools aren’t 100% guaranteed to work — it’s the downside of free and open source software — but chances are if you pick a well-known tool from the main Tool Shed it’s going to work OK.
When you click on the Search and browse tool sheds link in the admin interface you should have a choice of two options — the Main Tool Shed and the development Tool Shed. Click on the Main Tool Shed link and you’ll have a choice to either search for a tool by name or to browse. You want to browse, because you probably don’t yet know the range of possibilities that are going to be available. You’ll get a list of repositories like this — the list is really about twice as long as what’s shown here and contains all sorts of possible tools.
Select the Assembly category.
There are a couple of useful and interesting sounding tools up there. The mira_assembler is one that you can use with 454 and Ion Torrent data, and since our small-sized chloroplast genome data sets are Ion Torrent data, it might be useful to have an assembler that’s going to work on that data. And minimus2 is a program that lets you merge two different sets of assembled contig sequences. You never know when you might need something like that! Go ahead and click and install these tools. mira has some dependencies, but since you set your Galaxy up with a tool-dependencies directory, it should be able to handle installing them.
You might have noticed that your new Galaxy instance doesn’t have an Assembly tool category, so go ahead and make one to put your two new tools in. If a tool installs correctly, this is what it will look like.
Once your tools are installed, you can find them by clicking back to the “Analyze Data” tab at the top of your window, to get out of the Galaxy admin area and back into the workspace. Open up the new “Assembly” category at the bottom of the tools list and you’ll see them there.