# Is there a safe catch-all adapter sequence for trimming?

I would like to trim/mark adapters using trimmomatic or picard MarkIlluminaAdapters from a series of Illumina Paired-End read fastqs. The fastq files may have been done using different kits or different generations/versions of illumina chips.

Without knowing ahead of time how the libraries were prepared (or which kit was used), Is there a safe "catch all" adapter sequence (or set of such sequences) that can be passed to a trimming tool and that would cover all Illumina kits? In other words, what are we expected to know about the fastq to ensure correct trimming?

edit: Picard defines a few built-in adapters which cover many standard kits, but it's not immediately obvious if you need to pass a common one (built-in sequences defined here).

You're best off just using fastp or Trim Galore!, both of which will determine the adapter sequence for you. Trim Galore! uses a built-in list of known sequences for this, whereas fastp uses read overlap.

• For clarity, are you suggesting it's better to switch over completely to this recommended set of tools, or are you simply introducing the possibility of using fastp to determine the adapters (or extract the list from trim galore)? One benefit of using MarkIlluminaAdapters is that it simply "marks" the sequences using XT:i: SAM trimming tag, rather than removing them altogether from the output bam/sam. Mar 19 '19 at 21:28
• I see no benefit to using MarkIlluminaAdapters, replace it completely. Mar 20 '19 at 6:13
• This article describes a "lossless" alignment pipeline which allows producing aligned bams which can be reversed back to the original fastqs. This is possible because of those trimming annotations, which annotate, rather than outright clip, the original sequence to indicate the portion of the read with adapters. I wish fastp supported these SAM trimming annotations, it would be a strict improvement. Mar 21 '19 at 17:13
• If you want that just use an aligner with soft clipping. Note also that few aligners support SAM input. Mar 21 '19 at 17:17
• Lol, I think I'll start calling mappers "read slingers" 😉 To be serious though, it's possible for a conscientious bioinformatician to store reads in SAM (et al.) format at every stage (raw unaligned, QC'd, aligned, aligned post-processed, etc.) in a way that preserves the original raw sequence unambiguously. In practice though, it will be problematic since many tools are not designed with this paradigm in mind. It would take years to get everyone on the same page, if indeed it's even possible to do so. Mar 21 '19 at 18:24

Alternatively, I really like using bbduk which is part of the BBMap suite.

I've processed every nascent sequencing dataset that has been published, and found a lot of quirky errors with older datasets using TrimGalore. bbduk is a little more fine-tuneable relative to cutadapt/trimmomatic/trimGalore (built on top of cutadapt)/fastp and the run time and memory usage is significantly less.

When you clone/install the repository, there is a directory of adapter fa files that you can choose from for trimming in the resources/ subdirectory which you can specify using the "ref" argument (i.e. ref=adapters.fa). The "adapters.fa" file is an excellent catchall for adapters, but you will likely over-trim a little. Alternatively, if you know what adapters were used in your dataset, you can choose one of the other pre-configured fa files. There are also a number of stats/marking/reporting/trimmed read save options which you can see here:

https://github.com/BioInfoTools/BBMap/blob/master/sh/bbduk.sh