How do you remove reads from .bam file with FLAG = 0?
1
0
Entering edit mode
6.9 years ago
josolvason • 0

I have used the following command to remove alignments with FLAG = 16 from sam file

samtools view -h -F 16 in.bam out.sam

This command does not remove bits with 0...

samtools view -h -F 0 in.bam out.sam

Thoughs??

samtools • 2.1k views
ADD COMMENT
0
Entering edit mode
6.9 years ago
josolvason • 0

Nevermind. After looking at this page I know the identity of 0 and 16 FLAGs are unpaired but mapping reads. You can remove them by this command:

samtools view -h -f 1 in.bam out.sam

ADD COMMENT

Login before adding your answer.

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