|
From: Peter <pe...@ma...> - 2011-02-28 11:59:41
|
On Mon, Feb 28, 2011 at 7:50 AM, Praveen Raj <pra...@gm...> wrote: > Just wanted to know how to provide multiple flags at same time to filter out > reads from BAM when using "samtools view" command? For Eg: If I want to > apply(extract) reads based on two flags (say "-f 0x02" and "-f 0x08") from > BAM, what should be the appropriate way to do this? It seems repeating "-f" > with each flag in command-line doesnot help. > Any advice on this would be great help. > Praveen Raj I've never tried, but in that case try combining the desired flags, 0x02 plus/or 0x08 is 0x0A (in binary, 2+8=10), so I'd expect -f 0x0A will do what you want. Peter |