cutadapt icon indicating copy to clipboard operation
cutadapt copied to clipboard

Small ONT optimization: length filtering before applying trimming

Open rhpvorderman opened this issue 1 year ago • 1 comments
trafficstars

For illumina reads that are always 151 bp it makes sense to trim the adapter first, apply quality trimming, and only after that do length and quality filtering.

On nanopore however, this means that with a length filter of say 500 bp, a certain amount of reads get the expensive adapter trimming applied first while they were never able to pass the length filter in the first place. A read of length 400 bp will never pass the length filter, even after adapter trimming. Therefore applying a very cheap length filter at the beginning of the pipeline can lead to better performance.

rhpvorderman avatar Nov 29 '23 09:11 rhpvorderman

Good idea, but I’ll need to think about how to do this the best way. Because the adapter trimming statistics would change, it is a backwards-incompatible change.

marcelm avatar Dec 04 '23 12:12 marcelm