CUTADAPT(1)
π cutadapt β the manual, but make it cute π
okay bestie, so this is cutadapt from the User Commands corner of your manual pages, and it's literally the tool that β¨removes adapter sequences from high-throughput sequencing readsβ¨. no cap, it's iconic.
πΈ NAME πΈ
cutadapt β remove adapter sequences from high-throughput sequencing reads. that's it, that's the whole job, and she does it beautifully π
β¨ SYNOPSIS β¨
the single-end vibe:
cutadapt -a ADAPTER [options] [-o output.fastq] input.fastq
and for paired-end reads, aka the duo:
cutadapt -a ADAPT1 -A ADAPT2 [options] -o out1.fastq -p out2.fastq in1.fastq in2.fastq
π¦ DESCRIPTION π¦
okay so first things first: swap ADAPTER out for the actual sequence of your 3' adapter. IUPAC wildcard characters? supported, we love that for us. but heads up β the reverse complement is not automatically searched. she does not do that for free, bestie.
all reads from input.fastq get written to output.fastq, with the adapter sequence removed. adapter matching is error-tolerant π«Ά. you can hand her multiple adapter sequences too (just use more -a options), but only the best-matching adapter gets removed. one winner, no chaos.
input can also be FASTA format, and compressed input and output is supported and auto-detected from the file name (.gz, .xz, .bz2). use the file name - for standard input/output. and if you skip the -o option entirely, output just goes to standard output. easy.
π OPTIONS π
--helpβ show all command-line options--versionβ show the program's version number and exit-h,--helpβ show this help message and exit--debugβ print debugging information-f FORMAT,--format=FORMATβ input file format; can be either'fasta','fastq'or'sra-fastq'. ignored when reading csfasta/qual files. default: auto-detect from the file name extension.
π Finding adapters π
the parameters -a, -g, -b specify adapters to be removed from each read (or from the first read in a pair if the data is paired). if you specify them multiple times, only the best matching adapter is trimmed (but go peek at the --times option). and when you use the special notation 'file:FILE', adapter sequences get read from the given FASTA file. cute, right?
-a ADAPTER,--adapter=ADAPTERβ sequence of an adapter ligated to the 3' end (paired data: of the first read). the adapter and subsequent bases are trimmed. if a'$'character is appended ("anchoring"), the adapter is only found if it's a suffix of the read.-g ADAPTER,--front=ADAPTERβ sequence of an adapter ligated to the 5' end (paired data: of the first read). the adapter and any preceding bases are trimmed. partial matches at the 5' end are allowed. if a'^'character is prepended ("anchoring"), the adapter is only found if it's a prefix of the read.-b ADAPTER,--anywhere=ADAPTERβ sequence of an adapter that may be ligated to the 5' or 3' end (paired data: of the first read). both types of matches as described under-aund-gare allowed. if the first base of the read is part of the match, the behavior is as with-g, otherwise as with-a.
β οΈ bestie listen β this option is mostly for rescuing failed library preparations. do not use it if you know which end your adapter was ligated to! fr fr.
-e ERROR_RATE,--error-rate=ERROR_RATEβ maximum allowed error rate (no. of errors divided by the length of the matching region). default:0.1--no-indelsβ allow only mismatches in alignments. default: allow both mismatches and indels-n COUNT,--times=COUNTβ remove up toCOUNTadapters from each read. default:1-O MINLENGTH,--overlap=MINLENGTHβ if the overlap between the read and the adapter is shorter thanMINLENGTH, the read is not modified. reduces the no. of bases trimmed due to random adapter matches. default:3--match-read-wildcardsβ interpret IUPAC wildcards in reads. default:False-N,--no-match-adapter-wildcardsβ do not interpret IUPAC wildcards in adapters.--no-trimβ match and redirect reads to output/untrimmed-output as usual, but do not remove adapters.--mask-adapterβ mask adapters with'N'characters instead of trimming them.
π Additional read modifications π
-u LENGTH,--cut=LENGTHβ remove bases from each read (first read only if paired). ifLENGTHis positive, remove bases from the beginning. ifLENGTHis negative, remove bases from the end. can be used twice ifLENGTHs have different signs.-q [5'CUTOFF,]3'CUTOFF,--quality-cutoff=[5'CUTOFF,]3'CUTOFFβ trim low-quality bases from 5' and/or 3' ends of each read before adapter removal. applied to both reads if data is paired. if one value is given, only the 3' end is trimmed. if two comma-separated cutoffs are given, the 5' end is trimmed with the first cutoff, the 3' end with the second.--nextseq-trim=3'CUTOFFβ NextSeq-specific quality trimming (each read). trims also dark cycles appearing as high-quality G bases (EXPERIMENTAL). π experimental, bestie, you've been warned.--quality-base=QUALITY_BASEβ assume that quality values in FASTQ are encoded asascii(quality + QUALITY_BASE). this needs to be set to64for some old Illumina FASTQ files. default:33--trim-nβ trim N's on ends of reads.-x PREFIX,--prefix=PREFIXβ add this prefix to read names. use{name}to insert the name of the matching adapter.-y SUFFIX,--suffix=SUFFIXβ add this suffix to read names; can also include{name}--strip-suffix=STRIP_SUFFIXβ remove this suffix from read names if present. can be given multiple times.--length-tag=TAGβ search forTAGfollowed by a decimal number in the description field of the read. replace the decimal number with the correct length of the trimmed read. for example, use--length-tag 'length='to correct fields like'length=123'.
π Filtering of processed reads π
--discard-trimmed,--discardβ discard reads that contain an adapter.
π«Ά also use -O to avoid discarding too many randomly matching reads! seriously, do it.
--discard-untrimmed,--trimmed-onlyβ discard reads that do not contain the adapter.-m LENGTH,--minimum-length=LENGTHβ discard trimmed reads that are shorter thanLENGTH. reads that are too short even before adapter removal are also discarded. in colorspace, an initial primer is not counted. default:0-M LENGTH,--maximum-length=LENGTHβ discard trimmed reads that are longer thanLENGTH. reads that are too long even before adapter removal are also discarded. in colorspace, an initial primer is not counted. default: no limit--max-n=COUNTβ discard reads with too many N bases. ifCOUNTis an integer, it's treated as the absolute number of N bases. if it's between 0 and 1, it's treated as the proportion of N's allowed in a read.
π Output π
--quietβ print only error messages.-o FILE,--output=FILEβ write trimmed reads toFILE. FASTQ or FASTA format is chosen depending on input. the summary report is sent to standard output. use'{name}'inFILEto demultiplex reads into multiple files. default: write to standard output--info-file=FILEβ write information about each read and its adapter matches intoFILE. see the documentation for the file format.-r FILE,--rest-file=FILEβ when the adapter matches in the middle of a read, write the rest (after the adapter) intoFILE.--wildcard-file=FILEβ when the adapter has N bases (wildcards), write adapter bases matching wildcard positions toFILE. when there are indels in the alignment, this will often not be accurate.--too-short-output=FILEβ write reads that are too short (according to length specified by-m) toFILE. default: discard reads--too-long-output=FILEβ write reads that are too long (according to length specified by-M) toFILE. default: discard reads--untrimmed-output=FILEβ write reads that do not contain the adapter toFILE. default: output to same file as trimmed reads
πΈ Colorspace options πΈ
-c,--colorspaceβ enable colorspace mode: also trim the color that is adjacent to the found adapter.-d,--double-encodeβ double-encode colors (map0,1,2,3,4toA,C,G,T,N).-t,--trim-primerβ trim primer base and the first color (which is the transition to the first nucleotide)--strip-f3β strip the_F3suffix of read names--maq,--bwaβ MAQ- and BWA-compatible colorspace output. this enables-c,-d,-t,--strip-f3and-y '/1'.--no-zero-capβ do not change negative quality values to zero in colorspace data. by default, they are, since many tools have problems with negative qualities.-z,--zero-capβ change negative quality values to zero. this is enabled by default when-c/--colorspaceis also enabled. use the above option to disable it.
π Paired-end options π
the -A/-G/-B/-U options work like their -a/-b/-g/-u counterparts, but are applied to the second read in each pair. twin energy π«Ά
-A ADAPTERβ 3' adapter to be removed from second read in a pair.-G ADAPTERβ 5' adapter to be removed from second read in a pair.-B ADAPTERβ 5'/3 adapter to be removed from second read in a pair.-U LENGTHβ removeLENGTHbases from second read in a pair (see--cut).-p FILE,--paired-output=FILEβ write second read in a pair toFILE.--pair-filter=(any|both)β which of the reads in a paired-end read have to match the filtering criterion in order for it to be filtered. default:any--interleavedβ read and write interleaved paired-end reads.--untrimmed-paired-output=FILEβ write second read in a pair to thisFILEwhen no adapter was found in the first read. use this option together with--untrimmed-outputwhen trimming pairedend reads. default: output to same file as trimmed reads--too-short-paired-output=FILEβ write second read in a pair to this file if pair is too short. use together with--too-short-output.--too-long-paired-output=FILEβ write second read in a pair to this file if pair is too long. use together with--too-long-output.
π§ SEE ALSO π§
full documentation lives at http://cutadapt.readthedocs.org/ β go read it, it's giving very thorough π
β Citation β
if you use this, cite her properly bestie, she earned it:
Marcel Martin. Cutadapt removes adapter sequences from high-throughput sequencing reads. EMBnet.Journal, 17(1):10-12, May 2011. http://dx.doi.org/10.14806/ej.17.1.200
π« AUTHOR π«
this manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program. shoutout π«Ά
and that's the whole thing, bestie!! this page is from cutadapt 1.10, dated June 2016 β a whole vintage icon, and the manpage itself is CUTADAPT(1). slay, go trim some adapters π
β¨π§¬
π¦ where this page comes from
- debian bookworm: cutadapt 4.2-1 Β· MIT
- debian trixie: cutadapt 4.7-2 Β· MIT
- ubuntu jammy: cutadapt 3.5-1build1 Β· MIT
- ubuntu noble: cutadapt 4.4-1build2 Β· MIT
- ubuntu questing: cutadapt 4.7-2build2
- ubuntu resolute: cutadapt 4.7-2build4 Β· MIT
- ubuntu stonking: cutadapt 4.7-2build4 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms