Pittsburgh Supercomputing Center 

Advancing the state-of-the-art in high-performance computing,
communications and data analytics.

Picard

Picard comprises Java-based command-line utilities that manipulate SAM files, and a Java API (SAM-JDK) for creating new programs that read and write SAM files. Both SAM text format and SAM binary (BAM) format are supported.

Installed on blacklight and biou.

Other resources that may be helpful include:

Running Picard

On blacklight

The Picard program is available for use through the module command. To load the Picard module enter:

module load picard-tools

The picard command jar files will be found in the directory$PICARD_TOOLS_HOME

On biou

The Picard programs are availiable through the Galaxy instance on biou.

To make the Picard programs availiable through the command line, csh users should enter the following command:

source /packages/bin/SETUP_BIO_SOFTWARE

To make the Picard programs availiable through the command line, bash users should enter the following command:

source /packages/bin/SETUP_BIO_SOFTWARE

Usage

Picard Commands can be invoked as follows:

java jvm-args -jar PicardCommand.jar      OPTION1=value1 OPTION2=value2...

To see the command line arguments for an individual Picard command:

java jvm-args -jar PicardCommand.jar --help

For example, to see the command line arguments for the Picard AddOrReplaceReadGroups command on blacklight enter:

java -XX:ParallelGCThreads=1 -jar   $PICARD_TOOLS_HOME/AddOrReplaceReadGroups.jar

Picard Commands:

The following commands are availiable in the Picard package:

  • AddOrReplaceReadGroups
  • BamIndexStats
  • BamToBfq
  • BuildBamIndex
  • CalculateHsMetrics
  • CheckIlluminaDirectory
  • CleanSam
  • CollectAlignmentSummaryMetrics
  • CollectGcBiasMetrics
  • CollectInsertSizeMetrics
  • CollectMultipleMetrics
  • CollectRnaSeqMetrics
  • CollectTargetedPcrMetrics
  • CompareSAMs
  • CreateSequenceDictionary
  • DownsampleSam
  • EstimateLibraryComplexity
  • ExtractIlluminaBarcodes
  • ExtractSequences
  • FastqToSam FilterSamReads
  • FixMateInformation
  • IlluminaBasecallsToFastq
  • IlluminaBasecallsToSam
  • IntervalListTools
  • MakeSitesOnlyVcf
  • MarkDuplicates
  • MarkIlluminaAdapters
  • MeanQualityByCycle
  • MergeBamAlignment
  • MergeSamFiles
  • MergeVcfs
  • NormalizeFasta
  • QualityScoreDistribution
  • ReorderSam
  • ReplaceSamHeader
  • RevertSam
  • SamFormatConverter
  • SamToFastq
  • SortSam
  • SplitVcfs
  • ValidateSamFile
  • VcfFormatConverter
  • ViewSam Building

 

Example PBS script (blacklight) running SamFormatConverter and SortSam

#!/bin/bash
#PBS -q batch
#PBS -j oe
#PBS -l ncpus=16
#PBS -l walltime=24:00:00
#PBS -N PicardExample 
#
# ---------------
# Bowtie Setup
# ---------------
source /usr/share/modules/init/bash
module load picard-tools/1.48
module load java
#
set -x
################################################################
# WORKDIR: Location where input files are and location where 
# output files are placed. 
# 
# SAMFILE: (input) Points to the samfile to be converted to 
# bam format 
# 
# BAMFILE: (output) The bamfile (converted from original 
# samfile) 
# 
# SORTEDBAMFILE: (output) The sorted bamfile 
################################################################
WORKDIR=/brashear/$USER/WORKDIR
SAMFILE=Bowtie.sam
BAMFILE=BowtieP.bam
SORTEDBAMFILE=BowtieP.sort.bam
# --------------------------------------------------------
# Run picard SamFormatConverter.jar on original SAM file
# --------------------------------------------------------
cd $WORKDIR
ja $SCRATCH/$$.0
java -XX:ParallelGCThreads=1 -Xmx100G \
    -jar $PICARD_TOOLS_HOME/SamFormatConverter.jar \
    INPUT=$SAMFILE OUTPUT=$BAMFILE TMP_DIR=$SCRATCH_RAMDISK \
    MAX_RECORDS_IN_RAM=50000000
ja -set $SCRATCH/$$.0
# -------------------------------------
# Run picard SortSam.jar on BAM file
# -------------------------------------
ja $SCRATCH/$$.1
java -XX:ParallelGCThreads=1 -Xmx100G \
    -jar $PICARD_TOOLS_HOME/SortSam.jar \
    SORT_ORDER=coordinate \
    INPUT=$BAMFILE OUTPUT=$SORTEDBAMFILE TMP_DIR=$SCRATCH_RAMDISK
ja -set $SCRATCH/$$.1