rust-bio / rust-bio-tools

A set of command line utilities based on Rust-Bio.
MIT License
182 stars 24 forks source link

feat: Remove duplicate marks from consensus records #247

Closed FelixMoelder closed 2 years ago

FelixMoelder commented 2 years ago

When calculating consensus reads it happens that reads get skipped and directly written into a bam file. As skipped records are expected to be used in downstream analysis it may happen that these reads are marked as duplicates while the remaining duplicates got merged into a consensus read. In that case the marked reads would be ignored by variant callers. To prevent this from happening reads the duplicate-flag will be removed from skipped reads and also the PicardTools specific tags: DI, DS and PG.