How to convert FASTQ files to QZA files ?

Hello,

I have PAIRED END READS FASTQ FILES (R1+R2) for each sample merged to one FASTQ file.

All Fastq files are demultiplexed, quality controlled, BARCODES and Primers trimmed.

I need just a command line that allow me to convert ``each fastq file to qza file

Thanks

Hello Meriem,

This sounds related to your previous question about importing data, but I will keep the threads separate for now.

This is good!

This is likely to cause issues.

I recommend importing raw data. Would you like to try that?

1 Like

Hi @colinbrislawn and @M_F!

I am having the same question/issue. I downloaded samples from SRA and after running dada2, I realized that these weren't the RAW fastq files as they were already processed and normalized to 20,000 reads (the authors mentioned it in the methods). When I visualized the table.qzv file, almost all samples had 0 features.

Yep! Getting the raw data is important because it gives you full control of the processing pipeline.

If the authors placed it in another location, you could download it from there... You could also email them to ask! I've had folks ask me about my papers and I have sent them data.

2 Likes

Hi @colinbrislawn
I'm trying to find a clear answer to my request since a weeks but till now i didn't get a clear response allowing me to fix the issue.

The question is if there is a command line that allow me to convert demultiplexed, quality controlled and merged FASTQ files to QZA files ?
It seems that QIIME2 do not provide this command.
I have only demultiplexed and quality controlled FASTQ files not raw data.
Please let me know what can i do in this case ?

Please be patient, as all Qiime2 support is a free service provided voluntarily.

Did you try to use "search" function on the forum?
For example, the first result I am getting is this one. It is very similar to yours, and there is a link to the tutorial. I strongly advise you to read through the tutorial first before asking any additional questions. It contains the command that you are looking for.
The topic I linked also contains links that you can find useful for downstream analyses of your data.

Best,
Timur

1 Like

Hello @timanix ,

Thanks for the suggestion.

The issue is still not fixed. The tutorial you shared cannot help to convert paired end demultiplexed FASTQ files to qza files that could be processed by QIIME2.

I don't have qza files !
i have demultiplexed paired end (R1 + R2 ) fastq files
Even when following the undermentioned tutorial

Casava 1.8 paired-end demultiplexed fastq

Format description

In Casava 1.8 demultiplexed (paired-end) format, there are two fastq.gz files for each sample in the study, each containing the forward or reverse reads for that sample. The file name includes the sample identifier. The forward and reverse read file names for a single sample might look like L2S357_15_L001_R1_001.fastq.gz and L2S357_15_L001_R2_001.fastq.gz, respectively. The underscore-separated fields in this file name are:

  1. the sample identifier,
  2. the barcode sequence or a barcode identifier,
  3. the lane number,
  4. the direction of the read (i.e. R1 or R2), and
  5. the set number.
    qiime tools import
    --type 'SampleData[PairedEndSequencesWithQuality]'
    --input-path casava-18-paired-end-demultiplexed
    --input-format CasavaOneEightSingleLanePerSampleDirFmt
    --output-path demux-paired-end.qza
    I got the following error message
    An unexpected error has occurred:

No format: CasavaOneEightSingleLanePerSampleDirFmt
Please let me know if you have any other suggestion to convert demultiplexed paired end FASTQ files.

Hello!

I am more than sure that this tutorial contains the right information that you need to import your data.

Yes, I remember that from your post. In one of your comments you mentioned that your paired reads are already joined.

I the post I linked in my last response there is a link to the tutorial, which includes one command that can be used for importing prejoined FASTQ files.
Since your reads already merged, you should use the single end fastq manifest format.

Check Importing pre-joined reads part of the tutorial.

Best,

1 Like

Hello @timanix

Thanks for the reply
When using the script you mentioned
qiime tools import
--input-path fj-joined/manifest
--output-path fj-joined-demux.qza
--type SampleData[JoinedSequencesWithQuality]
--input-format SingleEndFastqManifestPhred33V2

I obtained the following error message

An unexpected error has occurred:
No format: SingleEndFastqManifestPhred33V2

How can i fix the issue ?
I did not use Manifest format, could you indicate what they mean by PHRED 33 V2
Any suggestion is welcome

Hi Meriem,
Considering the amount of difficulties you are facing by importing the data, could you share with me / us couple of samples with the manifest file?

I will try to find the way to import it, and in case of positive outcome share the command.

Best,

1 Like

Hi @timanix ,

Please find attached the FASTQ files (R1+R2) of a control sample.
In case of a positive outcome, you can share the command to import data into QIIME and to convert those FASTQ files into qza file.
NB Please note that those paired end Fastq files are already demultiplexed and all the Fastq files that i have are paired end demultiplexed.
Best
Buffer1_S2_L001_R1_001.fastq.gz (399.2 KB)
Buffer1_S2_L001_R2_001.fastq.gz (446.5 KB)

Hello Meriem,

I think that I need to summarize the issue you are having with importing data.

Initially, you wrote that your reads were already merged:

Then, @colinbrislawn provided you with a hint:

However, you wrote the following comment:

While ignoring the hint that you need to work with the raw data and highlighting again that your reads are already merged.

That lead to my answer with the link how to import merged data.
You got an error again, and when I asked you to share the data, you shared the following files:

... raw reads that are not merged :confused: :thinking:

The command that worked:

qiime tools import \
    --type 'SampleData[PairedEndSequencesWithQuality]' \
    --input-path RawReads \
    --input-format CasavaOneEightSingleLanePerSampleDirFmt \
    --output-path demux.qza

Where RawReads is the folder with your samples. You can also use "manifest" format for paired reads with quality, if you prefer that.

Note that this command is taken from the tutorial that I and other moderators already shared with you many times, in one of your previous posts.

Please read tutorials first before asking questions - that will help you to solve the issues that may arise during the downstream analyses. Also, you need to formulate your questions better - the reason why nobody could help you earlier is because the question itself was misleading.

Best and good luck with further analyses,
Timur

1 Like

Hi @timanix ,

Thanks for the reply. I shared with you of course raw reads not merged files.
When using the same command line that you mentioned i obtained the following error message
Traceback (most recent call last):
File "/opt/anaconda/envs/qiime2/lib/python3.10/site-packages/qiime2/sdk/util.py", line 113, in parse_format
format_record = pm.formats[format_str]
KeyError: 'CasavaOneEightSingleLanePerSampleDirFmt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/anaconda/envs/qiime2/lib/python3.10/site-packages/q2cli/builtin/tools.py", line 852, in _import
artifact = qiime2.sdk.Artifact.import_data(
File "/opt/anaconda/envs/qiime2/lib/python3.10/site-packages/qiime2/sdk/result.py", line 303, in import_data
view_type = qiime2.sdk.parse_format(view_type)
File "/opt/anaconda/envs/qiime2/lib/python3.10/site-packages/qiime2/sdk/util.py", line 115, in parse_format
raise TypeError("No format: %s" % format_str)
TypeError: No format: CasavaOneEightSingleLanePerSampleDirFmt

An unexpected error has occurred:

No format: CasavaOneEightSingleLanePerSampleDirFmt

Do you think that there is an error in qiime 2 installation. I'm using q2cli version 2024.10.1.
May I ask the admin to check the installation process ?
Best

Is it on the cluster?
Yes, I would either install it from scratch or ask the admin to reinstall the qiime2. You can try the latest version qiime2-amplicon-2025.4

Thanks for reply @timanix .
I 'm connected to a server, i will ask the admin to install qiime2-amplicon-2025.4.

Could you share the link to the tutorial of installation of the lastest qiime2 amplicon version and i will send it to the admin ?

Best

Here is the link: QIIME 2 Library

1 Like