I am using fastp for quality trimming, PE read merging and adapter trimming.
However, it behaves unexpectly with regard to adapter trimming - leaving some untrimmed while other reads are over-trimmed.
I suspect that this is related to the automatic adapter detection applied by fastp. I would like to provide fastp with the R1 and R2 adapters and only trim these specific primers. Here the command I used:
fastp -i R1.fq -I R2.fq -o R1_trim.fq -O R2_trim.fq -m --merged_out merge_trim.fq --cut_front --cut_front_window_size 10 --cut_front_mean_quality 30 --cut_tail --cut_tail_window_size 10 --cut_tail_mean_quality 30 --adapter_sequence GAT... --adapter_sequence_r2 TGG...
but when I look at the report, it seems that other sequences are also detected as adapters. I tried adding the --detect_adapter_for_pe
flag or the -A
(--disable_adapter_trimming
) flag, but they do not create the behavior I want.
Any idea how this could be achieved?
Not a
fastp
user but look for an option where you could provide a file with adapters. You certainly can withbbduk.sh
withref=file.fa
option.Thanks, just tried it. However, it seems like fastp behaves exactly the same using
--adapter_sequence
+--adapter_sequence_r2
and--adapter_fasta
. It still autodetects adapters. Maybe I should just switch to another tool like bbduk or trimmomatic...I recommend
bbduk.sh
. Simple to understand options and performant.