- Adapter contamination and adapter trimming are important aspects of sequencing data preprocessing in bioinformatics. During DNA and RNA sequencing library preparation, artificial DNA or RNA sequences called adapters are attached to biological fragments to enable sequencing. These adapters provide the necessary binding sites for sequencing primers, amplification, indexing, and other platform-specific operations. Although adapters are essential for sequencing, they are generally not part of the original biological sequence of interest. When adapter sequences are included in sequencing reads, they can interfere with read alignment, genome assembly, variant detection, gene expression analysis, and other downstream applications. Adapter contamination refers to the presence of these unwanted adapter-derived sequences in sequencing reads, while adapter trimming is the computational process of identifying and removing them.
- Sequencing libraries are prepared by converting biological DNA or RNA molecules into fragments that can be processed by a sequencing instrument. Depending on the sequencing platform and library preparation method, adapters are attached to the ends of these fragments. In Illumina sequencing, adapters commonly contain sequences required for attachment to the flow cell, amplification, sequencing-primer binding, and sample indexing. In other technologies, adapters serve different functions. Oxford Nanopore adapters help control the movement of DNA or RNA molecules through nanopores, while PacBio SMRTbell adapters form hairpin structures that allow polymerases to read circular DNA templates. The structure and function of adapters therefore vary between sequencing technologies.
- Adapter contamination commonly occurs when the original DNA or RNA fragment is shorter than the sequencing read length. During sequencing, the instrument initially reads the biological insert, but after reaching the end of the fragment, it may continue into the attached adapter sequence. The resulting read contains both biological sequence and artificial adapter bases. This is particularly common in small-fragment libraries, short DNA inserts, small RNA sequencing, and some degraded or highly fragmented samples. Adapter contamination can also arise from incomplete adapter removal during library preparation, primer contamination, or other technical problems.
- For example, consider a DNA fragment with the biological sequence ATGCTAGCTAGC and an attached adapter sequence AGATCGGAAGAGC. If the sequencing instrument reads beyond the end of the biological fragment, the resulting read may contain both sequences:
Biological insert: ATGCTAGCTAGC
Adapter sequence: AGATCGGAAGAGC
Sequencing read: ATGCTAGCTAGCAGATCGGAAGAGC
- The adapter-derived portion does not represent the original genomic or transcript sequence. If it remains in the read, it may reduce the accuracy of downstream analysis. This example is simplified; actual adapter structures and sequences depend on the sequencing platform and library preparation protocol.
- Adapter contamination can produce several problems in bioinformatics analysis. During reference alignment, adapter-derived bases may not match the reference genome and can reduce alignment quality or cause part of a read to remain unmapped. In some cases, adapter sequences may align incorrectly to unrelated genomic regions, particularly when they contain short sequences that resemble biological DNA. Such alignments can create misleading evidence for genomic variation or sequence similarity.
- In genome assembly, adapter contamination can introduce artificial overlaps between reads or interfere with the identification of genuine sequence relationships. This may result in fragmented assemblies, incorrect contig construction, or reduced assembly quality. In RNA sequencing, adapter contamination can affect transcript mapping and quantification, particularly when reads are short. In small RNA sequencing, adapter removal is especially important because the biological RNA molecules may be shorter than the sequencing read length, resulting in a substantial proportion of adapter sequence within the raw reads.
- Adapter contamination can also influence variant calling. If adapter-derived bases are retained, they may produce mismatches, low-quality alignments, or misleading sequence evidence. This can increase false-positive variant calls or reduce confidence in genuine variants. In metagenomic analysis, artificial adapter sequences may interfere with taxonomic classification and can occasionally be mistaken for biological sequences. Removing adapters before downstream analysis helps reduce these technical effects.
- Adapter trimming is the process of detecting and removing adapter-derived bases from sequencing reads. It generally involves comparing the ends or internal regions of reads with known adapter sequences. Because sequencing errors may cause imperfect matches, trimming software uses alignment or sequence-matching algorithms that allow a specified level of mismatch. Some tools also detect adapters automatically by examining read patterns or using built-in adapter databases. The selected method depends on the sequencing platform, adapter design, read length, and library preparation protocol.
- Adapter trimming usually involves several steps. First, the adapter sequences used during library preparation are identified from the sequencing protocol or sample metadata. Next, reads are examined for matches to these sequences. The matching adapter portion is removed, and the remaining biological sequence is retained. Some tools also remove low-quality terminal bases, filter reads that become too short, and generate quality-control reports. Researchers should distinguish adapter removal from quality trimming because they address different problems. Adapter trimming removes artificial library sequences, whereas quality trimming removes or filters bases with low estimated base-call confidence.
- Adapter trimming can be performed using several bioinformatics tools. Cutadapt is widely used for identifying and removing adapter and primer sequences from sequencing reads. It supports single-end and paired-end data, flexible matching parameters, anchored adapters, linked adapters, and other trimming strategies. Trimmomatic provides adapter removal together with quality trimming and read filtering. fastp is a fast preprocessing tool that supports adapter detection, quality filtering, trimming, and report generation. BBDuk, part of the BBTools suite, can also remove adapter sequences and filter reads based on different sequence characteristics.
- For Illumina short-read sequencing, Cutadapt is commonly used to remove known adapter sequences. The following example demonstrates adapter trimming from a single-end FASTQ file:
cutadapt \
-a AGATCGGAAGAGC \
-o sample_trimmed.fastq.gz \
sample.fastq.gz
- In this command, -a specifies the adapter sequence expected at the 3′ end of the read, -o specifies the output file, and the final argument identifies the input FASTQ file. The adapter sequence shown is an illustrative example of a commonly encountered Illumina adapter motif. Researchers should use the adapter sequence appropriate to their actual library preparation kit rather than assuming that every dataset contains the same adapter.
- For paired-end sequencing, forward and reverse reads are processed together. The following example uses Cutadapt to remove adapters from both read files:
cutadapt \
-a AGATCGGAAGAGC \
-A AGATCGGAAGAGC \
-o sample_R1_trimmed.fastq.gz \
-p sample_R2_trimmed.fastq.gz \
sample_R1.fastq.gz \
sample_R2.fastq.gz
- Here, -a specifies the adapter for read 1, while -A specifies the adapter for read 2. The -o and -p options define the output files for the two read directions. Actual forward and reverse adapter sequences may differ depending on the library design, so the correct sequences should be obtained from the sequencing protocol or library preparation documentation.
- Cutadapt also allows researchers to specify minimum overlap and error tolerance when identifying adapter sequences. These parameters influence how confidently a read segment is classified as an adapter. A minimum overlap prevents very short accidental matches from being treated as genuine adapter contamination, while the error tolerance allows for sequencing errors or mismatches. For example:
cutadapt \
-a AGATCGGAAGAGC \
-O 5 \
-e 0.1 \
-o sample_trimmed.fastq.gz \
sample.fastq.gz
- In this example, -O 5 requires a minimum overlap of five bases, and -e 0.1 allows an error rate of up to 10% in the adapter match. These values are illustrative rather than universal recommendations. The appropriate parameters depend on the adapter sequence, read length, sequencing error profile, and expected level of contamination.
- Trimmomatic is another commonly used tool for adapter removal and quality trimming. It uses adapter sequence collections, commonly supplied as FASTA files, and supports operations for both single-end and paired-end reads. An illustrative paired-end command is:
trimmomatic PE \
-phred33 \
sample_R1.fastq.gz \
sample_R2.fastq.gz \
sample_R1_paired.fastq.gz \
sample_R1_unpaired.fastq.gz \
sample_R2_paired.fastq.gz \
sample_R2_unpaired.fastq.gz \
ILLUMINACLIP:TruSeq3-PE.fa:2:30:10 \
MINLEN:50
- The PE option indicates paired-end processing, while -phred33 specifies Phred+33 quality encoding. ILLUMINACLIP identifies the adapter file and the parameters used for adapter matching. MINLEN:50 removes reads shorter than 50 bases after trimming. The adapter file must be available at the specified path, and the appropriate adapter collection should be selected for the actual library preparation method. The example should be adjusted to the sequencing protocol and research requirements.
- fastp provides another approach because it can detect and remove common adapter sequences automatically in supported short-read workflows. The following example processes paired-end Illumina reads:
fastp \
-i sample_R1.fastq.gz \
-I sample_R2.fastq.gz \
-o sample_R1_trimmed.fastq.gz \
-O sample_R2_trimmed.fastq.gz \
-h fastp_report.html \
-j fastp_report.json
- The input files are specified using -i and -I, while the processed outputs are specified using -o and -O. The HTML and JSON reports summarize the preprocessing results. Automatic adapter detection can be convenient, but researchers should inspect the reports and verify that the expected adapters have been removed. For unusual library designs, explicit adapter sequences may be preferable.
- Adapter trimming is also important in long-read sequencing, although the adapter structures and processing requirements differ from short-read sequencing. Oxford Nanopore reads may contain sequencing adapters, motor-associated sequences, barcodes, or other library-specific structures. Tools such as Porechop have historically been used for adapter trimming in Nanopore data, although researchers should check current maintenance and compatibility before selecting a tool. Dorado and other Nanopore software workflows also provide platform-specific processing options, including demultiplexing and adapter-related handling. PacBio data use SMRTbell structures and platform-specific processing workflows, commonly handled through SMRT Link and related tools. Researchers should use software appropriate to the sequencing platform and avoid applying short-read adapter assumptions to long-read data.
- Barcode and index sequences require special consideration. Sample indexes are short sequences used to distinguish samples pooled together in a sequencing run. Cell barcodes identify individual cells in single-cell sequencing, while unique molecular identifiers (UMIs) identify original molecules. These sequences may be located in adapters, index reads, or specific positions within sequencing reads. They should not automatically be removed as ordinary adapter contamination. In single-cell and UMI-based workflows, barcode and UMI information is essential for assigning reads to cells and counting original molecules. Incorrect trimming can destroy this information and compromise the analysis.
- Adapter trimming should be followed by another round of quality assessment. Researchers should compare the original and processed datasets to determine whether adapter contamination has decreased and whether read quality has improved. FastQC can be run before and after trimming, while MultiQC can summarize reports from multiple samples. The following commands illustrate a simple comparison workflow:
fastqc sample_R1.fastq.gz sample_R2.fastq.gz
fastqc sample_R1_trimmed.fastq.gz sample_R2_trimmed.fastq.gz
multiqc .
- The reports can be examined for changes in adapter content, sequence quality, read length distribution, GC content, and overrepresented sequences. A successful trimming operation should reduce detectable adapter contamination without unnecessarily removing biological sequence information.
- Adapter trimming does not mean that every read must be shortened or discarded. If no adapter sequence is detected, the original read may be retained. Some reads may contain only a small adapter segment, while others may contain longer adapter-derived regions. In certain datasets, adapter sequences may be absent because the insert is sufficiently long or because the library preparation and sequencing workflow already handled them. Researchers should avoid applying aggressive trimming merely because a preprocessing pipeline includes an adapter-removal step.
- Over-trimming is an important concern. If the matching parameters are too permissive, genuine biological sequence may be incorrectly identified as adapter sequence and removed. This is particularly problematic when biological sequences contain short motifs similar to adapter sequences. Excessive trimming can also reduce read lengths below the minimum required for reliable alignment or classification. Therefore, adapter sequences, minimum overlap, mismatch tolerance, and minimum read length should be selected carefully. The results should be checked using quality-control reports and, where necessary, visual inspection of representative reads.
- The importance of adapter trimming varies among sequencing applications. In whole-genome sequencing, adapter removal improves the quality of reads used for genome alignment and variant detection. In whole-exome and targeted sequencing, it helps improve the reliability of reads used to examine selected genomic regions. In RNA sequencing, it supports more accurate transcript alignment and expression quantification. In small RNA sequencing, adapter trimming is often essential because many RNA molecules are shorter than the sequencing read length. In metagenomics, it helps prevent artificial adapter sequences from affecting taxonomic classification and microbial genome assembly. In single-cell sequencing, trimming must preserve cell barcodes and UMIs when these are required for downstream analysis.
- For reproducible bioinformatics analysis, researchers should preserve the original FASTQ files and document all adapter-trimming operations. The sequencing platform, library preparation kit, adapter sequences, software name and version, trimming parameters, and minimum read-length thresholds should be recorded. Quality-control reports should be retained before and after preprocessing. Processed files should also be checked for integrity, and file checksums can help confirm that data have not been unintentionally changed.
- Adapter contamination and adapter trimming are fundamental parts of sequencing data preprocessing. Adapter sequences are necessary for many sequencing technologies, but their presence in base-called reads can interfere with downstream bioinformatics analysis. Tools such as Cutadapt, Trimmomatic, fastp, and platform-specific long-read software help identify and remove unwanted adapter-derived sequences. Correct adapter identification, suitable trimming parameters, preservation of barcodes and UMIs, and post-trimming quality assessment are essential for maintaining biological information and producing reliable sequencing results.