Samtools unmapped reads
2
0
Entering edit mode
17 months ago
DNAngel ▴ 250

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?

samtools • 923 views
ADD COMMENT
0
Entering edit mode

Also, why would one want to extract a mapped read with an unmapped pair, if the goal is to use just unmapped reads?

finding structural variants (large DELetions, etc...)

ADD REPLY
0
Entering edit mode

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?

ADD REPLY
0
Entering edit mode
17 months ago

Play introducing these flags values in this page: Explain SAM/BAM flags

And you will all the information you need. It is particularly challenging to handle these flags values.

ADD COMMENT
0
Entering edit mode
17 months ago

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.

ADD COMMENT
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

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