rrwick / Polypolish

a short-read polishing tool for long-read assemblies
GNU General Public License v3.0
146 stars 10 forks source link

Feature request: Set no/low coverage regions of short reads to N #24

Open gwl2 opened 3 months ago

gwl2 commented 3 months ago

Feature request An option that when polishing an assembly with short reads, all bases of an assembly that are not covered by at least X (user supplied parameter) reads are set to N, indicating that this part was not polished with short reads.

Why? When users polish long read assemblies with short reads, they tend to believe that the new consensus is always better than the original assembly across the whole genome. However, it may well be the case that there are parts of the assembly that were not covered by the short reads. In these regions, it's not known whether there are (short read) resolvable errors or not. So if you need single nucleotide accuracy in this region, you should be aware of this fact and be extra careful.

rrwick commented 3 months ago

That's a good point, so thanks for that suggestion.

I don't think I'll build this feature into Polypolish itself, but it could be implemented in a separate script using Polypolish's debug output table. That table shows the depth (using Polypolish's fractional depth for multi-mapped reads) for each position in the assembly. Also, the status column will contain low_depth if that depth is below Polypolish's --min_depth threshold.

So a script could be made to:

You're of course welcome to code this up yourself! If you'd rather I do it, I can add it to my to-do-at-some-point list, but I can't make any promises about when it will be ready :smile: