# qiime tools import or export altering fastq names?

**URL:** https://forum.qiime2.org/t/qiime-tools-import-or-export-altering-fastq-names/23742
**Category:** Technical Support
**Tags:** export, import
**Created:** [July 29, 2022, 3:12pm UTC](https://forum.qiime2.org/t/qiime-tools-import-or-export-altering-fastq-names/23742 "2022-07-29T15:12:57Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![M\_R](https://forum.qiime2.org/user_avatar/forum.qiime2.org/m_r/32/7080_2.png) [@M\_R](https://forum.qiime2.org/u/M_R)
#### Post date: [July 29, 2022, 3:12pm UTC](https://forum.qiime2.org/t/qiime-tools-import-or-export-altering-fastq-names/23742/1 "2022-07-29T15:12:57Z")

</div>

Hi fellow qiime2 users,

So, i'm having this small issue in which my fastq-files names come out different from what is in the manifest file. Example

Manifest file (I replaced part of the path with `...` to make it a bit more readable):

```auto
sample-id,absolute-filepath,direction
2020.10.Rotavirus.S0001,/hpc/.../demultiplexed_renamed/2020.10.Rotavirus.S0001_S1_L001_R1_001.fastq.gz,forward
2020.10.Rotavirus.S0001,/hpc/.../demultiplexed_renamed/2020.10.Rotavirus.S0001_S1_L001_R2_001.fastq.gz,reverse
2020.10.Rotavirus.S0002,/hpc/.../demultiplexed_renamed/2020.10.Rotavirus.S0002_S2_L001_R1_001.fastq.gz,forward
2020.10.Rotavirus.S0002,/hpc/.../demultiplexed_renamed/2020.10.Rotavirus.S0002_S2_L001_R2_001.fastq.gz,reverse

```

File names after `qiime tools export`:

```auto
2020.10.Rotavirus.S0001_0_L001_R1_001.fastq.gz
2020.10.Rotavirus.S0001_1_L001_R2_001.fastq.gz
2020.10.Rotavirus.S0002_2_L001_R1_001.fastq.gz
2020.10.Rotavirus.S0002_3_L001_R2_001.fastq.gz

```

So, basically the 'S' number is changed to an increasing number starting from 0 for the first file and up to the amount of files exported...Now, I wouldn't really mind if this number would be the same for the R1 AND R2 files of a particular sample. So, if the '0' was there for the R2 of sample S0001 as well, for example. But it doesn't seem right to have different labels for the forward and reverse fastq-files of the same sample.

Now, I see in your documents [here](https://docs.qiime2.org/2022.2/tutorials/importing/) that you use a slightly different manifest format. On the other hand the MANIFEST that is generated by Qiime2 after exporting has the same format as my manifest-file:

```auto
sample-id,filename,direction
2020.10.Rotavirus.S0001,2020.10.Rotavirus.S0001_0_L001_R1_001.fastq.gz,forward
2020.10.Rotavirus.S0001,2020.10.Rotavirus.S0001_1_L001_R2_001.fastq.gz,reverse
2020.10.Rotavirus.S0002,2020.10.Rotavirus.S0002_2_L001_R1_001.fastq.gz,forward
2020.10.Rotavirus.S0002,2020.10.Rotavirus.S0002_3_L001_R2_001.fastq.gz,reverse

```

Is the difference in manifest format the reason for this "renaming"? I don't think that's supposed to be it, since I thought this other format would be only compatible with `PairedEndFastqManifestPhred33V2` and I'm using `PairedEndFastqManifestPhred33` (the non-V2 parameter). I'm also not entirely sure if it's going wrong during import or export. On the bright side, it doesn't seem to have any negative effect on the rest of the analyses, which I thought it might at first. So, it's not a huge issue, but still a bit annoying.

---

<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: [August 2, 2022, 6:12pm UTC](https://forum.qiime2.org/t/qiime-tools-import-or-export-altering-fastq-names/23742/2 "2022-08-02T18:12:14Z")

</div>



---

<div class="post-metadata">

### Author: ![Keegan-Evans](https://forum.qiime2.org/user_avatar/forum.qiime2.org/keegan-evans/32/10422_2.png) [@Keegan-Evans](https://forum.qiime2.org/u/Keegan-Evans)
#### Post date: [August 5, 2022, 6:05pm UTC](https://forum.qiime2.org/t/qiime-tools-import-or-export-altering-fastq-names/23742/4 "2022-08-05T18:05:27Z")

</div>

@M_R,  
This is happening during the import process, the value that is being changed is the barcode(which as long as it is unique, does not matter), checkout the import transformer if you want to see [where this is happening](https://github.com/qiime2/q2-types/blob/9d968462b448809d89880647fbbd41919eab2cc8/q2_types/per_sample_sequences/_util.py#L254). This is similar to how Casava handles the file names as well.

---

<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: [August 5, 2022, 8:43pm UTC](https://forum.qiime2.org/t/qiime-tools-import-or-export-altering-fastq-names/23742/5 "2022-08-05T20:43:22Z")

</div>



---

<div class="post-metadata">

### Author: ![M\_R](https://forum.qiime2.org/user_avatar/forum.qiime2.org/m_r/32/7080_2.png) [@M\_R](https://forum.qiime2.org/u/M_R)
#### Post date: [August 15, 2022, 8:14am UTC](https://forum.qiime2.org/t/qiime-tools-import-or-export-altering-fastq-names/23742/6 "2022-08-15T08:14:10Z")

</div>

Thanks for the reply!

So, there's no "option/parameter" to fix this, right? I mean, it's indeed not that serious, but would have preferred for R1 and R2 versions of a sample to only differ in that, R1 and R2, and so preferably the rest of the sample label to be identical.  
I have also found that when I import reads directly, so not though a manifest file, it actually gives me the results that I'm looking for. So, for some reason it's when a manifest file is involved that this issue arises.

But like I said, it's a minor annoyance, so I can live with it.

---

<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: [August 15, 2022, 6:56pm UTC](https://forum.qiime2.org/t/qiime-tools-import-or-export-altering-fastq-names/23742/7 "2022-08-15T18:56:30Z")

</div>



---

<div class="post-metadata">

### Author: ![Keegan-Evans](https://forum.qiime2.org/user_avatar/forum.qiime2.org/keegan-evans/32/10422_2.png) [@Keegan-Evans](https://forum.qiime2.org/u/Keegan-Evans)
#### Post date: [August 15, 2022, 10:10pm UTC](https://forum.qiime2.org/t/qiime-tools-import-or-export-altering-fastq-names/23742/8 "2022-08-15T22:10:32Z")

</div>

Unfortunately not, it is not something we have been asked for before/it is important that they are unique. Glad there is another import method that is doing exactly what you want!

---

<div class="post-metadata">

### Author: ![Keegan-Evans](https://forum.qiime2.org/user_avatar/forum.qiime2.org/keegan-evans/32/10422_2.png) [@Keegan-Evans](https://forum.qiime2.org/u/Keegan-Evans)
#### Post date: [August 15, 2022, 10:10pm UTC](https://forum.qiime2.org/t/qiime-tools-import-or-export-altering-fastq-names/23742/9 "2022-08-15T22:10:35Z")

</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: [September 16, 2022, 4:11am UTC](https://forum.qiime2.org/t/qiime-tools-import-or-export-altering-fastq-names/23742/10 "2022-09-16T04:11:08Z")

</div>

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