Tuesday, 10 June 2014

BWA: whole genome sequencing

Create the index for the reference genome

bwa index -a bwtsw reference.fa

Usage:   bwa index [-a bwtsw|is] [-c] <in.fasta>

Options: -a STR    BWT construction algorithm: bwtsw or is [auto]
         -p STR    prefix of the index [same as fasta name]
         -6        index files named as <in.fasta>.64.* instead of <in.fasta>.*

Warning: `-a bwtsw' does not work for short genomes, while `-a is' and
         `-a div' do not work not for long genomes. Please choose `-a'
         according to the length of the genome.

Cited from http://gatkforums.broadinstitute.org/discussion/2798/howto-prepare-a-reference-for-use-with-bwa-and-gatk;
http://icb.med.cornell.edu/wiki/index.php/Elementolab/BWA_tutorial


Mapping short reads to the reference genome
bwa mem ref.fa reads.fq > aln-se.sam
bwa mem ref.fa read1.fq read2.fq > aln-pe.sam

Input files can be gz compressed. 

Cited from http://bio-bwa.sourceforge.net/bwa.shtml
 






No comments:

Post a Comment