If most of the reads are >70nt then use bwa mem otherwise use bwa aln.
Hello,
My data is 100bpx2 HiSeq PE reads, some PE overlap so I merged them into SE. For my analysis I used the aln algorithm: #bwa aln -t 8 -n 0.1 GDR45_Spades_k85_conc.fasta GDR18_trimmed_SE.fastq > GDR18_0.sai #bwa aln -t 8 -n 0.1 GDR45_Spades_k85_conc.fasta GDR18_trimmed_1.fastq > GDR18_1.sai #bwa aln -t 8 -n 0.1 GDR45_Spades_k85_conc.fasta GDR18_trimmed_2.fastq > GDR18_2.sai #bwa sampe GDR45_Spades_k85_conc.fasta GDR18_1.sai GDR18_2.sai GDR18_trimmed_1.fastq GDR18_trimmed_2.fastq > GDR-18_pe.sam #bwa samse GDR45_Spades_k85_conc.fasta GDR18_0.sai GDR18_trimmed_SE.fastq > GDR-18_se.sam #samtools view -Sb GDR-18_pe.sam > GDR-18_pe.bam #samtools view -Sb GDR-18_se.sam > GDR-18_se.bam #samtools merge GDR-18.bam GDR-18_pe.bam GDR-18_se.bam
Now I am wondering what are the advantages of switching to the bwa mem algoritm? One reason I need to use it is because it has the "-a" option and I would need to look for SVs later on.
So now I would just issue: bwa mem -a -t 8 GDR45_Spades_k85_conc.fasta ../reads/GDR18_trimmed_1.fastq ../reads/GDR18_trimmed_2.fastq > GDR-18_pe.sam bwa mem -a -t 8 GDR45_Spades_k85_conc.fasta ../reads/GDR18_trimmed_SE.fastq > GDR-18_se.sam samtools merge GDR-18.bam GDR-18_pe.bam GDR-18_se.bam
It was pretty important to allow some mismatch in the aln algorithm, so i set -n to 0.1, what would be the equivalent here?
The purpose of this is to find variation in a fairly polymorphic genome (Watterson's Theta 0.0041)
Thanks you,
Adrian
2 answers
Quoting the bwa docs:
For 70bp or longer Illumina, 454, Ion Torrent and Sanger reads, assembly contigs and BAC sequences, BWA-MEM is usually the preferred algorithm.
From the bwa mem paper (Fig 1), bwa mem has better accuracy than bwa sw. Also, bwa mem has easier api to work with, has you have probably noticed.
Hi,
I have reads ranging from 17bp-225bp which i understood after running the "bwa aln" command.
As I have reads which are 70bp & longer, bwa-mem should be used ? As there are reads even less than 70bp length, bwa-aln should be used ? Which is the best option to work with ?
Thanks
Log in to answer this question.