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

This page was last updated on Wednesday, 25-Apr-2018 12:22:14 CDT

Installation notes for the GATK 2 version 2.5-2

Home Page

Prerequisites

java

Installation V.4.x

  1. Create an account on gatk web site http://www.broadinstitute.org/gatk/index.php
  2. Download manually to /programinstallers
  3. $ ver="4.0.3.0"
  4. $ cd /usr/local/bin/
  5. $ unzip /programinstallers/gatk-$ver.zip
  6. Make a version-independent symlink
    $ ln -s gatk-$ver GenomeAnalysisTK
  7. Add to default PATH
    $ sudo nano /etc/profile

    PATH="$PATH:/usr/local/bin/GenomeAnalysisTK"

Installation V.3.x

  1. Create an account on gatk web site http://www.broadinstitute.org/gatk/index.php
  2. Download manually to /programinstallers
  3. $ ver="2.5-2"; hex="gf57256b"
    Or if installing the nightly build, file name looks like GenomeAnalysisTK-nightly-2014-04-14-g744780d.tar.bz2
    Get the file name from https://www.broadinstitute.org/gatk/nightly
    $ ver="nightly-2014-04-14"; hex="-g744780d"
  4. $ cd /usr/local/bin/
  5. Warning - version 3.1-1 is a tar bomb. Add this step:
    $ mkdir GenomeAnalysisTK-$ver && cd GenomeAnalysisTK-$ver
  6. $ tar -jxvf /programinstallers/GenomeAnalysisTK-$ver$hex.tar.bz2
    GenomeAnalysisTK-2.5-2-gf57256b/
    GenomeAnalysisTK-2.5-2-gf57256b/resources/
    GenomeAnalysisTK-2.5-2-gf57256b/GenomeAnalysisTK.jar
    GenomeAnalysisTK-2.5-2-gf57256b/resources/CheckPileup.java
    GenomeAnalysisTK-2.5-2-gf57256b/resources/CountLoci.java
    GenomeAnalysisTK-2.5-2-gf57256b/resources/CountReads.java
    GenomeAnalysisTK-2.5-2-gf57256b/resources/Pileup.java
    GenomeAnalysisTK-2.5-2-gf57256b/resources/PrintReads.java
    GenomeAnalysisTK-2.5-2-gf57256b/resources/exampleBAM.bam
    GenomeAnalysisTK-2.5-2-gf57256b/resources/exampleBAM.bam.bai
    GenomeAnalysisTK-2.5-2-gf57256b/resources/exampleFASTA.dict
    GenomeAnalysisTK-2.5-2-gf57256b/resources/exampleFASTA.fasta
    GenomeAnalysisTK-2.5-2-gf57256b/resources/exampleFASTA.fasta.fai
  7. $ cd ..
  8. Make a version-independent symlink
    $ ln -s GenomeAnalysisTK-$ver$hex GenomeAnalysisTK
  9. Test as described at http://gatkforums.broadinstitute.org/discussion/1200/how-to-test-your-gatk-installation
    $ java -jar GenomeAnalysisTK/GenomeAnalysisTK.jar --help
  10. Make a wrapper for convenience
    #!/bin/bash
    # memory for Java in gigabytes
    defaultjmem=4
    jmem=$defaultjmem
    if [[ $1 =~ ^[0-9]+$ ]] ; then
      jmem=$1
      shift
      echo "Will allocate $jmem gigabytes of memory for GATK"
    fi
    if [[ "$1" == "" ]]; then
      echo "This is a Java wrapper for GATK"
      echo "Pass in the required parameters"
      echo "e.g. gatk -T LiftoverVariants ..."
      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. gatk 16 -T LiftoverVariants ..."
      exit 1
    else
      java -Xmx${jmem}g -jar /usr/local/bin/GenomeAnalysisTK/GenomeAnalysisTK.jar "$@"
      r=$?; if [ $r != 0 ]; then echo "Picard returned error code $r"; fi
      exit $r
    fi
  11. $ chmod +x gatk