# How to specify adaptor file for trimmomatic

**URL:** <https://forum.biobakery.org/t/how-to-specify-adaptor-file-for-trimmomatic/864>\
**Category:** KneadData\
**Created:** [August 17, 2020, 1:25pm UTC](https://forum.biobakery.org/t/how-to-specify-adaptor-file-for-trimmomatic/864 "2020-08-17T13:25:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![plicht](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@plicht](https://forum.biobakery.org/u/plicht)\
**Post date:** [August 17, 2020, 1:25pm UTC](https://forum.biobakery.org/t/how-to-specify-adaptor-file-for-trimmomatic/864/1 "2020-08-17T13:25:38Z")

</div>

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](https://forum.biobakery.org/uploads/short-url/ofCcnpDOHLru3Xz4tDqh8PpBnoo.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

---

<div class="post-metadata">

**Author:** ![sagunmaharjann](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/sagunmaharjann/32/168_2.png) [@sagunmaharjann](https://forum.biobakery.org/u/sagunmaharjann)\
**Post date:** [August 18, 2020, 2:24pm UTC](https://forum.biobakery.org/t/how-to-specify-adaptor-file-for-trimmomatic/864/2 "2020-08-18T14:24:18Z")

</div>

Hi [Plicht](https://forum.biobakery.org/u/plicht),

I would recommend updating the Kneaddata version to v0.7.10 ([https://pypi.org/project/kneaddata/#history](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](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

---

<div class="post-metadata">

**Author:** ![plicht](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@plicht](https://forum.biobakery.org/u/plicht)\
**Post date:** [August 20, 2020, 2:01pm UTC](https://forum.biobakery.org/t/how-to-specify-adaptor-file-for-trimmomatic/864/3 "2020-08-20T14:01:02Z")

</div>

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
