STACKS installation (Rose)

Installing stacks on Ubuntu Natty Narwhal or Oneiric Ocelot

STACKS is a piece of software produced by Julian Catchen in the Cresko lab. It’s designed to identify loci and alleles from RAD (or GBS) reads either de novo or after alignment to a reference. It consists of several modules that can be run separately, but to completely install it as a pipeline, it relies on a web server, unfortunately. Many of the required instructions are given in the README file, but because nobody in our lab is an expert on this, we had to fiddle around to get the program running on our Ubuntu machines.

Seb and I just used the following command to install Apache, MySQL and PhP, which are the programs you need (called the LAMP stack because they’re such a common set of tools for Linux servers).
sudo apt-get install lamp-server^

Beware of any passwords you set – I think I set up a new password on the root user, but now I can’t remember what it is (using the instructions on the page https://help.ubuntu.com/community/MysqlPasswordReset ). Make sure you flush the privileges and end the session completely, because otherwise the next steps will be impossible.

Next you need to set up a user with all privileges on any database. You could use ‘sunflower’@’localhost’, but ‘%’ allows sunflower to use mysql from anywhere, which overcame some IP/localhost issues I was having – let me know if you have a better solution. The following will create a new user:

mysql> CREATE USER 'sunflower'@'localhost' IDENTIFIED BY 'helianthus';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'sunflower'@'localhost' WITH GRANT OPTION;
mysql> CREATE USER 'sunflower'@'%' IDENTIFIED BY 'helianthus';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'sunflower'@'%' WITH GRANT OPTION;

You can look at all of the users and their privileges using:
mysql> select * from mysql.user ;

Then you need to edit the file mysql.cnf.dist as described in the stacks INSTALL file, copying it to mysql.cnf in its current folder and to .my.cnf in your home directory.

We’re still working on getting the stacks databases to appear on the web interface – but we’ll let you know when we do!

1 thought on “STACKS installation (Rose)

Comments are closed.