Presentation is loading. Please wait.

Presentation is loading. Please wait.

Short Read Workshop Day 5: Mapping and Visualization Video 3 Introduction to BWA.

Similar presentations


Presentation on theme: "Short Read Workshop Day 5: Mapping and Visualization Video 3 Introduction to BWA."— Presentation transcript:

1 Short Read Workshop Day 5: Mapping and Visualization Video 3 Introduction to BWA

2 Burrows-Wheeler Alignment Tool (BWA) BWA consists of 3 algorithms BWA-backtrack (aka BWA aln) (<100bp reads) BWA-SW (Smith-Waterman) BWA-MEM (70bp – 1Mb reads) BWA-MEM also has better performance than BWA-backtrack for 70-100bp reads http://bio-bwa.sourceforge.net/ BWA is a software package for mapping low-divergent sequences against a large reference genome Performs gapped, local alignments We like BWA for mapping paired-read data Can align both nucleotide and color space reads

3 Aligning with BWA aln BWA aln designed for “short” <100bp reads 2-step process: map with aln, finalize with either SAMPE or SAMSE 1.) Find the SA coordinates of the input reads 2.) Convert sai to sam file BWA aln BWA samse BWA sampe Out.sai Out.sam Step 1Step 2

4 Step 1.) BWA aln -o Max number of gap opens (default 1) -O Gap open penalty Read: ATGCA-CTAGCTAGCTAGCTAGCT |||||||||||||||||||||||| Genome: ATGCAGCTAGCTAGCTAGCTAGCT BWA alnOut.sai

5 Step 1.) BWA aln -o Max number of gap opens (default 1) -O Gap open penalty -e Gap extension -E Gap extension penalty -k Maximum edits i.e. gaps, mismatches in the seed -l specifies seed length Read: ATGCA--TAGCTAGCTAGCTAGCT |||||||||||||||||||||||| Genome: ATGCAGCTAGCTAGCTAGCTAGCT BWA alnOut.sai

6 Step 1.) BWA aln Command Options Index Name Reads.fq $ bwa aln index reads.fq > out.sai 2> bwa-out.stderr Most basic, default setting run of BWA $ bwa aln index fwd_reads.fq > fwd_out.sai 2> bwa_fwd_out.stderr Most basic, default setting run of BWA paired reads $ bwa aln index rev_reads.fq > rev_out.sai 2> bwa_rev_out.stderr

7 Step 2.) BWA samse BWA samse BWA sampe Out.sai Out.sam CommandIndex Name Reads.fqOut.saiSAM File Name -n adds an XA tag in SAM file noting how many other hits found for read SAM Header $ bwa samse –n 3 –f out.sam index out.sai reads.fq

8 Step 2.) BWA sampe BWA sampe Fwd_Out.sai Rev_Out.sai Out.sam CommandIndex Name Reads.fqOut.sai Options -n max hits to output per pair [3] -a max insert length [500] -f specify SAM file name $ bwa sampe index fwd_out.sai rev_out.sai fwd_reads.fq rev_reads.fq > out.sam

9 BWA-MEM

10 For each alignment, BWA calculates a mapping quality score, which is the Phred- scaled probability of the alignment being incorrect assuming the true hit can always be found. Simulation reveals that BWA may overestimate mapping quality due to this modification, but the deviation is relatively small.


Download ppt "Short Read Workshop Day 5: Mapping and Visualization Video 3 Introduction to BWA."

Similar presentations


Ads by Google