3
$\begingroup$

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).

$\endgroup$

2 Answers 2

2
$\begingroup$

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.

$\endgroup$
7
  • $\begingroup$ 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. $\endgroup$
    – init_js
    Commented Mar 19, 2019 at 21:28
  • $\begingroup$ I see no benefit to using MarkIlluminaAdapters, replace it completely. $\endgroup$
    – Devon Ryan
    Commented Mar 20, 2019 at 6:13
  • 1
    $\begingroup$ 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. $\endgroup$
    – init_js
    Commented Mar 21, 2019 at 17:13
  • 1
    $\begingroup$ If you want that just use an aligner with soft clipping. Note also that few aligners support SAM input. $\endgroup$
    – Devon Ryan
    Commented Mar 21, 2019 at 17:17
  • $\begingroup$ 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. $\endgroup$ Commented Mar 21, 2019 at 18:24
2
$\begingroup$

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

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.