What does samflag 1028 mean?
1
1
Entering edit mode
3.9 years ago
junnna ▴ 10

Hi,
On sam flags explained, the flag 1028 corresponds to "read unmapped" and "read is PCR or optical duplicate".
https://broadinstitute.github.io/picard/explain-flags.html
If I run samtools view -F 1028 input.bam > output.bam
Will output.bam contain reads which are only "read unmapped" and "read is PCR or optical duplicate" or no reads that are "read unmapped" and "read is PCR or optical duplicate"?
Thanks!

samtools • 1.1k views
ADD COMMENT
1
Entering edit mode

Hi, @Junnna! As @Najoshi has already answered this command won't output what you asked. Be carefull with words "not"/"any"/"all" in -f and -F descriptions. Check also -G option as it may be of interest.

Good luck!

ADD REPLY
3
Entering edit mode
3.9 years ago
najoshi ▴ 30

From the samtools manual:

-F INT Do not output alignments with any bits set in INT present in the FLAG field.

So this means that any read that has the bit set (i.e. has a check in explain flags) will NOT be output. Therefore, your command will not output any of the unmapped or duplicate marked reads, and will output everything else.

ADD COMMENT

Login before adding your answer.

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