Hi!

Do you know how can I filter out supplementary alignments from a bam file? I was reviewing http://broadinstitute.github.io/picard/explain-flags.html and I am aware that the flag for this kind of alignments is "2048". However, depending on another features (ex: paired read, second in pair, etc), the flag can vary.

So, I am not sure about how can I filter out this kind of alignments.
the SAM flag is a bit array  https://en.wikipedia.org/wiki/Bit_array . Filtering with `samtools view -F` or `samtools view -f` uses Bit Wise operations https://en.wikipedia.org/wiki/Bitwise_operation so the other bits don't have any consequence on the filtering.