I appreciate the effort to answer, but copy-pasting from the software docs (which I've linked in my question) is not very helpful. If you look above, I've already tried all these options and they do not behave the way I expected.
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?
1 answer
From the fastp github README.md
Adapter trimming is enabled by default, but you can disable it by
-Aor--disable_adapter_trimming.Adapter sequences can be automatically detected for both PE/SE data.
You can also specify --adapter_fasta to give a FASTA file to tell fastp to trim multiple adapters in this FASTA file. Here is a sample of such adapter FASTA file:
>Illumina TruSeq Adapter Read 1
AGATCGGAAGAGCACACGTCTGAACTCCAGTCA
>Illumina TruSeq Adapter Read 2
AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT
>polyA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Thanks for the catty response. For what its worth I didn't and still don't see that you've tried --disable_adapter_trimming.
--disable_adapter_trimming is equivalent to -A (I've now edited the original question to make this clear). This disables adapter trimming altogether, and thus does not do what I want. In any case, I gave up fastp and switched to pandaseq, which features the behavior I required.
Log in to answer this question.
Not a
fastpuser but look for an option where you could provide a file with adapters. You certainly can withbbduk.shwithref=file.faoption.Thanks, just tried it. However, it seems like fastp behaves exactly the same using
--adapter_sequence+--adapter_sequence_r2and--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.