How to specify adaptor file for trimmomatic

Hey there,

I prepare my library using NEB oligos/adaptors, which are based on Illumina’s TruSeq technology. Sequencing is carried out on a NovaSeq 6000. So the default adaptor fasta files provided by Trimmomatic should work fine.

However, in FastQC I noticed that sometimes no adaptors are trimmed. When looking at the KneadData log-file, in those cases the Nextera adaptor file was used by trimmomatic and not the TruSeq file.
Besides that, I noticed that there are two trimmomatic-adaptor directories in the KneadData environment:

  1. /share/trimmomatic-0.39-1/adaptors, containing 6 adaptor files
  2. /lib/python2.7/site-packages/kneaddata/adapters, containing only 2 adaptor files.

Also, there are two trimmomatic executables:

  1. /share/trimmomatic-0.39-1
  2. /bin

Which executable should be specified in the kneaddata command? And how can I specify the adaptor file used by trimmomatic?
Edit. to be more specific, I would like to trimmomatic to use TruSeq3-PE-2.fa

I use KneadData 0.7.4, this is the command:
Find attached the corresponding log file:Novogene_1_PL0182303_1_R1_kneaddata.log.txt (34.6 KB)

$ kneaddata --input /home/plicht/Microbiome_Data/Novogene/Validation_samples_PL018/Raw_Data/X204SC20041115-Z01-F001/raw_data/a1_1/Novogene_1_PL0182303_1_R1.fq.gz --input /home/plicht/Microbiome_Data/Novogene/Validation_samples_PL018/Raw_Data/X204SC20041115-Z01-F001/raw_data/a1_1/Novogene_1_PL0182303_1_R2.fq.gz --reference-db /home/plicht/KneadData_db/hg37/hg37dec_v0.1 --reference-db /home/plicht/KneadData_db/phi-x174/phi-x174 --output /home/plicht/Microbiome_Data/Analysis/Validation_samples/KneadData/sample1 --threads 12 --processes 12 --run-fastqc-start --run-fastqc-end --trimmomatic /home/plicht/anaconda3/envs/kneaddata_env/share/trimmomatic-0.39-1

Hi Plicht,

I would recommend updating the Kneaddata version to v0.7.10 (https://pypi.org/project/kneaddata/#history). Now, you would be able to specify the source of the Sequence as well.(https://github.com/biobakery/kneaddata#sequencer-source-for-trimming-adapter-contents), “TruSeq3” for your case.

  1. I would use /share/trimmomatic-0.39-1/adaptors, containing 6 adaptor files.
  2. I would use /share/trimmomatic-0.39-1 of trimmomatic.

The others might be from the older version installation of Kneaddata?

Thanks,
Sagun Maharjan

Hey @sagunmaharjann

thanks for your advice! I used version 0.7.10 and now the specification works. However, the adaptor file only includes sequences for palindrome trimming and not for the “normal” mode. But I think it will work either way.

Thanks,
Philipp