Hi all, I am very new to all these tools and analysis. I have a bam file and I wanted to eliminate the supplementary alignments but when I use samtools view -b -F 2145 tow.sort.bam > new.bam
The new.bam file is empty. However, if what I do is to select them in a new file:
samtools view -b -f 2145 tow.sort.bam > filtered.bam
The filtered.bam file contains the supplementary aligments I saw in flagstat.
Anyone can tell me why the first command is not working as I expect?
Thanks!