bwa report multiple alignments
1
0
Entering edit mode
10.3 years ago
Adrian Pelin ★ 2.6k

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 • 6.4k views
ADD COMMENT
0
Entering edit mode
10.3 years ago
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

ADD COMMENT
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 2497 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6