I have to filter the raw sequencing reads based on the following criteria:
Remove reads containing adapters
Remove reads containing N > 10% (N represents base that could not be determined)
Remove reads where the Qscore (Quality value) of over 50% bases of the read is <= 5
The reads are paired-end fastq files. I have been able to do the first part by using trimmomatic:
trimmomatic \ PE in_1.fq.gz in_2.fq.gz \ pair_out_1 unpair_out_1 pair_out_2 unpair_out_2 \ ILLUMINACLIP:adapter.fa:2:30:5
The other 2 steps are a bit more challenging since I have not found a tool that perform exactly what is required. I could write some custom code of course but I would like to use the existing tools if possible. No need to reinvent the wheel.
Do you have any suggestions on how to proceed?