Skip to content
js21 edited this page Apr 2, 2014 · 6 revisions

The snp_sites code is publicly available as a Debian/Ubuntu package. The Debian package name is snp-sites (the name change was needed due to Debian package naming conventions).

snp-sites is currently available in the Debian testing repository and should be available on the next Ubuntu release (14.04 LTS). This information will be updated as soon as this happens.

In order to install it on your Debian/Ubuntu machine, this is what you need to do:

1 - Add the Debian testing repository to the end of your sources file (/etc/apt/sources.list)

deb http://http.us.debian.org/debian testing main contrib non-free

Note: You should make Ubuntu aware that this is a trusted repository, by adding whatever public keys this repo uses, but I'll skip that part here as it's not a showstopper.

2 - Save the file

3 - Create a file called debian_testing in /etc/apt/preferences.d/ and paste this info to it:

Package: *

Pin: release v=12.04, l=Ubuntu

Pin-Priority: 1000


Package: snp-sites

Pin: release a=testing

Pin-Priority: 600

Note: This is called apt pinning. In this case, you're telling the OS that the 12.04 LTS Ubuntu repositories have priority over the Debian testing repositories for all packages, with the exception of the package snp-sites. The package snp-sites will always be retrieved from the Debian testing repositories. More on apt-pinning here: Apt-Pinning

4 - Save the file

5 - You will need to update apt-get's repository information, so run the command

apt-get update

6 - And finally, you can install snp-sites

apt-get install snp-sites

Note: You will need admin privileges on your machine to run steps 5 and 6

7 - To check if snp-sites is installed, in your terminal run

snp-sites

You should see the help menu:

Usage: snp_sites [-mvph] [-o output_filename]

This program finds snp sites from a multi fasta alignment file.

-m output a multi fasta alignment file (default)

-v output a VCF file

-p output a phylip file

-o specify an output filename

-h this help message

input alignment file which can optionally be gzipped

If you see this, you can start using snp-sites.

Clone this wiki locally