- $ ver="1.12"
- $ cd /programinstallers/
- $ wget -N http://creskolab.uoregon.edu/stacks/source/stacks-${ver}.tar.gz
- $ tar -zxvf stacks-${ver}.tar.gz
- $ cd stacks-${ver}
- $ ./configure
- A patch file to allow an alpha parameter of 0.5 stacks.patch
$ cd src && patch < …/stacks.patch && cd -
- $ make
- $ sudo make install
This installs to /usr/local/bin/ the following programs:
ustacks
pstacks
estacks
cstacks
sstacks
hstacks
process_radtags
process_shortreads
kmer_filter
clone_filter
genotypes
populations
phasedstacks
denovo_map.pl
ref_map.pl
export_sql.pl
index_radtags.pl
load_radtags.pl
sort_read_pairs.pl
exec_velvet.pl
load_sequences.pl
stacks_export_notify.pl
- Stop here for command line install
$ cd /programinstallers; rm stacks-${ver} -rf
- $ cd /usr/local/share/stacks/sql/
- $ sudo cp mysql.cnf.dist mysql.cnf
- $ sudo chmod 666 mysql.cnf
- $ nano mysql.cnf
[client]
user=stacks
password=secretpassword
host=localhost
port=3306
- $ mysql -h localhost -u root -p
- mysql> CREATE USER 'stacks'@'localhost' IDENTIFIED BY 'secretpassword';
Query OK, 0 rows affected (0.00 sec)
- mysql> quit
- $ sudo nano /etc/httpd/conf/httpd.conf
Add to the end of the file
<Directory "/usr/local/share/stacks/php">
Order deny,allow
Deny from all
Allow from all
</Directory>
Alias /stacks "/usr/local/share/stacks/php"
- $ cd /usr/local/share/stacks/php
- $ sudo cp -p constants.php.dist constants.php
- $ sudo chmod 666 constants.php
- $ nano constants.php
$db_user = "stacks";
$db_pass = "secretpassword";
$db_host = "localhost";
- $ sudo nano /usr/local/bin/stacks_export_notify.pl
my $smtp_host = "smtp.doit.wisc.edu";
my $from = "email\@wisc.edu";
- $ sudo chown apache:wheel /usr/local/share/stacks/php/export
- selinux stuff
$ sudo chcon -u system_u -t httpd_sys_content_t /usr/local/share/stacks
- $ sudo chcon -R -u system_u -t httpd_sys_content_t /usr/local/share/stacks/sql
- $ sudo chcon -R -u system_u -t httpd_sys_content_t /usr/local/share/stacks/php
- $ sudo chcon -R -u system_u -t httpd_sys_script_exec_t /usr/local/share/stacks/php/*.php
- Prerequisites
$ sudo yum install php-pear
- $ sudo pear install MDB2
- $ sudo pear install pear/MDB2#mysql
- Stacks version 0.9995, patch because indexing is failing due to not finding login information in ~/.my/cnf
$ sudo nano /usr/local/bin/index_radtags.pl
Line 570
$sth->{'dbh'} = DBI->connect("DBI:mysql:$db", "stacks", "secretpassword")
or die("Unable to connect to the $db MySQL Database!\n" . $DBI::errstr);
# $sth->{'dbh'} = DBI->connect("DBI:mysql:$db:mysql_read_default_file=$cnf")
# or die("Unable to connect to the $db MySQL Database!\n" . $DBI::errstr);
- Cleanup
$ cd /programinstallers; rm stacks-${ver} -rf