#!/bin/bash # # Reference: http://www.usadellab.org/cms/?page=trimmomatic module load Trimmomatic PROJECT_DIRECTORY="/groups/umcg-griac/tmp01/rawdata/$(whoami)/rnaseq" FASTQ_OUT="${PROJECT_DIRECTORY}/step2/" mkdir -p "${FASTQ_OUT}" # Adapters can be found at # https://github.com/timflutre/trimmomatic/tree/master/adapters # But should be verified with FastQC, or in another way. # Trimmomatic example Paired end data. # # Flags: # - ILLUMINACLIP: Cut adapter and other illumina-specific sequences from the # read. # - SLIDINGWINDOW: Perform a sliding window trimming, cutting once the average # quality within the window falls below a threshold. # - LEADING: Cut bases off the start of a read, if below a threshold quality. # - TRAILING: Cut bases off the end of a read, if below a threshold quality. # - HEADCROP: Cut the specified number of bases from the start of the read. # - MINLEN: Drop the read if it is below a specified length. java -jar $EBROOTTRIMMOMATIC/trimmomatic.jar PE \ -phred33 \ sample1_R1.fastq.gz \ sample1_R2.fastq.gz \ "${FASTQ_OUT}/sample1_R1_paired.fastq.gz" \ "${FASTQ_OUT}/sample1_R1_unpaired.fastq.gz" \ "${FASTQ_OUT}/sample1_R2_paired.fastq.gz" \ "${FASTQ_OUT}/sample1_R2_unpaired.fastq.gz" \ ILLUMINACLIP: TruSeq3-PE.fa:2:30:10 \ LEADING:3 \ TRAILING:3 \ SLIDINGWINDOW:4:25 \ HEADCROP:8 \ MINLEN:50 # Example single end data. java -jar $EBROOTTRIMMOMATIC/trimmomatic.jar SE \ -phred33 \ sample1.fastq.gz \ output.fastq.gz \ ILLUMINACLIP:TruSeq3-SE:2:30:10 \ LEADING:3 \ TRAILING:3 \ SLIDINGWINDOW:4:15 \ HEADCROP:8 \ MINLEN:50