38 / d4-format

The D4 Quantitative Data Format
MIT License
156 stars 20 forks source link

exclude bam flag rather than include ? #43

Closed af8 closed 2 years ago

af8 commented 2 years ago

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 :

As an example, I have seen both options implemented in tools like samtools or mosdepth.

Anthony

38 commented 2 years ago

Thanks for the suggestion. I think we will introduce this in the next release!

38 commented 2 years ago

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!

af8 commented 2 years ago

Thank you very much !