This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bwa Mismatches And Seed Length

Hello, I am setting up BWA to align my reads and want to allow a reasonable number of mismatches, without compromising the alignment quality. My ultimate goal is to identify SNPs. I have started by running BWA with the default parameters: bwa aln genome.fa *.fastq > *.sai My question is: what's the most appropriate mismatch/max diff value(s) (-n, -k?) in this case? Another thing, my reads are 75bp paired-end. Do I have to input any parameter to indicate this? I have tediously tried to find examples in publications and forums, including the BWA manual, but there isn't much out there. Help will be appreciated. G.

bwa

2 answers

Maybe you already know but doing paired-end alignment you should do something like this

[prompt]$ bwa aln hg19.fa forward.fastq > forward.sai
[prompt]$ bwa aln hg19.fa reverse.fastq >reverse.sai
[prompt]$ bwa sampe hg19.fa forward.sai reverse.sai forward.fastq reverse.fastq > my_alignment.sam

Where "sampe" stands for sam paired-end.

You might benefit from reading Heng Li's presentation on BWA alignment and look what he has to say about BWA and SNP calling or reading Workflow Or Tutorial For Snp Calling?.

I think you should use the default values for most of the BWA parameters. They are already tested and most of the people use the default values. The maximum edit distance or mismatches allowed in a read is automatically decided depending on the read length. so you may not have to worry about that.

This is useful. Thanks!

Log in to answer this question.