How to not align reverse complementary reads?
2
0
Entering edit mode
4 months ago
dcheng1 • 0

My reference fasta file contains both sense and antisense sequence separately.

I use bwa mem as aligner, and it seems it will map the same read to both sense and antisense reference, and mapq will become 0 even if it's a perfect match.

So my questions is: is it possible to not align reverse compelmentary reads?

alignment bwa bowtie • 328 views
1
Entering edit mode
4 months ago
liorglic ▴ 870

I don't think this is possible with BWA. Why don't you just remove the antisense sequence from your fasta? You can then map to the sense sequence, and the strand information will be stored as flag 16 in your output SAM, so you can always use that if this is relevant. For example, if you only want the reads from the sense strand, you can use: samtools view -f 16 your.sam.

0
Entering edit mode
4 months ago
ATpoint 60k

Basically the same as @liorglic says, remove the RCs prior to building the index. The convention for fasta files for genomic references (as far as I know) is to write the top-strand sequence in 5'->3' orientation. The aligner will then take care of the reverse complementing if a read aligns better to it. If you leave the RCs in you will have every read being a multimapper.