Pittsburgh Supercomputing Center 

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

BWA

BWA 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, biou

Other resources that may be helpful include:

  • Li H and R Durbin, Fast and accurate short read alignment with Burrows-Wheeler Transform. Bioinformatics, 25:1754-60 (2009). [PMID: 19451168]
  • H Li H and R Durbin, Fast and accurate long-read alignment with Burrows-Wheeler Transform.Bioinformatics, Epub. (2010). [PMID: 20080505]
  • Website: http://bio-bwa.sourceforge.net/

Running BWA

On blacklight:

The BWA program is made availiable for use through the module command. To load the BWA module enter:

module load bwa

On biou:

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

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

source /packages/bin/SETUP_BIO_SOFTWARE

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

source /packages/bin/SETUP_BIO_SOFTWARE

Usage

  • First, index the fasta formatted reference sequence:
    bwa index -a bwtsw ref.fa
  • Search reference with single (i.e. non paired-end) reads and create SAM file (using 16 threads):
    bwa aln -t 16 ref.fa one.fq > single.sai
    bwa samse -P ref.fa single.sai one.fq > aln-se.sam
  • Search reference with paired-end reads (using 16 threads):
    bwa aln -t 16 ref.fa one.fq > pe_one.sai
    bwa aln -t 16 ref.fa two.fq > pe_two.sai
    bwa sampe -P ref.fa pe_one.sai pe_two.sai one.fq two.fq > aln-pe.sam

Invoking BWA commands

BWA Commands can be invoked as follows:

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

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

java jvm-args -jar BWACommand.jar --help

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

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

Available BWA commands

The following commands are available in the BWA package:

  • AddOrReplaceReadGroups
  • BamIndexStats
  • BamToBfq
  • BuildBamIndex
  • Building
  • 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