bwa icon indicating copy to clipboard operation
bwa copied to clipboard

Reads with chastity filter set

Open Poshi opened this issue 3 years ago • 0 comments

When processing Illumina >1.8 reads, the reads are marked as filtered out or not. This is known as chastity filter. Usually, those reads are taken away and not used, but some times they are found in the FastQ files for some reason.

All reads whose chastity filter is 'Y' (which means that they have been filtered out because they don't pass the filter) should have the SAM flag 512 set (which means that "read fails platform/vendor quality checks"). All other reads should have this flag not set.

When using bwa mem to align FastQ files that contains this kind of reads into SAM files, no reads are discarded (as expected) but they are not marked either. They are aligned, included in the output, but the information about the read not passing the vendor filter is wrong.

I know that this is vendor specific, and that the information source can change over time, but with common sources like the Illumina output, this could be implemented somehow (hardcoded, enabled by a command line parameter if you don't want it to be checked always, with a regular expression in a command line parameter...).

Poshi avatar May 04 '21 10:05 Poshi