brentp / mosdepth

fast BAM/CRAM depth calculation for WGS, exome, or targeted sequencing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Filtering alignments: -F in which format?

damianosmel opened this issue · comments

Dear Brent,
first thank you for creating and releasing mosdepth!

I am using mosdepth to do read coverage calculation.
For example:
mosdepth -F 1796 -x -t 4 --by assays/some_assay.bed prefix_filter_1796_no_q aligments/some_sample.bam

And coupled it with samtools view -F, to do sub-sampling.

Therefore, I want to make sure in which format (hex, octal, demical) the default filtering flag of mosdept is in.
I quote the respective part of the samtools view manual for -F:
"FLAG can be specified in hex by beginning with 0x' (i.e. /^0x[0-9A-F]+/), in octal by beginning with 0' (i.e. /^0[0-7]+/), as a decimal number not beginning with '0' or as a comma-separated list of flag names. "

My question initiate as the 1796 and the 0x1796 would result to different subflags in the respective page.

Thanks in advance,
Damianos

You should specify it as the decimal value. Then you don't need to worry about if your shell or python is interpreting it before.
You can see the for example what 1796 would filter here: https://broadinstitute.github.io/picard/explain-flags.html