exclude bam flag rather than include ?
af8 opened this issue · comments
Hi,
If I am not wrong the -F
flag in d4tools create
is inclusive, meaning that you specify the bits you absolutely want to be set in the flag. Even though this could be useful, it seems to me that to create a d4 file you rather want to exclude some reads . For instance, create a D4 file with everything except reads marked as duplicates, supplementary or QC failed.
Would it be possible either to :
- add another option to exclude reads based on flag
- or invert the behavior of the existing one
?
As an example, I have seen both options implemented in tools like samtools
or mosdepth
.
Anthony
Thanks for the suggestion. I think we will introduce this in the next release!
Hi, just let you know we've released the new version of d4tools with this feature supported.
For example, you can now use the following option to filter all reads with proper pair flag but no QC failed flag.
d4tools create input.bam -F ~512,+2
Thanks!
Thank you very much !