samtools view manual
1
0
Entering edit mode
5.7 years ago
doramora ▴ 10

Hi! Could you please explain me the differense between -f and -F in samtools view while filtering bam file?

sequence • 2.1k views
ADD COMMENT
0
Entering edit mode

What is unclear based on the entry in the manual?

-f INT
Only output alignments with all bits set in INT present in the FLAG field. INT can be specified in hex by beginning with `0x' (i.e. /^0x[0-9A-F]+/) or in octal by beginning with `0' (i.e. /^0[0-7]+/) [0].

-F INT
Do not output alignments with any bits set in INT present in the FLAG field. INT can be specified in hex by beginning with `0x' (i.e. /^0x[0-9A-F]+/) or in octal by beginning with `0' (i.e. /^0[0-7]+/) [0].
ADD REPLY
0
Entering edit mode
5.7 years ago
Morris_Chair ▴ 370

Hi doramora, those are samtools options,

-f (required flag) -F (filtering flag)

Let say that you want to count all entries mapping to the positive strand, you can use this called "flag", -F 16 where you are filtering the reverse strand.

In this website as well as many others more, you can find a specific number based on what you require or filtering

https://www.samformat.info/sam-format-flag

all the best :)

ADD COMMENT
0
Entering edit mode

thank you for the website! i have found, that i've got 4 Flag, but i still can't understand, where do i need to use -f

ADD REPLY
1
Entering edit mode

it depends on what you want to use or not, for example "do this" -f or "don't do this" -F , followed by the number which describes the action

I hope that is clear

ADD REPLY
0
Entering edit mode

It is clear! Thank you a lot! My mind feels better)

ADD REPLY

Login before adding your answer.

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