### Build Trimmomatic from Source Source: https://github.com/usadellab/trimmomatic/blob/main/README.md Use this command to build Trimmomatic from its source code using Apache Maven. Ensure you have JDK 8 or higher installed. ```bash mvn clean package ``` -------------------------------- ### Paired-End Trimming (Less Sensitive Adapters) Source: https://github.com/usadellab/trimmomatic/blob/main/README.md This command is a reference for paired-end trimming with adapter clipping, using ILLUMINACLIP, LEADING, TRAILING, SLIDINGWINDOW, and MINLEN. It is less sensitive for adapter detection compared to the previous example. ```java java -jar trimmomatic-0.39.jar PE \ input_forward.fq.gz input_reverse.fq.gz \ output_forward_paired.fq.gz output_forward_unpaired.fq.gz \ output_reverse_paired.fq.gz output_reverse_unpaired.fq.gz \ ILLUMINACLIP:TruSeq3-PE.fa:2:30:10 LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36 ``` -------------------------------- ### Leading and Trailing Quality Trimming Source: https://context7.com/usadellab/trimmomatic/llms.txt Removes low-quality bases from the start (LEADING) or end (TRAILING) of reads based on a quality threshold. Use specific quality values for desired stringency. ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ LEADING:3 \ TRAILING:3 ``` ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ LEADING:20 \ TRAILING:20 \ MINLEN:50 ``` ```bash java -jar trimmomatic-0.40.jar PE \ input_R1.fq.gz input_R2.fq.gz \ out_1P.fq.gz out_1U.fq.gz out_2P.fq.gz out_2U.fq.gz \ ILLUMINACLIP:TruSeq3-PE.fa:2:30:10 \ LEADING:3 \ TRAILING:3 \ SLIDINGWINDOW:4:15 \ MINLEN:36 ``` -------------------------------- ### Crop Fixed Length Retention Source: https://context7.com/usadellab/trimmomatic/llms.txt Trims reads to a specified maximum length, retaining bases from the start. Useful for standardizing read lengths for specific analyses. ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ CROP:100 ``` ```bash java -jar trimmomatic-0.40.jar PE \ input_R1.fq.gz input_R2.fq.gz \ out_1P.fq.gz out_1U.fq.gz out_2P.fq.gz out_2U.fq.gz \ CROP:75 \ MINLEN:50 ``` -------------------------------- ### Headcrop and Tailcrop Fixed Length Trimming Source: https://context7.com/usadellab/trimmomatic/llms.txt Removes a fixed number of bases from the start (HEADCROP) or end (TAILCROP) of reads. Useful for removing technical sequences or low-quality regions. ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ HEADCROP:10 ``` ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ TAILCROP:5 ``` ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ HEADCROP:12 \ TAILCROP:8 \ MINLEN:50 ``` ```bash java -jar trimmomatic-0.40.jar PE \ input_R1.fq.gz input_R2.fq.gz \ out_1P.fq.gz out_1U.fq.gz out_2P.fq.gz out_2U.fq.gz \ HEADCROP:15 \ ILLUMINACLIP:TruSeq3-PE.fa:2:30:10 \ MINLEN:36 ``` -------------------------------- ### Build Trimmomatic from Source Source: https://context7.com/usadellab/trimmomatic/llms.txt Instructions for cloning the repository and building the project using Maven. ```bash # Clone repository and build git clone https://github.com/usadellab/Trimmomatic.git cd Trimmomatic # Build with Maven (requires JDK 8+) mvn clean package # The JAR file will be in target/trimmomatic-0.40.jar # The distribution ZIP will be in target/Trimmomatic-0.40.zip # Run tests mvn test # Run the built JAR java -jar target/trimmomatic-0.40.jar -version ``` -------------------------------- ### Single End Mode Command Line Source: https://github.com/usadellab/trimmomatic/blob/main/README.md Use this command for processing single-ended FASTQ files. Specify input and output files along with desired trimming steps. ```bash java -jar SE [-threads ] [-phred33 | -phred64] \ [-trimlog ] [-summary ] [-compressLevel ] [-compressStream | -compressBlock] [-quiet] [-version] \ \ # Additional steps added as needed ``` -------------------------------- ### Manage Trimmomatic with Docker Source: https://context7.com/usadellab/trimmomatic/llms.txt Commands for building the Trimmomatic Docker image and executing trimming tasks within containers. ```bash # Build Docker image docker build --build-arg TRIMMOMATIC_VERSION=0.40 -t trimmomatic:0.40 . # Run version check docker run trimmomatic:0.40 # Run paired-end trimming with mounted volumes docker run -v /path/to/data:/data trimmomatic:0.40 PE \ -threads 4 \ /data/input_R1.fq.gz /data/input_R2.fq.gz \ /data/out_1P.fq.gz /data/out_1U.fq.gz \ /data/out_2P.fq.gz /data/out_2U.fq.gz \ ILLUMINACLIP:/opt/trimmomatic/adapters/TruSeq3-PE.fa:2:30:10 \ SLIDINGWINDOW:4:15 MINLEN:36 # Run single-end trimming docker run -v /path/to/data:/data trimmomatic:0.40 SE \ -threads 4 \ /data/input.fq.gz /data/output.fq.gz \ ILLUMINACLIP:/opt/trimmomatic/adapters/TruSeq3-SE.fa:2:30:10 \ MINLEN:36 ``` -------------------------------- ### Paired End Mode Command Line Source: https://github.com/usadellab/trimmomatic/blob/main/README.md Use this command for processing paired-end FASTQ files. Specify input and output files along with desired trimming steps. ```bash java -jar PE [-threads ] [-summary ] [-basein ] [-baseout ] \ [-validatePairs] [-compressLevel ] [-compressStream | -compressBlock] [-quiet] [-version] \ \ \ \ # Additional steps added as needed ``` -------------------------------- ### Paired-End Adapter Clipping (Standard) Source: https://context7.com/usadellab/trimmomatic/llms.txt Standard paired-end adapter clipping using a specified FASTA file and parameters for seed mismatches, palindrome threshold, simple threshold, and minimum adapter length. 'keepBothReads' is set to True. ```bash java -jar trimmomatic-0.40.jar PE \ input_R1.fq.gz input_R2.fq.gz \ out_1P.fq.gz out_1U.fq.gz out_2P.fq.gz out_2U.fq.gz \ ILLUMINACLIP:TruSeq3-PE.fa:2:30:10:2:True ``` -------------------------------- ### Paired-End Trimming with Adapter Clipping Source: https://github.com/usadellab/trimmomatic/blob/main/README.md This command performs paired-end trimming with adapter clipping using the ILLUMINACLIP, LEADING, TRAILING, and MINLEN options. The `keepBothReads` parameter is set to True, and the minimum adapter length is specified. ```java java -jar trimmomatic-0.39.jar PE \ input_forward.fq.gz input_reverse.fq.gz \ output_forward_paired.fq.gz output_forward_unpaired.fq.gz \ output_reverse_paired.fq.gz output_reverse_unpaired.fq.gz \ ILLUMINACLIP:TruSeq3-PE.fa:2:30:10:2:True LEADING:3 TRAILING:3 MINLEN:36 ``` -------------------------------- ### Paired-End Adapter Clipping (Nextera) Source: https://context7.com/usadellab/trimmomatic/llms.txt Adapter clipping for paired-end reads using Nextera library preparation adapters. Includes parameters for seed mismatches, palindrome threshold, simple threshold, minimum adapter length, and 'keepBothReads'. ```bash java -jar trimmomatic-0.40.jar PE \ input_R1.fq.gz input_R2.fq.gz \ out_1P.fq.gz out_1U.fq.gz out_2P.fq.gz out_2U.fq.gz \ ILLUMINACLIP:NexteraPE-PE.fa:2:30:10:2:True ``` -------------------------------- ### Single-End Trimming with Adapter Clipping Source: https://github.com/usadellab/trimmomatic/blob/main/README.md This command performs single-ended trimming with adapter clipping using ILLUMINACLIP, LEADING, TRAILING, SLIDINGWINDOW, and MINLEN. It is suitable for single-ended sequencing data. ```java java -jar trimmomatic-0.39.jar SE \ input.fq.gz \ output.fq.gz \ ILLUMINACLIP:TruSeq3-SE:2:30:10 \ LEADING:3 TRAILING:3 SLIDINGWINDOW:4:15 MINLEN:36 ``` -------------------------------- ### Basic Paired-End Trimming Source: https://context7.com/usadellab/trimmomatic/llms.txt Performs paired-end trimming with adapter removal and quality filtering. Requires specifying input and output files, adapter sequences, and quality thresholds. ```bash java -jar trimmomatic-0.40.jar PE \ -threads 4 \ -phred33 \ -trimlog trim.log \ -summary stats.txt \ input_R1.fastq.gz input_R2.fastq.gz \ output_R1_paired.fastq.gz output_R1_unpaired.fastq.gz \ output_R2_paired.fastq.gz output_R2_unpaired.fastq.gz \ ILLUMINACLIP:TruSeq3-PE.fa:2:30:10:2:True \ LEADING:3 \ TRAILING:3 \ SLIDINGWINDOW:4:15 \ MINLEN:36 ``` -------------------------------- ### Execute NGS Processing Pipelines Source: https://context7.com/usadellab/trimmomatic/llms.txt Common workflows for RNA-seq, Whole Genome Sequencing, and Amplicon sequencing trimming. ```bash # RNA-seq paired-end preprocessing pipeline java -jar trimmomatic-0.40.jar PE \ -threads 8 \ -phred33 \ -trimlog rna_trim.log \ -summary rna_stats.txt \ sample_R1.fastq.gz sample_R2.fastq.gz \ sample_R1_paired.fq.gz sample_R1_unpaired.fq.gz \ sample_R2_paired.fq.gz sample_R2_unpaired.fq.gz \ ILLUMINACLIP:TruSeq3-PE-2.fa:2:30:10:2:True \ LEADING:3 \ TRAILING:3 \ SLIDINGWINDOW:4:15 \ MINLEN:36 # Whole genome sequencing pipeline with aggressive filtering java -jar trimmomatic-0.40.jar PE \ -threads 16 \ -validatePairs \ wgs_R1.fq.gz wgs_R2.fq.gz \ wgs_R1_P.fq.gz wgs_R1_U.fq.gz wgs_R2_P.fq.gz wgs_R2_U.fq.gz \ ILLUMINACLIP:TruSeq3-PE.fa:2:30:10:2:True \ LEADING:20 \ TRAILING:20 \ SLIDINGWINDOW:5:20 \ AVGQUAL:25 \ MINLEN:50 # Amplicon sequencing with fixed-length output java -jar trimmomatic-0.40.jar PE \ -threads 4 \ amplicon_R1.fq.gz amplicon_R2.fq.gz \ amp_R1_P.fq.gz amp_R1_U.fq.gz amp_R2_P.fq.gz amp_R2_U.fq.gz \ ILLUMINACLIP:NexteraPE-PE.fa:2:30:10 \ HEADCROP:20 \ CROP:250 \ MINLEN:100 ``` -------------------------------- ### Paired-End Trimming Pipeline Source: https://context7.com/usadellab/trimmomatic/llms.txt Combines adapter trimming, sliding window, and minimum length filtering for paired-end reads. Ensure input and output files are correctly specified. ```bash java -jar trimmomatic-0.40.jar PE \ input_R1.fq.gz input_R2.fq.gz \ out_1P.fq.gz out_1U.fq.gz out_2P.fq.gz out_2U.fq.gz \ ILLUMINACLIP:TruSeq3-PE.fa:2:30:10 \ SLIDINGWINDOW:4:15 \ MINLEN:36 ``` -------------------------------- ### Paired-End Trimming with Template Naming Source: https://context7.com/usadellab/trimmomatic/llms.txt Uses a base input and base output name for paired-end trimming, simplifying file naming conventions. Adapter clipping and minimum length filtering are applied. ```bash java -jar trimmomatic-0.40.jar PE \ -threads 4 \ -basein sample_R1.fastq.gz \ -baseout sample_trimmed.fastq.gz \ ILLUMINACLIP:TruSeq3-PE.fa:2:30:10:2:True \ MINLEN:36 ``` -------------------------------- ### Paired-End Adapter Clipping (TruSeq2) Source: https://context7.com/usadellab/trimmomatic/llms.txt Adapter clipping for paired-end reads using TruSeq2 adapters, suitable for older GAII machines. Specifies adapter FASTA file, seed mismatches, and palindrome/simple thresholds. ```bash java -jar trimmomatic-0.40.jar PE \ input_R1.fq.gz input_R2.fq.gz \ out_1P.fq.gz out_1U.fq.gz out_2P.fq.gz out_2U.fq.gz \ ILLUMINACLIP:TruSeq2-PE.fa:2:30:10 ``` -------------------------------- ### Basic Single-End Trimming Source: https://context7.com/usadellab/trimmomatic/llms.txt Performs basic single-end trimming with adapter removal and quality filtering. Specify input and output files, adapter sequences, and quality thresholds. ```bash java -jar trimmomatic-0.40.jar SE \ -threads 4 \ -phred33 \ -trimlog trim.log \ -summary stats.txt \ input.fastq.gz \ output.fastq.gz \ ILLUMINACLIP:TruSeq3-SE.fa:2:30:10 \ LEADING:3 \ TRAILING:3 \ SLIDINGWINDOW:4:15 \ MINLEN:36 ``` -------------------------------- ### Single-End Adapter Clipping Source: https://context7.com/usadellab/trimmomatic/llms.txt Performs adapter clipping on single-end reads using a specified FASTA file and parameters for seed mismatches, palindrome threshold, and simple threshold. ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ ILLUMINACLIP:TruSeq3-SE.fa:2:30:10 ``` -------------------------------- ### Sliding Window Quality Trimming (Standard) Source: https://context7.com/usadellab/trimmomatic/llms.txt Applies sliding window quality trimming to single-end reads. Uses a 4-base window and a quality threshold of 15 to determine where to trim. ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ SLIDINGWINDOW:4:15 ``` -------------------------------- ### Maxinfo Adaptive Quality Trimming Source: https://context7.com/usadellab/trimmomatic/llms.txt Trims reads using an adaptive algorithm that balances read length and error rate to maximize read value. Adjust strictness for quality vs. length focus. ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ MAXINFO:50:0.5 ``` ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ MAXINFO:75:0.8 ``` ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ MAXINFO:100:0.2 ``` -------------------------------- ### Trimmomatic Processing Steps Source: https://github.com/usadellab/trimmomatic/blob/main/README.md Detailed configuration options for various read trimming and filtering operations. ```APIDOC ## ILLUMINACLIP ### Description Performs adapter clipping on sequencing reads. ### Parameters - **fastaWithAdaptersEtc** (string) - Required - Path to fasta file containing adapters. - **seedMismatches** (int) - Required - Maximum mismatch count for full match. - **palindromeClipThreshold** (int) - Required - Accuracy threshold for PE palindrome alignment. - **simpleClipThreshold** (int) - Required - Accuracy threshold for simple adapter matching. - **minAdapterLengthPalindrome** (int) - Optional - Minimum adapter length in palindrome mode [default = 8]. - **keepBothReads** (boolean) - Optional - Keep both reads in palindrome mode [default = False]. ## LEADING / TRAILING ### Description Removes bases from the start (LEADING) or end (TRAILING) of the read if they fall below the specified quality. ### Parameters - **quality** (int) - Required - Minimum quality required to keep a base. ## HEADCROP / TAILCROP / CROP ### Description Removes a fixed number of bases from the start (HEADCROP) or end (TAILCROP) of the read, or keeps a fixed length from the start (CROP). ### Parameters - **length** (int) - Required - Number of bases to remove or keep. ## SLIDINGWINDOW ### Description Performs a sliding window trim, cutting once the average quality within the window falls below a threshold. ### Parameters - **windowSize** (int) - Required - Number of bases to average across. - **requiredQuality** (int) - Required - Average quality required. ## MAXINFO ### Description Trims reads based on a scoring system favoring a target length while maintaining quality. ### Parameters - **targetLength** (int) - Required - Ideal length for a read. - **strictness** (float) - Required - Trade-off between length and quality (0.0 to 1.0). ## MINLEN / MAXLEN / AVGQUAL ### Description Filters reads based on length (MINLEN/MAXLEN) or average Phred quality score (AVGQUAL). ### Parameters - **length/quality** (int) - Required - Threshold value. ## BASECOUNT ### Description Filters reads based on the frequency of specific characters. ### Parameters - **bases** (string) - Required - Characters to count (e.g., N, GC). - **minCount** (int) - Optional - Minimum occurrences. - **maxCount** (int) - Optional - Maximum occurrences. ## TOPHRED33 / TOPHRED64 ### Description Forces the input quality encoding to Phred 33 or Phred 64. ``` -------------------------------- ### Single End Mode with Explicit Class Source: https://github.com/usadellab/trimmomatic/blob/main/README.md Alternative command for single-end processing using the explicit Java class. Functionality is identical to the -jar method. ```bash java -classpath org.usadellab.trimmomatic.TrimmomaticSE [-threads ] [-phred33 | -phred64] \ [-trimlog ] [-summary ] [-compressLevel ] [-compressStream | -compressBlock] [-quiet] [-version] \ \ # Additional steps added as needed ``` -------------------------------- ### Paired End Mode with Explicit Class Source: https://github.com/usadellab/trimmomatic/blob/main/README.md Alternative command for paired-end processing using the explicit Java class. Functionality is identical to the -jar method. ```bash java -classpath org.usadellab.trimmomatic.TrimmomaticPE [-threads ] [-phred33 | -phred64] \ [-trimlog ] [-summary ] [-basein ] [-baseout ] \ [-validatePairs] [-compressLevel ] [-compressStream | -compressBlock] [-quiet] [-version] \ \ \ \ # Additional steps added as needed ``` -------------------------------- ### Convert Phred-33 to Phred-64 Source: https://context7.com/usadellab/trimmomatic/llms.txt Use this command to convert sequencing data quality scores between Phred-33 and Phred-64 formats. ```bash java -jar trimmomatic-0.40.jar SE \ -phred33 \ input_phred33.fq.gz output_phred64.fq.gz \ TOPHRED64 ``` -------------------------------- ### Minimal Single-End Trimming for Quality Source: https://context7.com/usadellab/trimmomatic/llms.txt Applies minimal trimming to single-end reads, focusing solely on quality filtering based on average quality score and minimum read length. No adapter trimming is performed. ```bash java -jar trimmomatic-0.40.jar SE \ -threads 2 \ input.fq \ output.fq \ AVGQUAL:20 \ MINLEN:50 ``` -------------------------------- ### Single-End Trimming with Compression Control Source: https://context7.com/usadellab/trimmomatic/llms.txt Performs single-end trimming with sliding window quality filtering and minimum length requirements, while controlling the compression level of the output file. ```bash java -jar trimmomatic-0.40.jar SE \ -threads 4 \ -compressLevel 6 \ -compressBlock \ input.fastq.gz \ output.fastq.gz \ SLIDINGWINDOW:4:20 MINLEN:36 ``` -------------------------------- ### Minlen and Maxlen Length Filtering Source: https://context7.com/usadellab/trimmomatic/llms.txt Filters reads based on minimum (MINLEN) or maximum (MAXLEN) length thresholds. Reads outside the specified range are dropped. ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ MINLEN:36 ``` ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ MAXLEN:150 ``` ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ SLIDINGWINDOW:4:15 \ MINLEN:50 \ MAXLEN:150 ``` -------------------------------- ### Sliding Window Quality Trimming (Aggressive) Source: https://context7.com/usadellab/trimmomatic/llms.txt Performs more aggressive sliding window quality trimming on single-end reads. Uses a 5-base window and a quality threshold of 20. ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ SLIDINGWINDOW:5:20 ``` -------------------------------- ### Tophred33 and Tophred64 Quality Conversion Source: https://context7.com/usadellab/trimmomatic/llms.txt Converts quality scores between Phred-33 and Phred-64 encodings. Use the -phred64 flag when input is Phred-64 encoded. ```bash java -jar trimmomatic-0.40.jar SE \ -phred64 \ input_phred64.fq.gz output_phred33.fq.gz \ TOPHRED33 ``` -------------------------------- ### Paired-End Trimming with Read Pair Validation Source: https://context7.com/usadellab/trimmomatic/llms.txt Enables read pair validation during paired-end trimming, ensuring that only valid pairs are processed. The '-quiet' flag suppresses verbose output. ```bash java -jar trimmomatic-0.40.jar PE \ -threads 4 \ -validatePairs \ -quiet \ input_forward.fq.gz input_reverse.fq.gz \ out_1P.fq.gz out_1U.fq.gz out_2P.fq.gz out_2U.fq.gz \ ILLUMINACLIP:NexteraPE-PE.fa:2:30:10 \ LEADING:3 TRAILING:3 MINLEN:36 ``` -------------------------------- ### Avgqual Average Quality Filtering Source: https://context7.com/usadellab/trimmomatic/llms.txt Drops entire reads if their average quality score falls below a specified threshold. Can be combined with other trimming steps. ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ AVGQUAL:20 ``` ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ AVGQUAL:30 \ MINLEN:50 ``` ```bash java -jar trimmomatic-0.40.jar PE \ input_R1.fq.gz input_R2.fq.gz \ out_1P.fq.gz out_1U.fq.gz out_2P.fq.gz out_2U.fq.gz \ ILLUMINACLIP:TruSeq3-PE.fa:2:30:10 \ SLIDINGWINDOW:4:15 \ AVGQUAL:25 \ MINLEN:36 ``` -------------------------------- ### Basecount Base Filtering Source: https://context7.com/usadellab/trimmomatic/llms.txt Filters reads based on the count of specific bases, such as N (ambiguous calls) or GC content. Specify minimum and maximum counts for filtering. ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ BASECOUNT:N:0:5 ``` ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ BASECOUNT:GC:20:80 ``` ```bash java -jar trimmomatic-0.40.jar SE \ input.fq.gz output.fq.gz \ BASECOUNT:N:0:0 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.