# Create barcode file

**URL:** https://forum.qiime2.org/t/create-barcode-file/3285
**Category:** User Support
**Tags:** import
**Created:** [March 2, 2018, 3:36pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285 "2018-03-02T15:36:52Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![cecibe](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/c/edb3f5/32.png) [@cecibe](https://forum.qiime2.org/u/cecibe)
#### Post date: [March 2, 2018, 3:36pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285/1 "2018-03-02T15:36:52Z")

</div>

Hi, I am new in qiime2 and I do not find how to create the barcode.fastq.gz file. I have a mapping file (which conteins a column with the barcodes and 2 fastq.gz files whit the sequences. Can ou help me? Thanks

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [March 2, 2018, 4:36pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285/3 "2018-03-02T16:36:30Z")

</div>

Hi @cecibe,  
Where your barcodes are is all going to depend on how you constructed your sequencing library. Your 2 fastqs are probably the forward/reverse reads, and the barcodes may be in-line in the sequences or in the header lines — it is impossible to know without getting that information from the source (or you could check the first N nucleotides on each sequence to see if these match the barcodes in your sample metadata file). Check with the sequencing center, lab, or whoever did the library prep/sequencing, that's the surest way to know.

Once you figure out where the barcodes are, I can point you in the direction of the correct method for importing/demultiplexing.

Good luck!

---

<div class="post-metadata">

### Author: ![cecibe](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/c/edb3f5/32.png) [@cecibe](https://forum.qiime2.org/u/cecibe)
#### Post date: [March 5, 2018, 3:17pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285/5 "2018-03-05T15:17:18Z")

</div>

Hi Nicholas, thaks for your help. I checked the first lines of my sequences and I found that the barcodes are in the sequences (the first 8 nucleotides) Can you give point me the correct method for doing the barcodes.fastq. gz file I need? thanks a lot!

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [March 5, 2018, 3:17pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285/6 "2018-03-05T15:17:29Z")

</div>



---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [March 5, 2018, 3:45pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285/7 "2018-03-05T15:45:56Z")

</div>

Hi @cecibe,

> [@cecibe](#):
>
> I checked the first lines of my sequences and I found that the barcodes are in the sequences (the first 8 nucleotides)

Excellent! There is no need to create a barcodes.fastq file. [This tutorial](https://forum.qiime2.org/t/demultiplexing-and-trimming-adapters-from-reads-with-q2-cutadapt/2313) covers the data type that you describe. See the note at the bottom of the tutorial for how to use paired-end data (as you have), since the steps provided are actually for single-end reads.

I hope that helps!

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [March 5, 2018, 3:45pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285/8 "2018-03-05T15:45:57Z")

</div>



---

<div class="post-metadata">

### Author: ![cecibe](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/c/edb3f5/32.png) [@cecibe](https://forum.qiime2.org/u/cecibe)
#### Post date: [March 6, 2018, 3:04pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285/9 "2018-03-06T15:04:07Z")

</div>

Hi Nicholas, thanks a lot for your help. I did what you told me before and I have now other error messages:  
Plugin error from cutadapt:

/tmp/qiime2-archive-vy23qd4b/4f213eec-1cd8-4539-be27-4de892120423/data/reverse.fastq.gz is not a file.

Debug info has been saved to /tmp/qiime2-q2cli-err-ea0vocis.log

Can you help me again?

Cecilia

---

<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: [March 6, 2018, 3:35pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285/10 "2018-03-06T15:35:22Z")

</div>



---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [March 6, 2018, 3:42pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285/11 "2018-03-06T15:42:20Z")

</div>

Hi @cecibe,  
Could you please specify the command that you are running, and provide the full error message? (that message will either be in that log file, /tmp/qiime2-q2cli-err-ea0vocis.log, or you can display by running that command with the `--verbose` flag)

Thanks!

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [March 6, 2018, 3:42pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285/12 "2018-03-06T15:42:21Z")

</div>



---

<div class="post-metadata">

### Author: ![cecibe](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/c/edb3f5/32.png) [@cecibe](https://forum.qiime2.org/u/cecibe)
#### Post date: [March 6, 2018, 4:02pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285/13 "2018-03-06T16:02:56Z")

</div>

I wrote:  
qiime cutadapt demux-paired --i-seqs prueba.qza --m-forward-barcodes-file metadate.tsv --m-forward-barcodes-column BarcodeSequence --o-per-sample-sequences demultiplexed-seqs.qza --o-untrimmed-sequences untrimmed.qza  
And it appered:  
Plugin error from cutadapt:

/tmp/qiime2-archive-vy23qd4b/4f213eec-1cd8-4539-be27-4de892120423/data/reverse.fastq.gz is not a file.

Debug info has been saved to /tmp/qiime2-q2cli-err-ea0vocis.log

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [March 6, 2018, 4:13pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285/14 "2018-03-06T16:13:25Z")

</div>

Could you please run that command again, but add `--verbose` to the end of the command? And share the output here.

Please also share the commands that you used to import your sequences to `prueba.qza`, and list the contents of the sequences directory that you imported (you can use `ls name_of_folder`).

Thank you.

---

<div class="post-metadata">

### Author: ![cecibe](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/c/edb3f5/32.png) [@cecibe](https://forum.qiime2.org/u/cecibe)
#### Post date: [March 6, 2018, 4:23pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285/15 "2018-03-06T16:23:07Z")

</div>

I imported whit:  
(qiime2-2018.2) lab678@lab678-System-Product-Name:~/Documentos$ cd prueba  
(qiime2-2018.2) lab678@lab678-System-Product-Name:~/Documentos/prueba$ ls  
forward.fastq.gz reverse.fastq.gz  
(qiime2-2018.2) lab678@lab678-System-Product-Name:~/Documentos/prueba$ cd ..  
(qiime2-2018.2) lab678@lab678-System-Product-Name:~/Documentos$ qiime tools import --type MultiplexedPairedEndBarcodeInSequence --input-path prueba --output-path prueba.qza  
(qiime2-2018.2) lab678@lab678-System-Product-Name:~/Documentos$ ls  
341 metadate.tsv prueba prueba.qza

Now I wrote:  
(qiime2-2018.2) lab678@lab678-System-Product-Name:~/Documentos$ qiime cutadapt demux-paired --i-seqs prueba.qza --m-forward-barcodes-file metadate.tsv --m-forward-barcodes-column BarcodeSequence --o-per-sample-sequences demultiplexed-seqs.qza --o-untrimmed-sequences untrimmed.qza --verbose  
And appeared this error message:  
Plugin error from cutadapt:

/tmp/qiime2-archive-t2i5zu5b/4f213eec-1cd8-4539-be27-4de892120423/data/reverse.fastq.gz is not a file.

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [March 6, 2018, 5:11pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285/16 "2018-03-06T17:11:51Z")

</div>

Could you please run this command and post the output:

```auto
qiime tools validate prueba.qza

```

This issue may also be related to file system permissions, as described in [this thread](https://forum.qiime2.org/t/demux-emp-single-error-in-moving-pictures-tutorial/2701/3). Do you want to try running the different diagnostic steps described by the moderator in that thread and see if, e.g., changing your TMPDIR solves the issue?

Thanks!

---

<div class="post-metadata">

### Author: ![cecibe](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/c/edb3f5/32.png) [@cecibe](https://forum.qiime2.org/u/cecibe)
#### Post date: [March 6, 2018, 5:32pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285/17 "2018-03-06T17:32:41Z")

</div>

It answers:  
Artifact prueba.qza appears to be valid at level=max  
I will follow the tutorial you sent me and I will write again, thanks a lot for your help

Cecilia

---

<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: [April 6, 2018, 11:33pm UTC](https://forum.qiime2.org/t/create-barcode-file/3285/18 "2018-04-06T23:33:01Z")

</div>

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