Carrot root and DNA VCRU Bioinformatics USDA ARS Vegetable Crops Research Unit

This page was last updated on Friday, 11-Nov-2016 09:52:47 CST

Installation notes for Picard version 2.7.1

Home Page

Prerequisites

java

Installation version 2.x

  1. $ ver="2.7.1"
  2. $ cd /usr/local/bin/
  3. $ wget -N https://github.com/broadinstitute/picard/releases/download/$ver/picard.jar
  4. Make a version-independent symlink. If upgrading, delete the old one first
  5. Make a wrapper program
    $ nano /usr/local/bin/picard
    #!/bin/bash
    # memory for Java in gigabytes
    defaultjmem=8
    jmem=$defaultjmem
    if [[ $1 =~ ^[0-9]+$ ]] ; then
      jmem=$1
      shift
      echo "Will allocate $jmem gigabytes of memory for Picard"
    fi
    if [[ "$1" == "" ]]; then
      echo "This is a Java wrapper for Picard programs"
      echo "Pass in the name of the picard program to run, followed by any parameters"
      echo "e.g. picard BamIndexStats INPUT=bogus.bam"
      echo "Default memory allocation is $defaultjmem gigabytes"
      echo "To specify an alternate amount, e.g. 16 gigabytes, pass in \"16\" before any other parameters"
      echo "e.g. picard 16 BamIndexStats INPUT=bogus.bam"
      exit 1
    else
      program=$1
      shift
      java -Xmx${jmem}g -jar /usr/local/bin/picard.jar $program $@
      r=$?; if [ $r != 0 ]; then echo "Picard returned error code $r"; fi
      exit $r
    fi

Installation version 1.x

  1. $ ver="1.127"
  2. $ cd /programinstallers/
  3. $ wget -N https://github.com/broadinstitute/picard/releases/download/$ver/picard-tools-$ver.zip
  4. $ cd /usr/local/bin
  5. $ unzip /programinstallers/picard-tools-$ver.zip
    If upgrading, will replace one file
    ...
      inflating: picard-tools-1.92/snappy-java-1.0.3-rc3.jar
      inflating: picard-tools-1.92/tribble-1.92.jar
      inflating: picard-tools-1.92/variant-1.92.jar
    replace snappy-java-1.0.3-rc3.jar? [y]es, [n]o, [A]ll, [N]one, [r]ename:
    y
      inflating: snappy-java-1.0.3-rc3.jar
  6. Make a version-independent symlink. If upgrading, delete the old one first
    $ rm picard-tools
  7. $ ln -s picard-tools-$ver picard-tools
  8. Make a wrapper program
    $ nano /usr/local/bin/picard
    #!/bin/bash
    # memory for Java in gigabytes
    defaultjmem=8
    jmem=$defaultjmem
    if [[ $1 =~ ^[0-9]+$ ]] ; then
      jmem=$1
      shift
      echo "Will allocate $jmem gigabytes of memory for Picard"
    fi
    if [[ "$1" == "" ]]; then
      echo "This is a Java wrapper for Picard programs"
      echo "Pass in the name of the picard program to run, followed by any parameters"
      echo "e.g. picard BamIndexStats INPUT=bogus.bam"
      echo "Default memory allocation is $defaultjmem gigabytes"
      echo "To specify an alternate amount, e.g. 16 gigabytes, pass in \"16\" before any other parameters"
      echo "e.g. picard 16 BamIndexStats INPUT=bogus.bam"
      exit 1
    else
      program=$1
      shift
      java -Xmx${jmem}g -jar /usr/local/bin/picard-tools/picard.jar $program $@
      r=$?; if [ $r != 0 ]; then echo "Picard returned error code $r"; fi
      exit $r
    fi