Hi,

I am trying to trim the data with trimommatic. Does anyone know how does it work. The manual is not very clear to me. Also I am not clear what adapter file to use, How to set simple mode rather than palindromic mode and what to do with the unpaired files.

I tried to run this command. But I am not sure of what the tool is doing:

    java -jar /home/devgen/bin/trimmomatic-0.36.jar PE -phred33  C95VLANXX-2046D-01-01-01_L003_R1.fastq C95VLANXX-2046D-01-01-01_L003_R2.fastq  N6_F_P.fastq N6_F_U.fastq  N6_R_P.fastq N6_R_U.fastq  ILLUMINACLIP:adapters/TruSeq3-PE.fa:2:30:10  MINLEN:25 AVGQUAL:20 -trimlog logs

 


Thanks for your help.
Trimmomatic combines a bunch of regularly performed quality control steps in one go.

In your example command, you give it a paired end fastq file with phred33 quality encodings, then clip for the adapters in TruSeq3-PE.fa with a maximum of 2 mismatches with an overlap score of 30 or 10 for single reads. Then, all reads shorter than 25 are discarded (MINLEN:25), and drop all reads where the average quality is below 20 (AVGQUAL:20).

Personally, I prefer a sliding window approach - I often see reads where the quality scores worsen towards the end, it's rare to have a read where the average quality for all bases is below 20, normally the first 2/3 are pretty good. Using a sliding window approach cuts off bad ends.

I'd use (after making sure the reads are actually PHRED33 quality encoded)

    PE -phred33 C95VLANXX-2046D-01-01-01_L003_R1.fastq C95VLANXX-2046D-01-01-01_L003_R2.fastq N6_F_P.fastq N6_F_U.fastq N6_R_P.fastq N6_R_U.fastq ILLUMINACLIP:adapters/TruSeq3-PE.fa:2:30:10 SLIDINGWINDOW:4:20  MINLEN:25 

The order of arguments is important - MINLEN25 before the SLIDINGWINDOW approach would mean that it would only check the length of reads before trimming, MINLEN25 after the SLIDINGWINDOW approach means that it will discard reads that after trimming are too short.

If you don't know your adapters, you can run FASTQC on your library - overrepresented k-mers can be adaptersequences. I've also just added all adapters in Trimmomatic's folder of adapters into one file and ran it with that one. There is no distinction between palindromic mode and simple mode - palindromic mode is used for paired end reads, simple for single end reads.

You can use unpaired reads depending on your task - I'd use them for genome assembly since more data is better, but I wouldn't use them for SNP-calling as an alignment of a single read is less precise than an alignment of a read pair.