# Loss of data in demux emp-single

**URL:** <https://forum.qiime2.org/t/loss-of-data-in-demux-emp-single/22911>\
**Category:** User Support\
**Tags:** emp, demux\
**Created:** [April 27, 2022, 8:37pm UTC](https://forum.qiime2.org/t/loss-of-data-in-demux-emp-single/22911 "2022-04-27T20:37:58Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![gaberunte](https://forum.qiime2.org/user_avatar/forum.qiime2.org/gaberunte/32/13342_2.png) [@gaberunte](https://forum.qiime2.org/u/gaberunte)\
**Post date:** [April 27, 2022, 8:37pm UTC](https://forum.qiime2.org/t/loss-of-data-in-demux-emp-single/22911/1 "2022-04-27T20:37:58Z")

</div>

I am losing the vast majority of my reads when demultiplexing. Over 90%. I am using the following code:

```bash
qiime demux emp-single \
--m-barcodes-file mapping.tsv \
--m-barcodes-column barcode \
--i-seqs imported_data_forward.qza \
--p-rev-comp-mapping-barcodes \
--o-per-sample-sequences demux_forward.qza \ 
--o-error-correction-details demux_error.qza 

```

I have seen other posts where the direction of the barcode can fix the issue but that is not the case here as far as I can tell.

I am running Qiime2 2022.2 using conda on a M1 Mac. Any help on this would be super appreciated! Thank you.

---

<div class="post-metadata">

**Author:** ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)\
**Post date:** [May 3, 2022, 4:34pm UTC](https://forum.qiime2.org/t/loss-of-data-in-demux-emp-single/22911/2 "2022-05-03T16:34:59Z")

</div>



---

<div class="post-metadata">

**Author:** ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)\
**Post date:** [May 5, 2022, 4:55pm UTC](https://forum.qiime2.org/t/loss-of-data-in-demux-emp-single/22911/3 "2022-05-05T16:55:00Z")

</div>

Hi @gaberunte,

Welcome to the :qiime2: forum!

It's hard to say for sure what is going on without looking at your barcodes file and associated sequences - but I suspect there may be some barcode mismatching going on if you are losing almost all of your reads when demultiplexing. I would run a quick manual inspection of a few barcodes within your barcode file to make sure they match up in your sequence file, that you're identifying the correct `barcodes-column` (i.e. that barcode is the correct column), and that the barcode sequence reads should in fact be reverse complemented prior to demultiplexing.

If all of that seems reasonable - if you're comfortable with sharing your barcodes file and sequence data (private message is fine if you'd prefer not sharing publicly on the forum), I can take a closer look and see if anything stands out on my end!

Cheers 🦎

---

<div class="post-metadata">

**Author:** ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)\
**Post date:** [May 5, 2022, 4:55pm UTC](https://forum.qiime2.org/t/loss-of-data-in-demux-emp-single/22911/4 "2022-05-05T16:55:03Z")

</div>



---

<div class="post-metadata">

**Author:** ![gaberunte](https://forum.qiime2.org/user_avatar/forum.qiime2.org/gaberunte/32/13342_2.png) [@gaberunte](https://forum.qiime2.org/u/gaberunte)\
**Post date:** [May 5, 2022, 6:16pm UTC](https://forum.qiime2.org/t/loss-of-data-in-demux-emp-single/22911/5 "2022-05-05T18:16:31Z")

</div>

Thank you for the reply!

I attempted to manually inspect a few barcodes and got a number of hits on each, though I am not certain that means everything is fit to go. When I run the demux, it is not that I get no hits, but that I get only a couple hundred reads per sample rather than tens of thousands. I have attempted to run in in both rev-com directions and ` --p-rev-comp-mapping-barcodes`  
returns the limited read could while `--p-no-rev-comp-mapping-barcodes` does not return anything. Thank you for any help with this.

The files are too large to upload here, but the sequences and qiime objects I have created are in this [google drive folder](https://drive.google.com/drive/folders/16Kju00JQEpimVvpX6tveMQayorICDIZw?usp=sharing)!

---

<div class="post-metadata">

**Author:** ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)\
**Post date:** [May 5, 2022, 6:34pm UTC](https://forum.qiime2.org/t/loss-of-data-in-demux-emp-single/22911/6 "2022-05-05T18:34:22Z")

</div>



---

<div class="post-metadata">

**Author:** ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)\
**Post date:** [May 12, 2022, 8:55pm UTC](https://forum.qiime2.org/t/loss-of-data-in-demux-emp-single/22911/7 "2022-05-12T20:55:01Z")

</div>

Hi @gaberunte,

Apologies for the delay in response on this!

Thanks for providing all of your data - I took a look at your demux details, and did see that high read loss. I tried re-running demux emp-single with both `--p-rev-comp-mapping-barcodes` and `--p-rev-comp-barcodes` and the sequence retention was much higher (around 75%).

I double checked that golay error correction wasn't leaving out any sequences as well by re-running emp-single with just `--p-no-golay-error-correction` but only retained around 60% of the sequences.

It seems like the quality of your barcodes is why we're only seeing around a 75% sequence retention when demultiplexing - but with that being said, you should still be able to work with this vs. losing almost all of your reads.

So, just to recap - you'll see much higher sequence retention when running the following command:

```auto
qiime demux emp-single \
--m-barcodes-file mapping.tsv \
--m-barcodes-column barcode \
--i-seqs imported_data_forward.qza \
--p-rev-comp-barcodes \
--p-rev-comp-mapping-barcodes \
--o-per-sample-sequences demux_forward.qza \ 
--o-error-correction-details demux_error.qza

```

Hope this helps!

Cheers 🦎

---

<div class="post-metadata">

**Author:** ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)\
**Post date:** [May 12, 2022, 8:55pm UTC](https://forum.qiime2.org/t/loss-of-data-in-demux-emp-single/22911/8 "2022-05-12T20:55:06Z")

</div>



---

<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:** [May 13, 2022, 3:44pm UTC](https://forum.qiime2.org/t/loss-of-data-in-demux-emp-single/22911/10 "2022-05-13T15:44:17Z")

</div>



---

<div class="post-metadata">

**Author:** ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)\
**Post date:** [May 13, 2022, 6:20pm UTC](https://forum.qiime2.org/t/loss-of-data-in-demux-emp-single/22911/11 "2022-05-13T18:20:27Z")

</div>

Hi @gaberunte,

Another thing that you may want to do is reach out to your sequencing center to confirm what the correct orientation of your barcode sequences is, and whether or not they are Golay barcodes. It _seems_ as though they are Golay and should be reverse complimented (based on the results from my previous message) - but it would be best to confirm with them so that you know for sure!

Cheers 🦎

---

<div class="post-metadata">

**Author:** ![lizgehret](https://forum.qiime2.org/user_avatar/forum.qiime2.org/lizgehret/32/17128_2.png) [@lizgehret](https://forum.qiime2.org/u/lizgehret)\
**Post date:** [May 13, 2022, 6:20pm UTC](https://forum.qiime2.org/t/loss-of-data-in-demux-emp-single/22911/12 "2022-05-13T18:20:32Z")

</div>



---

<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:** [June 14, 2022, 12:21am UTC](https://forum.qiime2.org/t/loss-of-data-in-demux-emp-single/22911/13 "2022-06-14T00:21:09Z")

</div>

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