![]() |
||||||
School of Medicine • University of Washington • Box 357735 • 1705 NE Pacific St • Seattle WA 98195 | ||||||
![]() |
![]() |
![]() |
![]() |
|||
Installation¶Requirements¶Xpression requires a UNIX-like environment, such as Linux or MacOSX and the following software: Main software:
Python packages:
GUI software:
Install from package repository¶Many tools exist to acquire software packages quickly and easily. These include repositories of binaries, ready to be copied to your system in a simple and easy-to-use manner. These package managers include apt/synaptic for Ubuntu, yast in openSUSE and Fink for MacOSX. They will install the software without any lower-level steps, following a point-and-click interface. Install from source¶Some software may not be available to you in package format, which means you will need to install the software from source. This process involves taking the text-based source code from the developer, compiling it by turning the text into executable binary, and finally copying the binary file(s) to a directory the computer knows to look in for software. It can be tedious, but it is fairly consistant from source to source, so doing it once should make subsequent installations easier. Automatic¶These steps can be automated with the installation script provided: This script downloads, compiles, and installs any software not found in the system’s PATH. It uses common system utilities and may require system-wide access priviledges. This access will be given by sudo, which will prompt for a password if needed. It checks the system PATH for the software Xpression uses and, if found, verifies the minimum version number of that software is met. To check the current installation state, run Xpression_install.sh with the -c option: $ sh Xpression_install.sh -c
Checking for software needed for Xpression...
Status
BWA installed.
samtools installed.
python installed.
numpy installed.
Biopython installed.
pysam not installed.
Java installed.
Here pysam needs to be installed before Xpression can run. Running the script again with the -i option will automatically retrieve and install what’s needed: $ sh Xpression_install.sh -i
Installing software needed for Xpression...
Status
BWA installed.
samtools installed.
python installed.
numpy installed.
Biopython installed.
pysam not installed.
fetching pysam from http://pysam.googlecode.com/files/pysam-0.5.tar.gz...
extracting pysam-0.5.tar.gz...
building pysam-0.5.tar.gz...
installing pysam-0.5.tar.gz...
Java installed.
Manual¶If a piece of software is not available as a package, and you do not wish to use the script, you will need to install from source. Tools like gcc and make are needed to convert the text of the code into excutable software to run on your system. For MacOSX, this means XCode is needed, which includes Mac versions of those tools. XCode can be downloaded from the developer tools URL. As an example of what this process looks like, you can follow along step-by-step below. Lets install two software requirements, the application samtools and the python package pysam. These represent the two basic methods of installation of the software used. First, fire up a terminal and a web browser. samtools¶We need to get the source from the developers first. Browse to the samtools downloads page and select the latest release, currently samtools-0.1.18.tar.bz2. If you wish, you can download the file directly. Save this file to some convenient location on the hard drive. In the terminal, browse to this location by typing: $ cd convenient/location
Then unpack the download with tar by typing: $ tar xjvf samtools-0.1.18.tar.bz2
This will create a directory named samtools-0.1.18, which we can enter by typing: $ cd samtools-0.1.18
Type ls to see what this folder contains: $ ls
AUTHORS bam_mate.c bgzf.h klist.h razf.c
bam2bcf.c bam_md.c bgzip.c knetfile.c razf.h
bam2bcf.h bam_pileup.c ChangeLog knetfile.h razip.c
bam2bcf_indel.c bam_plcmd.c COPYING kprobaln.c sam.c
bam2depth.c bam_reheader.c cut_target.c kprobaln.h sam.h
bam_aux.c bam_rmdup.c errmod.c kseq.h sam_header.c
bam.c bam_rmdupse.c errmod.h ksort.h sam_header.h
bam_cat.c bam_sort.c examples kstring.c sample.c
bam_color.c bam_stat.c faidx.c kstring.h sample.h
bam_endian.h bamtk.c faidx.h Makefile samtools.1
bam.h bam_tview.c INSTALL Makefile.mingw sam_view.c
bam_import.c bcftools kaln.c misc win32
bam_index.c bedidx.c kaln.h NEWS
bam_lpileup.c bgzf.c khash.h phase.c
We can see what installation steps they recommend: $ cat INSTALL
And follow their directions to compile from source: $ make
Then copy the resulting binary to a location on your path: $ sudo cp samtools /usr/bin
or $ sudo cp samtools /usr/local/bin
We can see the contents of the PATH variable by typing: $ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/core_perl
So this system contains both /usr/local/bin and /usr/bin, amongst others. We can check that this installation was successful: $ samtools
Program: samtools (Tools for alignments in the SAM format)
Version: 0.1.17 (r973:277)
Usage: samtools <command> [options]
Command: view SAM<->BAM conversion
sort sort alignment file
mpileup multi-way pileup
depth compute the depth
faidx index/extract FASTA
tview text alignment viewer
index index alignment
idxstats BAM index stats (r595 or later)
fixmate fix mate information
flagstat simple stats
calmd recalculate MD/NM tags and '=' bases
merge merge sorted alignments
rmdup remove PCR duplicates
reheader replace BAM header
cat concatenate BAMs
targetcut cut fosmid regions (for fosmid pool only)
phase phase heterozygotes
pysam¶If you have easy_install on your computer, installing python packages is a snap. Simply type: $ sudo easy_install -U pysam
If this is not the case, we need to get the source from the developers and do it ourself. Browse to the pysam downloads page and select the latest release, currently pysam-0.6.tar.gz. If you wish, you can download the file directly. Save this file to some convenient location on the hard drive. In the terminal, browse to this location by typing: $ cd convenient/location
Then unpack the download with tar by typing: $ tar xzvf pysam-0.6.tar.gz
This will create a directory named pysam-0.6, which we can enter by typing: $ cd pysam-0.6
Type ls to see what this folder contains: $ ls
COPYING ez_setup.py INSTALL KNOWN_BUGS MANIFEST.in PKG-INFO pysam pysam.egg-info samtools setup.cfg setup.py tabix tests THANKS
You can see what the installation instructions are by typing: $ cat INSTALL
We will follow their instructions by compiling: $ python setup.py build
Then installing: $ sudo python setup.py install
We can verify this installation was successful by heading to the home folder and importing pysam into a python interactive session: $ cd ~
$ python
Python 2.7.3 (default, Apr 24 2012, 00:00:54)
[GCC 4.7.0 20120414 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysam
>>> pysam
<module 'pysam' from 'pysam/__init__.py'>
>>> pysam.__version__
'0.6'
>>>exit()
This means python can find pysam and that its ready to be used by Xpression. Alternatives¶Xpression Virtual Environment¶For those without a UNIX-like environment or from a non-technical background, we have provided a complete Linux environment that can be installed using freely-available software via a point-and-click process. To use, first download and install software such as VirtualBox and follow their installation wizard. This software creates a virtual machine within the computer that can run images of any other system. Then download Xpression VE and follow Xpression Virtual Environment for instruction. Amazon Web Services – the Cloud¶In the case of limited local resources, or for users wanting greater power or flexibility in their computing, an Amazon machine image is available at https://aws.amazon.com/amis/xpression-rna-seq-pipeline. This resource is currently not graphical, and must be accessed via the commandline. It contains the software used by Xpression as well as the latest version of Xpression itself, via mercurial. It is built directly on the Amazon Linux image, which is maintained and updated by the Amazon team to keep it secure and safe. Glossary:¶
| ||||||