This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bwa report multiple alignments

Hello,

What parameters should I use if I want bwa to report all possible alignments for every read in the sam file? (i.e. I if a read can align to 2 different regions, it should, and when I calculate coverage I should see genes that are duplicated to have 2x the coverage.)

Adrian

bwa

1 answer

Usage: bwa mem [options] <idxbase> <in1.fq> [in2.fq]

-a         output all alignments for SE or unpaired PE

This is how you output all. Usually you don't use this option, as for reads mapping to multiple positions will BWA set mapping quality to zero.

For example this:

samtools view -q 1

will output reads with mapping quality 1 or more - unique mappings. You may be also interested in other flags:

http://picard.sourceforge.net/explain-flags.html

I was using bwa aln. What will change if I switch to bwa mem? I see it's a different algorithm.

Log in to answer this question.