Install Picard tools in Linux

From BITS wiki
Jump to: navigation, search
Go back to parent page Introduction to Linux for bioinformatics

Picard tools

Picard comprises Java-based command-line utilities that manipulate SAM files, used for all kinds of HTS sequencing studies. Picard is one .jar file, which can be executed by JAVA. We will go through the steps to install and run Picard tools.

Download

Download the latest version of Picard from http://broadinstitute.github.io/picard/.

Download picard.jpg

While downloading picard-tools-2.2.1.zip, go back to http://broadinstitute.github.io/picard/ to read the 'Quick Start' .

Unpack the archive

In the ~/Downloads folder, unpack the .zip file.

Unpack picard zip.jpg

In the unpacked folder, you will find picard.jar.

Contents picard zip.jpg

Check whether the right version of JAVA is present

$ java -version

Java version check 1.7.jpg

For the latest Picard tools, you need JAVA version 1.8.x (where x is any number). You can try to run with another version, but you will get errors.


Install JAVA 1.8 if necessary

In case you have the wrong JAVA version, you need to install the correct one. Installing JAVA manually is NOT advised.

Googling for 'linux install java 8' gives some leads. For example, this PPA. Install now JAVA 8 from this PPA. The instructions are under the link.

Tip Webupd8.org is a trusted source.

Test run the picard tools

Open the terminal in de Picard-tools directory.

$ java -jar picard.jar

Run picard tools.jpg

Looks good! Congratulations.

Advanced: efficiently using the Picard tools

Only if you have time left!

To efficiently use this tool in your analyses,

  1. move picard-tools-2.2.1/ to your ~/bin folder.
  2. make a symbolic link in ~/bin to the picard-tools-2.2.1 and name it picard-tools

Picard in bin.jpg

  1. create an environmental variable 'PICARD' that stores '~/bin/picard-tools/picard.jar (see later in the training)
$ PICARD='/home/joachim/bin/picard-tools/picard.jar'
  1. make aliases in the file .bashrc (see later in the training)
$ alias picard="java -jar $PICARD"
  1. Ready to run!

File:Picard run.jpg




Go back to parent page Introduction to Linux for bioinformatics