# Regex Problem using Import tool on QIIME2 for Galaxy

**URL:** <https://help.galaxyproject.org/t/regex-problem-using-import-tool-on-qiime2-for-galaxy/9716>\
**Category:** Uncategorized\
**Tags:** qiime2\
**Created:** [March 24, 2023, 3:54pm UTC](https://help.galaxyproject.org/t/regex-problem-using-import-tool-on-qiime2-for-galaxy/9716 "2023-03-24T15:54:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sashaphex](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/sashaphex/32/4136_2.png) [@sashaphex](https://help.galaxyproject.org/u/sashaphex)\
**Post date:** [March 24, 2023, 3:54pm UTC](https://help.galaxyproject.org/t/regex-problem-using-import-tool-on-qiime2-for-galaxy/9716/1 "2023-03-24T15:54:45Z")

</div>

I’m trying to use the ‘qiime2 tools import’ for SampleData[SequencesWithQuality] with ‘Single Lane Per Sample Single End Fastq Directory Format’.  
I think I’ve correctly build the manifest and metada files. But I keep getting the same persistent error regarding the element ‘name’.  
This parameter asks me for “Filename to import the data as. Must match regex: .+\_.+\_L[0-9][0-9][0-9]\_R[12]\_001.fastq.gz” but it doesn’t matter which name I try it always seems to fail, so Galaxy doesn’t even execute my job.  
I’ve also tried to look up RegEx matchers to know if my created name would be suitable but these don’t seem to be helpful.  
Can you help me in this matter? I’m not really a coder hahaha but I really want to understand this.

p.s. everything runs perfectly when i’m using QIIME2 on command line, the problem seems to be nested in galaxy… (which I prefer because buttons)

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [March 24, 2023, 8:10pm UTC](https://help.galaxyproject.org/t/regex-problem-using-import-tool-on-qiime2-for-galaxy/9716/2 "2023-03-24T20:10:11Z")

</div>

**Update:**

The import function has more discussion cross posted over at the EU Matrix chat → [You're invited to talk on Matrix](https://matrix.to/#/!pTWTMgjwPzvoMkeBrf:gitter.im/$BhKT4FxIx36DBuzuj6SQhmZr1vQCd0qvl4NHLKKJ0mM?via=gitter.im&via=matrix.org&via=t2bot.io)

* * *

Welcome, @sashaphex

The “element identifiers” are the names of the files inside the collection. When creating a collection, the file extensions are usually removed – that is why the extra option to add them back in is also listed.

Tools in the Collection Operations tool group can be used for renaming element identifiers. Is that what you are doing?

Example for using the tool when run in Galaxy. Note that the naming is more specific than command line (technical reasons…). If sample ids are included in any other inputs, the naming should be consistent.

> ##### SampleIdIndexedSingleEndPerSampleDirFmt
> 
> Single-end reads in fastq.gz files where base filename is the sample id
> 
> The full file name, minus the extension (.fastq.gz) is the sample id.
> 
> - **sample-42\_S1\_L001\_R1\_001.fastq.gz** is **sample-42\_S1\_L001\_R1\_001**

* * *

Please post back a few of the element identifiers names if you would like more help. You could also post a shared history link. [Troubleshooting errors](https://training.galaxyproject.org/training-material/faqs/galaxy/analysis_troubleshooting.html)

---

<div class="post-metadata">

**Author:** ![sashaphex](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/sashaphex/32/4136_2.png) [@sashaphex](https://help.galaxyproject.org/u/sashaphex)\
**Post date:** [March 28, 2023, 1:29pm UTC](https://help.galaxyproject.org/t/regex-problem-using-import-tool-on-qiime2-for-galaxy/9716/3 "2023-03-28T13:29:11Z")

</div>

Hey @jennaj  
Thanks for such a quick response.  
My problem lies here:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/galaxy/original/2X/0/081b52ac387d14bc989203524dd14b556bfeb94c.png)  
I can’t seem to progress after this step because I can’t even execute my job…  
Do you know how I could solve this or maybe if there is a way to work around it? Maybe the collection method was you mentioned?

p.s. thank you for the access to the EU Matrix chat, I will also check there for insight

---

<div class="post-metadata">

**Author:** ![sashaphex](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/sashaphex/32/4136_2.png) [@sashaphex](https://help.galaxyproject.org/u/sashaphex)\
**Post date:** [March 28, 2023, 4:08pm UTC](https://help.galaxyproject.org/t/regex-problem-using-import-tool-on-qiime2-for-galaxy/9716/4 "2023-03-28T16:08:38Z")

</div>

Meanwhile in the Matrix people already helped me with this problem.

So for the data “ARA.SOIL.1fastq.gz”, the name “ARA\_S1\_L001\_R1\_001.fastq.gz” doesn’t create an error.

Hope this helps anyone having the same problem.

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [April 12, 2023, 5:22pm UTC](https://help.galaxyproject.org/t/regex-problem-using-import-tool-on-qiime2-for-galaxy/9716/5 "2023-04-12T17:22:15Z")

</div>

Split this topic on April 12, 2023, 5:22pm UTC

A post was split to a new topic: [Troubleshooting Galaxy Docker](https://help.galaxyproject.org/t/troubleshooting-galaxy-docker/9836)
