Bwa Bwasw: How To Print Only The Reads Aligned With The Reference Sequence
1
2
Entering edit mode
12.1 years ago
Cristina ▴ 40

Hi,

BWA usually reports one line for each read even when the read don't mapped the reference sequence.

There are some way to print in the sam file only the alignment when the read are aligned with the reference sequence?

Thanks in advance

Cris

bwa alignment • 2.2k views
ADD COMMENT
6
Entering edit mode
12.1 years ago

samtools view -F 4 your.bam

This is directly from the manual of Samtools. I recommend reading all the options. It tried to avoid it, but really knowing Samtools is worth the time!

ADD COMMENT

Login before adding your answer.

Traffic: 1441 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