Demultiplexing and Trimming Adapters from Reads with q2-cutadapt

:exclamation: :exclamation: :exclamation: NOTE :exclamation: :exclamation: :exclamation:

This tutorial is a work in progress, and is incomplete at the moment. It demonstrates at a high level some of the methods available in the q2-cutadapt plugin available in QIIME 2 2018.2. Please stay tuned here for additional updates as this tutorial is expanded upon in the coming weeks.

Multiplexed reads with the barcodes in the sequence reads can be demultiplexed in QIIME 2 using the q2-cutadapt plugin, which wraps the cutadapt tool. (Multiplexed sequences prepared with the EMP protocol, where barcode reads are in a separate file, as always can be demultiplexed with the q2-demux plugin.) The following tutorial utilizes a toy dataset to illustrate some of the methods in q2-cutadapt.

Download data used in this tutorial

forward.fastq.gz (770 Bytes)
metadata.tsv (53 Bytes)

The data here consists of single-end reads (6 reads total). There are two samples present in the data, with the following barcodes on the 5' end:

Sample    Barcode

Import the multiplexed sequences

$ qiime tools import \
  --type MultiplexedSingleEndBarcodeInSequence \
  --input-path forward.fastq.gz \
  --output-path multiplexed-seqs.qza

Demultiplex the reads

$ qiime cutadapt demux-single \
  --i-seqs multiplexed-seqs.qza \
  --m-barcodes-file metadata.tsv \
  --m-barcodes-column Barcode \
  --p-error-rate 0 \
  --o-per-sample-sequences demultiplexed-seqs.qza \
  --o-untrimmed-sequences untrimmed.qza \

Trim adapters from demultiplexed reads

If there are sequencing adapters or PCR primers in the reads which you'd like to remove, you can do that next as follows.

$ qiime cutadapt trim-single \
  --i-demultiplexed-sequences demultiplexed-seqs.qza \
  --p-front GCTACGGGGGG \
  --p-error-rate 0 \
  --o-trimmed-sequences trimmed-seqs.qza \

Summarize demultiplexed and trimmed reads

$ qiime demux summarize \
  --i-data trimmed-seqs.qza \
  --o-visualization trimmed-seqs.qzv
$ qiime tools view trimmed-seqs.qzv

Regarding paired-end reads

  • The import format for paired-end reads with the barcodes still in the sequence is MultiplexedPairedEndBarcodeInSequence - this format expects two files in a directory (forward.fastq.gz and reverse.fastq.gz).
  • Demultiplexing currently only works if the barcodes are in the forward reads --- we plan to support dual-indexing strategies in a future release of QIIME 2.
  • Demultiplexing is accomplished with the demux-paired command.
  • Filtering/trimming is accomplished with the trim-paired command.
Import multiplexed R1.fastq and R2.fastq with mixed forward and reverse reads + truncate reverse primer
Create barcode file
Problems with fastq files paired end without barcode file
Demultiplexing Help
QIIME 2 2017.12 release is now live!
Multiplexing fastq files paired end without barcode file
Help with using cutadapt
Problems with q2-cutadapt multiplexed paired end sequences without sequence ID lines or quality scores
Help Importing demultiplex paired end files with barcodes in head (only two files, files not separated by sample)
Import Ion .fastq file
Demultiplexing- Paired-end- Barcode
How to use the mapping file (.txt) as a barcode.fastq.gz file in qiime import tool?
Slight typo in Atacama tutorial
Request for help with Barcode or Metafile
How to import paired-end fastq files
How to join sequences from different libraries sequenced in miseq
Demuz single-end Mismatched sequence ids
Using different primer sets to amplify two different hypervariable regions on one illumina run
How to remove primer with different length
Importing Multiplexed Fastq Downloaded from SRA
trimming sequencing adapter, barcodes, pad, link, and primer sequence
Demultiplex without barcode file
QIIME 2用户文档. 03老司机上路指南Experience(2019.7)
does q2-cutadapt support dual indexed reads?
does q2-cutadapt support dual indexed reads?
I want to import multiplexed paired end reads but I have no barcodes.fastq.gz
Ion Torrent Importing data
How to import Roche 454 pyrosequencing data in QIIME2 without using QIIME1?
Qiita download with no raw data
Using FeatureData[Taxonomy] artifact in QIIME2?
.txt to .fastq.gz file for barcodes from Ion Torrent Sequencing
Illumina demultiplexed data with inline index sequences (index5+index7)
How to prepare the barcodes.fastq.file
Extracting V4 region from V3-V4 data
Import from multiple GaIIx lanes
Importing and Demultiplexing Sequence Data Quick Reference
Error when trying to demultiplex with cutadapt
regarding the barcodes
Prepare Metadata for pair-end sequencing data
Extract the barcodes from the paired-end reads
Demultiplexed-seqs.qza is invalid
Demultiplexing sequences with barcodes
raw paired sequences were mixed
Joining paired end reads and removing primers
quality scores boxplot bad quality
Sequences importing results low sequence count
How do I know if my sequences have the adapters?
use qiime1 to generate barcode.fastq.gz before using qiime2 to analyze 16s RNA
Using trimmomatic before qiime2
Primer-embedded dual-indexed paired-end data importing
Importing format with multiplexed fastq format, single read iwth barcode data in the reads, both forward and reverse directions
Reads processing with different primers
New into QIIME2 and need help importing Data
QIIME 2 processing comparatively to QIIME 1
Importing ubam files into qiime
Miseq paired-end data with no barcodes
Analysis of fastq files
Demultiplexing Help
Replace barcode sequence with sample-Id
Replace barcode sequence with sample-Id
Cutadapt with barcodes in reverse read
Different taxa result from DADA2 and Deblur
How to import multiplexed data?
Analyzing variable length joined paired-end reads with Deblur
Issue with Bray-Curtis PCOA
My libraries contain reads from _two_ variable regions - how can I proceed with the analysis?
Split samples in different files
Demuliplex-sequences still contan primers, how can you run DADA2?
Separating two different amplicons from demultiplexed data
Importing data, barcode read files missing
Degenerate Primer
Workflow for illumina demultiplexed paired end data
Summarizing & denoising DNASequencesDirectoryFormat .qza files
Truncating reads with multiple sequencing runs and different primers
2 Fastq Files - Trying To Import Into Qiime2
Is there a way to use a FASTA/QUAL file for the moving pictures tutorial?

Hi, do you know If in the new version of qiime (2) there is a command that make me paired or do this using the barcode of the forward primer and reverse primer at the same time, in order to differentiate a sample?

Hi @Steph_Hp!

I’m not quite sure what you’re asking for here, but q2-cutadapt supports demultiplexing paired-end reads, and trimming paired-end reads.

This sounds like dual-indexing – please see my note from above:

Hope that answers your questions, if not please let me know! Thanks! :t_rex:

An off-topic reply has been split into a new topic: How to demux dual-indexed reads

Please keep replies on-topic in the future.

An off-topic reply has been split into a new topic: Cutadapt trim iontorrent data

Please keep replies on-topic in the future.

An off-topic reply has been split into a new topic: Dual indexing options?

Please keep replies on-topic in the future.

An off-topic reply has been split into a new topic: metadata types specification raises error with cutadapt

Please keep replies on-topic in the future.

A post was split to a new topic: does q2-cutadapt support dual indexed reads?

A post was split to a new topic: importing fastq files and naming conventions

2 posts were split to a new topic: how do I concatenate reads?

A post was split to a new topic: Cutadapt Multicore flag

Hi @thermokarst: is it supported by now if forward and backward sequences have barcodes? If not do you have an estimate when?


Support for certain types of dual-indexing strategies was added to q2-cutadapt almost 1 year ago:


A post was split to a new topic: Tutorial for demuxing paired-end reads with barcodes and primers

A post was split to a new topic: No samples found demultiplexing error

A post was split to a new topic: My data is demultiplexed and I just imported them

A post was split to a new topic: Cutadapt demultiplexing with mixed primers

An off-topic reply has been split into a new topic: I am interested in analyzing paired end reads

Please keep replies on-topic in the future.