ADAPTERREMOVAL(1)

๐Ÿ“ฆ
version 2.3.4 ยท 3 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

โœจ NAME โœจ

AdapterRemoval(1) - Fast short-read adapter trimming and processing ๐Ÿ’–

๐ŸŽ€ SYNOPSIS ๐ŸŽ€

AdapterRemoval [options...] --file1 <filenames> [--file2 <filenames>]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so AdapterRemoval is literally the bestie for yeeting leftover adapter sequences off your FASTQ reads ๐Ÿ”ฅ. It works on single-end (SE) or paired-end (PE) reads. You can optionally trim off Ns and low-quality bases, and/or collapse overlapping paired-end mates into one read โœจ. Low quality reads get filtered based on their length after trimming and how many ambiguous nucleotides (N) they still have ๐Ÿ’….

All of that can be combined with demultiplexing at the same time, using 5' barcode sequences ๐Ÿงš. Or, if you're feeling extra, AdapterRemoval can try to rebuild a consensus adapter sequence from paired-end data, so you can figure out which adapters were originally used ๐Ÿ‘‘.

If you use this program, please cite the paper ๐Ÿซถ: Schubert, Lindgreen, and Orlando (2016). AdapterRemoval v2: rapid adapter trimming, identification, and read merging. BMC Research Notes, 12;9(1):88

The paper lives at http://bmcresnotes.biomedcentral.com/articles/10.1186/s13104-016-1900-2 ๐Ÿ“š

For the full tea, check the detailed docs at http://adapterremoval.readthedocs.io/ ๐ŸŒˆ

๐Ÿ’… OPTIONS ๐Ÿ’…

  • --help โ€” pulls up a summary of all the command-line options ๐Ÿ“‹
  • --version โ€” prints the version string ๐ŸŒธ
  • --file1 filename [filenames...] โ€” reads FASTQ reads from one or more files, whether they're uncompressed, bzip2 compressed, or gzip compressed. This is either your SE reads or, in PE mode, your mate 1 reads. If you're running PE, both --file1 and --file2 must be set. Check the primary docs for the list of supported formats ๐Ÿซง
  • --file2 filename [filenames...] โ€” reads one or more FASTQ files with mate 2 reads for a PE run. If you set this, --file1 has to be set too ๐Ÿฆ‹
  • --identify-adapters โ€” tries to build a consensus adapter sequence from fully overlapping pairs of PE reads. The minimum overlap is controlled by --minalignmentlength. The result gets compared with --adapter1 and --adapter2. No trimming happens in this mode. Default is off ๐Ÿ”
  • --threads n โ€” max number of threads. Defaults to 1 ๐Ÿงต

๐ŸŒธ FASTQ options ๐ŸŒธ

  • --qualitybase base โ€” the Phred quality score encoding used in your input reads. Use 64 for Phred+64 (Illumina 1.3+ and 1.5+) or 33 for Phred+33 (Illumina 1.8+). The value solexa works for reads with Solexa encoded scores too. Default is 33 โœจ
  • --qualitybase-output base โ€” the quality score base for reads AdapterRemoval writes out. Same options as before: 64 (Phred+64, i.e., Illumina 1.3+ and 1.5+), 33 (Phred+33, Illumina 1.8+), or solexa. Heads up, quality scores are stored as Phred scores internally, so converting to and from Solexa loses information ๐Ÿ™ˆ. The default matches whatever you gave to --qualitybase
  • --qualitymax base โ€” the max Phred score expected in your input files, which also gets used when writing output. Possible values are 0 to 93 for Phred+33 files, and 0 to 62 for Phred+64 files. Defaults to 41 ๐Ÿ’œ
  • --mate-separator separator โ€” the character that separates the mate number (1 or 2) from the read name in FASTQ records. Defaults to / ๐Ÿ“
  • --interleaved โ€” turns on --interleaved-input and --interleaved-output together ๐Ÿงš
  • --interleaved-input โ€” expects the input to be an interleaved FASTQ file given with --file1, where pairs of reads sit right next to each other (e.g. read1/1, read1/2, read2/1, read2/2, etc.) ๐ŸŒˆ
  • --interleaved-ouput โ€” writes PE reads into one single file, interleaving mate 1 and mate 2 reads. By default this file is named basename.paired.truncated, but you can change that with the --output1 option ๐ŸŽ€
  • --combined-output โ€” writes all reads into the files specified by --output1 and --output2. Reads that got tossed because of quality filters or read merging get replaced with a single N with Phred score 0. You can combine this with --interleaved-output to write PE reads to a single output file set with --output1 ๐Ÿ‘‘

๐Ÿซง Output file options ๐Ÿซง

  • --basename filename โ€” the prefix used for naming output files, unless those names have been overridden with the matching command-line option (see below) ๐Ÿ“
  • --settings file โ€” an output file with info on the parameters used in the run, plus overall stats on the reads after trimming. Default filename is basename.settings ๐Ÿ“‹
  • --output1 file โ€” an output file with your trimmed mate1 reads. Default filename is basename.pair1.truncated for paired-end reads, basename.truncated for single-end reads, and basename.paired.truncated for interleaved paired-end reads ๐Ÿ’–
  • --output2 file โ€” an output file with trimmed mate 2 reads, as long as --interleaved-output isn't enabled. Default filename is basename.pair2.truncated in PE mode ๐Ÿฆ‹
  • --singleton file โ€” an output file for paired reads whose mate got discarded. Default filename is basename.singleton.truncated ๐Ÿฅ€
  • --outputcollapsed file โ€” if --collapsed is set, this holds overlapping mate pairs that got merged into one read (PE mode), or reads where the adapter was spotted by a minimum overlap, which means the whole template molecule is there. It leaves out reads that later got trimmed for low quality or ambiguous nucleotides. Default filename is basename.collapsed ๐Ÿ”ฅ
  • --outputcollapsedtruncated file โ€” collapsed reads (see --outputcollapsed) that got trimmed because of low-quality or ambiguous nucleotides. Default filename is basename.collapsed.truncated โœ‚๏ธ
  • --discarded file โ€” holds reads discarded because of --minlength, --maxlength or --maxns. Default filename is basename.discarded ๐Ÿ—‘๏ธ

๐ŸงŠ Output compression options ๐ŸงŠ

  • --gzip โ€” if set, every FASTQ file AdapterRemoval writes gets gzip compressed, using the level from --gzip-level. The .gz extension gets added to files that didn't get a filename on the command line. Defaults to off ๐Ÿ—œ๏ธ
  • --gzip-level level โ€” the compression level used when gzipping FASTQ files. Must be a value from 0 to 9, where 0 disables compression and 9 is the best compression. Defaults to 6 โญ
  • --bzip2 โ€” if set, every FASTQ file AdapterRemoval writes gets bzip2 compressed, using the level from --bzip2-level. The .bz2 extension gets added to files that didn't get a filename on the command line. Defaults to off ๐ŸŒŠ
  • --bzip2-level level โ€” the compression level used when bzip2-ing FASTQ files. Must be a value from 1 to 9, where 9 is the best compression. Defaults to 9 ๐Ÿซง

๐Ÿ’œ FASTQ trimming options ๐Ÿ’œ

  • --adapter1 adapter โ€” the adapter sequence you expect to find in mate 1 reads, written in read direction. For a full breakdown of how to give the right adapter sequences, see the "Adapters" section of the online docs. Default is AGATCGGAAGAGCACACGTCTGAACTCCAGTCACNNNNNNATCTCGTATGCCGTCTTCTGCTTG ๐Ÿงš
  • --adapter2 adapter โ€” the adapter sequence you expect to find in mate 2 reads, written in read direction. Same deal, check the "Adapters" section of the online docs for the details. Default is AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATT ๐ŸŒธ
  • --adapter-list filename โ€” reads one or more adapter sequences from a table. The first two columns (separated by whitespace) of each line should match the values you'd pass to --adapter1 and --adapter2. In SE mode, only column one is needed. Lines starting with # get ignored. When there are multiple rows, AdapterRemoval tries each adapter (pair) and picks the best aligning adapters for each FASTQ read it processes ๐Ÿ“‹
  • --minadapteroverlap length โ€” in SE mode, reads only get trimmed if the overlap between the read and the adapter is at least X bases long, not counting ambiguous nucleotides (N). This is independent of --minalignmentlength when you use --collapse. It lets you be conservative about picking putative complete inserts in SE mode, while still making sure all possible adapter contamination gets trimmed. The default is 0 ๐Ÿซถ
  • --mm mismatchrate โ€” the allowed fraction of mismatches in the aligned region. If the value is less than 1, it gets used directly. If --mismatchrate is greater than 1, the rate is set to 1 / --mismatchrate. The default is 3 when trimming adapters, which corresponds to a max mismatch rate of 1/3, and 10 when using --identify-adapters ๐Ÿ’…
  • --shift n โ€” to allow for missing bases at the 5' end of the read, the program can let the alignment slip --shift bases at the 5' end. This is the same as starting the alignment up to --shift nucleotides into read2 (for PE) or the adapter (for SE). The default is 2 ๐Ÿฆ‹
  • --trim5p n [n] โ€” trims the 5' end of reads by a fixed amount after removing adapters, but before quality-based trimming. Give one value to trim mate 1 and mate 2 reads the same amount, or two values separated by a space to trim each mate by a different amount. Off by default ๐ŸŒˆ
  • --trim3p n [n] โ€” trims the 3' end of reads by a fixed amount. Works the same way as --trim5p ๐Ÿ‘‘
  • --trimns โ€” trims consecutive Ns from the 5' and 3' termini. If quality trimming is also on (--trimqualities), then stretches of mixed low-quality bases and/or Ns get trimmed too ๐Ÿ”ฅ
  • --maxns n โ€” discards reads containing more than --max ambiguous bases ('N') after trimming. Default is 1000 ๐Ÿ—‘๏ธ
  • --trimqualities: okay so this one trims runs of low quality bases off both the 5' and 3' ends ๐Ÿงผ The cutoff is set by --minquality. If you've also turned on --trimns, then stretches that mix low-quality bases and Ns get trimmed too ๐Ÿ’…
  • --trimwindows window_size: this is a sliding window trimmer, inspired by sickle ๐ŸชŸ Pass it a window_size and it does the job. There's a whole "Window based quality trimming" section below if you want the deets ๐Ÿฆ‹
  • --minquality minimum: this sets the quality threshold for --trimqualities and --trimwindows ๐ŸŽฏ The default is 2.
  • --preserve5p: bases on the 5p are off-limits for --trimns, --trimqualities, and --trimwindows ๐Ÿ™…โ€โ™€๏ธ Heads up, collapsed reads won't get quality trimmed when this is on ๐Ÿซถ
  • --minlength length: reads shorter than this get tossed after trimming ๐Ÿ—‘๏ธ The default is 15.
  • --maxlength length: reads longer than this get tossed after trimming ๐Ÿ“ The default is 4294967295.

๐Ÿงฌ FASTQ merging options

  • --collapse: for paired-end reads, this merges overlapping mates into one read and recalculates the quality scores ๐Ÿ‘ฏ For single-end reads, it tries to find templates where the whole sequence is available ๐Ÿ” Either way, the finished collapsed reads get an M_ name prefix, and any collapsed reads that get trimmed because of quality settings get an MT_ prefix ๐Ÿท๏ธ The overlap has to be at least --minalignmentlength nucleotides, and the max number of mismatches is set by --mm ๐Ÿ’–
  • --minalignmentlength length: this is the minimum overlap between mate 1 and mate 2 before they get collapsed into one (paired-end), or the minimum when hunting for complete template sequences in single-end mode ๐Ÿงฉ The default is 11.
  • --seed seed: when collapsing reads, if the two reads disagree at a position but both bases have the same quality, AdapterRemoval picks one at random ๐ŸŽฒ This option sets the seed for that random number generator, and the value also gets written to the settings file ๐Ÿ“ Heads up: setting the seed isn't reliable in multithreaded mode, since the order of operations is non-deterministic ๐Ÿ˜ญ
  • --collapse-deterministic: this turns on deterministic mode ๐Ÿ”’ Right now it only affects --collapse. Overlapping bases that differ but have equal quality get set to N with quality 0, instead of being randomly sampled ๐Ÿ™ˆ Using this also turns on --collapse for you โœจ
  • --collapse-conservatively: this is a different merging algorithm, inspired by FASTQ-join ๐Ÿฆ‹ For overlapping bases that match, the highest quality score wins ๐Ÿ† For overlapping bases that mismatch, the higher quality base wins, and the quality becomes the absolute difference in Phred-score between the two bases ๐Ÿงฎ If mismatching bases have identical quality scores, the base becomes N and the quality score becomes 0 (Phred-encoded) ๐Ÿ’€ Using this also turns on --collapse ๐Ÿ’…

๐Ÿงบ FASTQ demultiplexing options

  • --barcode-list filename: this does demultiplexing using a table of one or two fixed-length barcodes, for SE or PE reads ๐Ÿงบ The table should have 2 or 3 columns. The first column is the sample name, and the second and third are the mate 1 barcode and the (optional) mate 2 barcode ๐Ÿท๏ธ For the full scoop, check the "Demultiplexing" section of the online documentation ๐Ÿ“š
  • --barcode-mm n: this is the max number of mismatches allowed when counting mismatches in both the mate 1 and mate 2 barcodes for paired reads ๐Ÿ”ข
  • --barcode-mm-r1 n: this is the max number of mismatches allowed for the mate 1 barcode ๐ŸŽ€ If you don't set it, it matches the --barcode-mm value, and it can't be higher than --barcode-mm ๐Ÿ™…โ€โ™€๏ธ
  • --barcode-mm-r2 n: same deal, but for the mate 2 barcode ๐ŸŽ€ If you don't set it, it matches --barcode-mm, and it can't go higher than --barcode-mm either ๐Ÿ™…โ€โ™€๏ธ
  • --demultiplex-only: this only does demultiplexing, using the barcode list you gave --barcode-list. No other processing happens ๐Ÿงš

โœจ WINDOW BASED QUALITY TRIMMING โœจ

As of v2.2.2, AdapterRemoval has a sliding window approach to quality-based base trimming, inspired by sickle ๐ŸชŸ If window_size is greater than or equal to 1, that number is the window size for all reads ๐ŸŽฏ If window_size is a number that's at least 0 but less than 1, then it gets multiplied by the length of each individual read to figure out the window size ๐Ÿงฎ If the window length ends up zero, or bigger than the current read length, the read length gets used instead ๐Ÿ“

Here's how reads get trimmed for a given window size ๐Ÿ’…

  1. The new 5' is found by locating the first window where both the average quality and the quality of the first base in that window are greater than --minquality ๐ŸŒ…
  2. The new 3' is found by sliding the first window right, until the average quality drops to less than or equal to --minquality. The new 3' goes on the last base in that window where the quality is greater than or equal to --minquality ๐ŸŒ™
  3. If no 5' position can be determined, the read gets discarded ๐Ÿ’€

โœจ EXIT STATUS โœจ

AdapterRemoval exits with status 0 if the program ran successfully ๐Ÿฅณ If any errors came up, it exits with a non-zero code ๐Ÿšจ Do not use the output from AdapterRemoval if it returned a non-zero exit code! ๐Ÿ™…โ€โ™€๏ธ๐Ÿ’€


โœจ REPORTING BUGS โœจ

Found a bug? Report it on the AdapterRemoval issue tracker ๐Ÿ›

https://github.com/MikkelSchubert/adapterremoval/issues


โœจ LICENSE โœจ

This program is free software ๐Ÿ—ฝ You can redistribute it and/or modify it under the terms of the GNU General Public License, as published by the Free Software Foundation, either version 3 of the License or (your call) any later version ๐ŸŒˆ

This program is distributed in the hope that it'll be useful, but it comes with absolutely no warranty ๐Ÿ™ˆ Not even the implied warranties of merchantability or fitness for a particular purpose. Check out the GNU General Public License for the details ๐Ÿ“œ

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/> ๐Ÿ”—


โœจ AUTHOR โœจ

Mikkel Schubert and Stinus Lindgreen ๐Ÿ‘‘

2017, Mikkel Schubert and Stinus Lindgreen ๐ŸŽ€


Okay, that's the whole thing, bestie ๐Ÿซถ You're officially a manpage legend now ๐Ÿงš AdapterRemoval v2.3.4, last updated Aug 22, 2024 ๐Ÿ’–

๐Ÿ“ฆ where this page comes from