Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering alignments: -F in which format? #211

Closed
damianosmel opened this issue Sep 27, 2023 · 1 comment
Closed

Filtering alignments: -F in which format? #211

damianosmel opened this issue Sep 27, 2023 · 1 comment

Comments

@damianosmel
Copy link

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

@damianosmel damianosmel changed the title Filtering reads: -F in which format? Filtering alignments: -F in which format? Sep 27, 2023
@brentp
Copy link
Owner

brentp commented Sep 27, 2023

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

@brentp brentp closed this as completed Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants