# “EMP protocol” multiplexed paired-end fastq file

**URL:** https://forum.qiime2.org/t/emp-protocol-multiplexed-paired-end-fastq-file/5981
**Category:** User Support
**Tags:** import
**Created:** [September 11, 2018, 4:40pm UTC](https://forum.qiime2.org/t/emp-protocol-multiplexed-paired-end-fastq-file/5981 "2018-09-11T16:40:20Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![laoshiren](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/df788c/32.png) [@laoshiren](https://forum.qiime2.org/u/laoshiren)
#### Post date: [September 11, 2018, 4:40pm UTC](https://forum.qiime2.org/t/emp-protocol-multiplexed-paired-end-fastq-file/5981/1 "2018-09-11T16:40:20Z")

</div>

I'm confused about “EMP protocol” multiplexed paired-end fastq file. Are the barcode sequences in the forward and/or reverse file? If not, how does this software distinguish which sequences belong to which samples? Actually, my data contain a forward file, a reverse file and a sample-metadata file, but no barcode file here. Every barcode sequence is still in the forward and/or reverse file, tegother with my reads sequence...how should I cut away the barcode from my data?

---

<div class="post-metadata">

### Author: ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)
#### Post date: [September 11, 2018, 6:08pm UTC](https://forum.qiime2.org/t/emp-protocol-multiplexed-paired-end-fastq-file/5981/2 "2018-09-11T18:08:30Z")

</div>

Hi @laoshiren,

> [@laoshiren](#):
>
> Are the barcode sequences in the forward and/or reverse file? If not, how does this software distinguish which sequences belong to which samples? Actually, my data contain a forward file, a reverse file and a sample-metadata file, but no barcode file here. Every barcode sequence is still in the forward and/or reverse file, tegother with my reads sequence…how should I cut away the barcode from my data?

Neither actually. There will be a third file (something like Unnamed R3 or Index) which contains _only_ the barcodes, but in the same order as the other reads. That allows QIIME to demultiplex.

It sounds like you need to use `cutadapt demux-paired` instead as your barcodes are _within_ the reads.  
Are your barcodes the same between the two directions (e.g. redundant) or are they combinatoric (often called dual-indexed reads)?

---

<div class="post-metadata">

### Author: ![laoshiren](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/df788c/32.png) [@laoshiren](https://forum.qiime2.org/u/laoshiren)
#### Post date: [September 12, 2018, 5:01pm UTC](https://forum.qiime2.org/t/emp-protocol-multiplexed-paired-end-fastq-file/5981/3 "2018-09-12T17:01:49Z")

</div>

The are combinatoric. They are different between two directions. For example, in one of my data, the forward barcode is GGAATGAC, and the reverse barcode is CGTACGAC.

---

<div class="post-metadata">

### Author: ![laoshiren](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/df788c/32.png) [@laoshiren](https://forum.qiime2.org/u/laoshiren)
#### Post date: [September 12, 2018, 5:01pm UTC](https://forum.qiime2.org/t/emp-protocol-multiplexed-paired-end-fastq-file/5981/4 "2018-09-12T17:01:50Z")

</div>

I know this common, but it seems like it can only demux the paired-end reads only with the forward barcode in the forward reads...But my forward reads have the farward barcode and the reverse reads also have reverse barcode (at the forefront of the reads, not inside).. What can I do?

---

<div class="post-metadata">

### Author: ![laoshiren](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/df788c/32.png) [@laoshiren](https://forum.qiime2.org/u/laoshiren)
#### Post date: [September 12, 2018, 5:02pm UTC](https://forum.qiime2.org/t/emp-protocol-multiplexed-paired-end-fastq-file/5981/5 "2018-09-12T17:02:07Z")

</div>

I'm running 'qiime cutadapt demux-paired', but I got some error...  
File "/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/q2cli/commands.py", line 274, in **call**  
results = action(\*\*arguments)  
File "", line 2, in demux\_paired  
File "/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/action.py", line 231, in bound\_callable  
output\_types, provenance)  
File "/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/action.py", line 362, in _callable\_executor_  
output\_views = self.\_callable(\*\*view\_args)  
File "/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/q2\_cutadapt/\_demux.py", line 136, in demux\_paired  
return \_demux(seqs, forward\_barcodes, error\_rate, untrimmed)  
File "/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/q2\_cutadapt/\_demux.py", line 109, in \_demux  
run\_command(cmd)  
File "/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/q2\_cutadapt/\_demux.py", line 33, in run\_command  
subprocess.run(cmd, check=True)  
File "/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/subprocess.py", line 398, in run  
output=stdout, stderr=stderr)  
subprocess.CalledProcessError: Command '['cutadapt', '--front', 'file:/tmp/tmp0dwk8czi', '--error-rate', '0.1', '-o', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-rkizuefd/{name}.1.fastq.gz', '--untrimmed-output', '/tmp/q2-MultiplexedPairedEndBarcodeInSequenceDirFmt-la8mbalc/forward.fastq.gz', '-p', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-rkizuefd/{name}.2.fastq.gz', '--untrimmed-paired-output', '/tmp/q2-MultiplexedPairedEndBarcodeInSequenceDirFmt-la8mbalc/reverse.fastq.gz', '/tmp/qiime2-archive-mw6bbrxu/20956bdb-6f4e-4982-b5e7-f2f7b909d336/data/forward.fastq.gz', '/tmp/qiime2-archive-mw6bbrxu/20956bdb-6f4e-4982-b5e7-f2f7b909d336/data/reverse.fastq.gz']' returned non-zero exit status 1

Plugin error from cutadapt:

Command '['cutadapt', '--front', 'file:/tmp/tmp0dwk8czi', '--error-rate', '0.1', '-o', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-rkizuefd/{name}.1.fastq.gz', '--untrimmed-output', '/tmp/q2-MultiplexedPairedEndBarcodeInSequenceDirFmt-la8mbalc/forward.fastq.gz', '-p', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-rkizuefd/{name}.2.fastq.gz', '--untrimmed-paired-output', '/tmp/q2-MultiplexedPairedEndBarcodeInSequenceDirFmt-la8mbalc/reverse.fastq.gz', '/tmp/qiime2-archive-mw6bbrxu/20956bdb-6f4e-4982-b5e7-f2f7b909d336/data/forward.fastq.gz', '/tmp/qiime2-archive-mw6bbrxu/20956bdb-6f4e-4982-b5e7-f2f7b909d336/data/reverse.fastq.gz']' returned non-zero exit status 1

See above for debug info.

---

<div class="post-metadata">

### Author: ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)
#### Post date: [September 12, 2018, 11:48pm UTC](https://forum.qiime2.org/t/emp-protocol-multiplexed-paired-end-fastq-file/5981/6 "2018-09-12T23:48:41Z")

</div>

Hey @laoshiren,

That's a bummer, and it looks like you ran with `--verbose`? Was there anything above this traceback (unfortunately the tracebacks in this plugin are not the _most_ helpful).

Also could you post your full command? Thanks!

---

<div class="post-metadata">

### Author: ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)
#### Post date: [September 12, 2018, 11:54pm UTC](https://forum.qiime2.org/t/emp-protocol-multiplexed-paired-end-fastq-file/5981/7 "2018-09-12T23:54:12Z")

</div>

Sorry scratch that last reply, I've been answering too many questions today and lost track of the thread here!

> [@laoshiren](#):
>
> I know this common, but it seems like it can only demux the paired-end reads only with the forward barcode in the forward reads…But my forward reads have the farward barcode and the reverse reads also have reverse barcode (at the forefront of the reads, not inside)… What can I do?

That is correct, QIIME 2 cannot handle combinatoric/dual-index barcodes. I _think_ bcl2fastq can do this, or you could demultiplex some other way (another user recently used ea-utils for this and some elbow grease).

* * *

Once they are demultiplexed, it should be easy to use QIIME 2. Sorry we don't support dual-indexing yet!

---

<div class="post-metadata">

### Author: ![laoshiren](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/df788c/32.png) [@laoshiren](https://forum.qiime2.org/u/laoshiren)
#### Post date: [September 15, 2018, 7:13am UTC](https://forum.qiime2.org/t/emp-protocol-multiplexed-paired-end-fastq-file/5981/8 "2018-09-15T07:13:57Z")

</div>

Thank you for your reply. Here is my command：  
qiime cutadapt demux-paired --i-seqs BarcodeInSequence.qza --m-forward-barcodes-file Forwrad\_Map.tsv --m-forward-barcodes-column BarcodeSequence --o-per-sample-sequences per-sample-sequences.qza --o-untrimmed-sequences untrimmed-sequences.qza --verbose  
That's the complete log:  
Running external command line application. This may print messages to stdout and/or stderr.  
The command being run is below. This command cannot be manually re-run as it will depend on temporary files that no longer exist.

Command: cutadapt --front file:/tmp/tmp7n1ezihi --error-rate 0.1 -o /tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-0qh\_kxcc/{name}.1.fastq.gz --untrimmed-output /tmp/q2-MultiplexedPairedEndBarcodeInSequenceDirFmt-vpr2b\_bp/forward.fastq.gz -p /tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-0qh\_kxcc/{name}.2.fastq.gz --untrimmed-paired-output /tmp/q2-MultiplexedPairedEndBarcodeInSequenceDirFmt-vpr2b\_bp/reverse.fastq.gz /tmp/qiime2-archive-fumzim\_f/2c5ca3f3-7e5e-4a47-ae12-691c9c7d598e/data/forward.fastq.gz /tmp/qiime2-archive-fumzim\_f/2c5ca3f3-7e5e-4a47-ae12-691c9c7d598e/data/reverse.fastq.gz

This is cutadapt 1.17 with Python 3.5.5  
Command line parameters: --front file:/tmp/tmp7n1ezihi --error-rate 0.1 -o /tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-0qh\_kxcc/{name}.1.fastq.gz --untrimmed-output /tmp/q2-MultiplexedPairedEndBarcodeInSequenceDirFmt-vpr2b\_bp/forward.fastq.gz -p /tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-0qh\_kxcc/{name}.2.fastq.gz --untrimmed-paired-output /tmp/q2-MultiplexedPairedEndBarcodeInSequenceDirFmt-vpr2b\_bp/reverse.fastq.gz /tmp/qiime2-archive-fumzim\_f/2c5ca3f3-7e5e-4a47-ae12-691c9c7d598e/data/forward.fastq.gz /tmp/qiime2-archive-fumzim\_f/2c5ca3f3-7e5e-4a47-ae12-691c9c7d598e/data/reverse.fastq.gz  
Running on 1 core  
Trimming 56 adapters with at most 10.0% errors in paired-end legacy mode ...  
cutadapt: error: Reads are improperly paired. Read name 'FCBP2T9:1:1101:12597:1064#C\_NGTCGAAC\_CANGTAGT/1' in file 1 does not match 'FCBP2T9:1:1101:12597:1064#TNN\_NGTCGAAC\_CANGTAGT/2' in file 2.  
Traceback (most recent call last):  
File "/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/q2cli/commands.py", line 274, in **call**  
results = action(\*\*arguments)  
File "", line 2, in demux\_paired  
File "/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/action.py", line 231, in bound\_callable  
output\_types, provenance)  
File "/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/qiime2/sdk/action.py", line 362, in _callable\_executor_  
output\_views = self.\_callable(\*\*view\_args)  
File "/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/q2\_cutadapt/\_demux.py", line 136, in demux\_paired  
return \_demux(seqs, forward\_barcodes, error\_rate, untrimmed)  
File "/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/q2\_cutadapt/\_demux.py", line 109, in \_demux  
run\_command(cmd)  
File "/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/site-packages/q2\_cutadapt/\_demux.py", line 33, in run\_command  
subprocess.run(cmd, check=True)  
File "/home/qiime2/miniconda/envs/qiime2-2018.8/lib/python3.5/subprocess.py", line 398, in run  
output=stdout, stderr=stderr)  
subprocess.CalledProcessError: Command '['cutadapt', '--front', 'file:/tmp/tmp7n1ezihi', '--error-rate', '0.1', '-o', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-0qh\_kxcc/{name}.1.fastq.gz', '--untrimmed-output', '/tmp/q2-MultiplexedPairedEndBarcodeInSequenceDirFmt-vpr2b\_bp/forward.fastq.gz', '-p', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-0qh\_kxcc/{name}.2.fastq.gz', '--untrimmed-paired-output', '/tmp/q2-MultiplexedPairedEndBarcodeInSequenceDirFmt-vpr2b\_bp/reverse.fastq.gz', '/tmp/qiime2-archive-fumzim\_f/2c5ca3f3-7e5e-4a47-ae12-691c9c7d598e/data/forward.fastq.gz', '/tmp/qiime2-archive-fumzim\_f/2c5ca3f3-7e5e-4a47-ae12-691c9c7d598e/data/reverse.fastq.gz']' returned non-zero exit status 1

---

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [September 17, 2018, 1:14pm UTC](https://forum.qiime2.org/t/emp-protocol-multiplexed-paired-end-fastq-file/5981/9 "2018-09-17T13:14:52Z")

</div>



---

<div class="post-metadata">

### Author: ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)
#### Post date: [September 17, 2018, 8:24pm UTC](https://forum.qiime2.org/t/emp-protocol-multiplexed-paired-end-fastq-file/5981/10 "2018-09-17T20:24:27Z")

</div>

Hey @laoshiren,

> [@laoshiren](#):
>
> ‘FCBP2T9:1:1101:12597:1064#C\_NGTCGAAC\_CANGTAGT/1’ in file 1 does not match ‘FCBP2T9:1:1101:12597:1064#TNN\_NGTCGAAC\_CANGTAGT/2’ in file 2.

I think this is the combinatoric barcodes (dual indexing) causing the issue. We don't have a mechanism to handle that in QIIME 2 yet so you'll need to demultiplex outside of QIIME 2 and then we can import your data normally.

Sorry for the inconvenience!

---

<div class="post-metadata">

### Author: ![ebolyen](https://forum.qiime2.org/user_avatar/forum.qiime2.org/ebolyen/32/11_2.png) [@ebolyen](https://forum.qiime2.org/u/ebolyen)
#### Post date: [September 17, 2018, 8:24pm UTC](https://forum.qiime2.org/t/emp-protocol-multiplexed-paired-end-fastq-file/5981/11 "2018-09-17T20:24:30Z")

</div>



---

<div class="post-metadata">

### Author: ![laoshiren](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/l/df788c/32.png) [@laoshiren](https://forum.qiime2.org/u/laoshiren)
#### Post date: [September 22, 2018, 9:22am UTC](https://forum.qiime2.org/t/emp-protocol-multiplexed-paired-end-fastq-file/5981/12 "2018-09-22T09:22:11Z")

</div>

I see. Thank you very much.

---

<div class="post-metadata">

### Author: ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)
#### Post date: [October 23, 2018, 3:22pm UTC](https://forum.qiime2.org/t/emp-protocol-multiplexed-paired-end-fastq-file/5981/13 "2018-10-23T15:22:15Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
