Error with vsearch uchime-denovo output

I have a seqs.fna file (from qiime1) which I have imported into qiime2, dereplicated and then run a de novo chimera checking. But I have been getting the errors below. I checked the forum for possible solution but similar errors were mostly attributed to manifest files during import. Any suggestions to overcome this error will be much appreciated? My final goal is to remove chimeras and then assign taxonomy. I am using qiime2-2022.8 on a mac. Thank you in advance.

Run
#Import
qiime tools import
--input-path seqs2.fna
--output-path seqs.qza
--type 'SampleData[Sequences]'

#Dereplicate
qiime vsearch dereplicate-sequences
--i-sequences seqs.qza
--o-dereplicated-table table.qza
--o-dereplicated-sequences rep-seqs.qza

#Run de novo chimera checking
qiime vsearch uchime-denovo
--i-table table.qza
--i-sequences rep-seqs.qza
--output-dir uchime-dn-out

#Visualize summary stats
qiime metadata tabulate
--m-input-file uchime-dn-out/stats.qza
--o-visualization uchime-dn-out/stats.qzv

#ERROR
There was an issue with loading the file uchime-dn-out/nonchimeras.qza as metadata:
Metadata file must be encoded as UTF-8 or ASCII. The following error occurred when decoding the file: 'utf-8' codec can't decode byte 0xb1 in position 10: invalid start byte
There may be more errors present in the metadata file. To get a full report, sample/feature metadata files can be validated with Keemei: https://keemei.qiime2.org
Find details on QIIME 2 metadata requirements here: Metadata in QIIME 2 — QIIME 2 2022.8.3 documentation

#Exclude chimeras and "borderline chimeras"
qiime feature-table filter-features
--i-table table.qza
--m-metadata-file uchime-dn-out/nonchimeras.qza
--o-filtered-table uchime-dn-out/table-nonchimeric-wo-borderline.qza

#ERROR
There was an issue with loading the file uchime-dn-out/nonchimeras.qza as metadata:
Metadata file must be encoded as UTF-8 or ASCII. The following error occurred when decoding the file: 'utf-8' codec can't decode byte 0xb1 in position 10: invalid start byte
There may be more errors present in the metadata file. To get a full report, sample/feature metadata files can be validated with Keemei: https://keemei.qiime2.org
Find details on QIIME 2 metadata requirements here: Metadata in QIIME 2 — QIIME 2 2022.8.3 documentation

Hello @eNoch,

Welcome to the forums! :qiime2:

I've pulled out the key part of the error:

If you search the forums for this error, you will find a number of causes, often with sample names / SampleIDs. Did you validate your metadata with Keemei (see link)?

Keep us posted!

1 Like

Thanks for the swift reply. The main issue is that I have not used a metadata. I started with seqs.fna file (from qiime1) by following the clustering tutorials (Clustering sequences into OTUs using q2-vsearch — QIIME 2 2022.8.3 documentation) to import the data, before dereplicating and chimera checking. Kindly, let me know if I'm not doing something right. Thanks.

Ah OK. You did mention that you started from the Qiime1 format.

Would you be willing to post your stats.qzv file here so we can take a look? It's possible it's still a strange character in a sample ID that made it through Qiime1 but is messing up Qiime2.

Hi! Colin. You mean the stats.qza file? it's quite big than the specified size for uploading. You could access it via this link. https://www.dropbox.com/scl/fo/0wnuxne5ieq21jn7b96i6/h?dl=0&rlkey=sz8ovaouyl2j3xxwnfmru523p
Thank you.

The file is a valid uchime denovo file, but I'm not sure you can use that as metadata.

I'll open this up to the other @moderators. Does this command make sense?

@eNoch, looking at your original post, you have two errors after two different commands, but both errors are the same, and both reference uchime-dn-out/nonchimeras.qza even though that artifact is not used at all in the first command. That artifact should be usable as metadata, and I can in fact use it as metadata on my own machine after downloading it. for both qiime tools inspect-metadata and qiime metadata tabulate.

It is possible that your QIIME 2 install got messed up and doesn't know how to use it as metadata for some reason. Can you try running qiime dev refresh-cache and retrying your failed commands? If that doesn't work, can you remove and remake your conda environment and try rerunning your failed commands? If that still doesn't work, can you also send your table.qza so I can replicate the command

qiime feature-table filter-features \
--i-table table.qza \
--m-metadata-file uchime-dn-out/nonchimeras.qza \
--o-filtered-table uchime-dn-out/table-nonchimeric-wo-borderline.qza

exactly as you ran it?

2 Likes

@colinbrislawn, yeah that command should work, and I can run it on my machine with the data they provided.

1 Like

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