Why do some recommend using just the -f 4 flag to get unmapped reads from a SAM/BAM file, while others have more elaborate extraction methods such as using a combination of -f 4 -F 264, with -f 8 -F 260, and -f 12 -F 256. What is the difference between just using -f 4 versus three separate steps? Also, why would one want to extract a mapped read with an unmapped pair, if the goal is to use just unmapped reads?
I haven't found a clear explanation for the differences but overall it does seem that majority use just the -f 4 flag alone. But is this best practise?
I should rephrase my question - I understand what the flags mean. What I don't understand is why some people use -f4 -F 264 (so excluding secondary alignments) but others just use -f4 so unmapped secondary alignments are kept. What are the contexts for those?
What is the difference between just using -f 4 versus three separate
steps?
You get different reads, of course. If someone else wanted to get different reads than you want, why is it a surprise that they use different commands to get them? People here can't necessarily tell you why some other person wanted what they wanted.
My question is asking what do these different reads mean in terms of the flags and how to understand what would be best practise. None of these tutorials explain why half utilize one set of flags, and the other uses another. I get they are different but I didn't understand what contexts each one was used. I came here to see if someone had experience with both and knew when/why each one was necessary.
finding structural variants (large DELetions, etc...)
I should rephrase my question - I understand what the flags mean. What I don't understand is why some people use
-f4 -F 264
(so excluding secondary alignments) but others just use-f4
so unmapped secondary alignments are kept. What are the contexts for those?