Can you upload a single demultiplexed fastq file?

I have a fastq file that is already demultiplexed and has the primers removed. The data is single-ended. However, instead of having a directory, all the data is in a single fastq file. Is there a way to upload this into QIIME2? Thanks!

Hi @cfrazer,

Welcome to the :qiime2: forum!

I'd recommend the manifest format, which I find to be the most versatile. But, I'd also like to caution you that there are a limited number of things you can do with a single sample. You may struggle with dada2, and won't be able to do beta diversity or statistical testing.

Best,
Justine

Sorry, I should have said this: there are 42 samples, but it's all in one fastq file. Will the manifest file format work if there is only one absolute filepath for all the samples?

This is the format that the fastq gives the data in:

@Clocal-swab-518::A00769:53:H5TGGDRXY:2:2273:11966:22373
TACGGAGGGTGCAAGCGTTACTCGGAATCACTGGGCGTAAAGGGCGCGTAGGCGGAGTAGTAAGTTGGATGTGAAATCTAATGGCTTAACCATTAAACTGCATTCAAAACTGCTATTCTAGAGTAAGGGAGAGGCAGATGGAATTAGTAGTGTAGGGGTAAAATCCGTAGATATTACTAAGAATGCCAATTGCGAAAGCGATCTGCTAGAACTTAACTGACGCTAAGGCGCGAAAGCGTGGGGAGCAAACAGG
+
FFFFFFFFFFFFFFFFFFFFFFKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKFFFFFFFFFFFFFFFFFFFFF

1 Like

Hi @cfrazer,

I think this may be importable as a QIIME1DemuxFormat semantic type. So, you'd use the --type "QIIME1DemuxFormat" flag in your command. I think you would put the fastq as your import path.
I should mention, I've not actually imported data that way myself, so we will have to collaborate to figure out the process.

Best,
Justine

Thanks for your help Justine! I tried using that import type and received the following error:

qiime tools import \

--type QIIME1DemuxFormat
--input-path seqdata2.fastq.gz
--output-path demux.qza
Traceback (most recent call last):
File "/home/cf/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/q2cli/builtin/tools.py", line 158, in import_data
view_type=input_format)
File "/home/cf/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/qiime2/sdk/result.py", line 213, in import_data
output_dir_fmt = pm.get_directory_format(type_)
File "/home/cf/miniconda3/envs/qiime2-2020.8/lib/python3.6/site-packages/qiime2/sdk/plugin_manager.py", line 313, in get_directory_format
% semantic_type)
TypeError: Semantic type QIIME1DemuxFormat does not have a compatible directory format.

An unexpected error has occurred:

Semantic type QIIME1DemuxFormat does not have a compatible directory format.

See above for debug info.

Is there an input I'm missing? Maybe a --source-format or --mapping-file? I'm not familiar with the inputs needed for this import type.

Hi @cfrazer, I have dealt with demultiplexed fastq files containing all the samples in one file before, and I just decided to "demultiplex" again by using the sampleID in the fastq header. I used bbmap's demultiplexbyname.sh script. I think one option that would work for you would be the following:

demuxbyname.sh in= out= length=8 prefixmode=t
This will demultiplex by the first 8 characters of read names.

Except maybe more like this:
demuxbyname.sh in=filename out=%.fastq length=15 prefixmode=t
That will separate out your larger fastq based on the first 15 characters in the header (your sample ID?) and the resulting files will be named whatever the first 15 characters are. if your sample IDs have much different #s of characters you might have to use some other option like
demuxbyname.sh in=filename out=%.fastq delimiter=colon prefixmode=f
I think that should extract reads based on the text before the first colon in the header. Then you can edit the filenames and import using the casava format I believe

1 Like