Skip to content

Primer Trimming

alexandriai168 edited this page Oct 22, 2023 · 1 revision

We start by trimming off primers, barcodes, and illumina adapters using the Cutadapt software. The primer sequences are read in from the primer_data.csv file. For each file, we detect what primer was used using the file name (see further documentation here), and then use the following command to trim primers using Cutadapt:

${CUTADAPT} -g ${MFU_F} \
     -G "${MFU_R}" \
     -o ../for_dada2/${R1} \
     -p ../for_dada2/${R2} \
    --discard-untrimmed \
    -j 0 \
"${R1}" "${R2}" 1> "../cutadapt_reports/${FILE_NAME}_trim_report.txt"
Flag Meaning
-g sequence of the forward primer
-G sequence of the reverse primer
-o output location of forward fastq file
-p output location of reverse fastq file
--discard-untrimmed discard sequences where the primer is not found
-j automatically detect the number of available cores
Clone this wiki locally