Testing classifiers - issue viewing the artifact as metadata

Hi everyone, I hope you’re all doing fine. I’m facing some issues trying to work with the classifiers and maybe you could help me.
I’m training classifiers for 18S, so I’m using SILVA132 (https://www.arb-silva.de/no_cache/download/archive/qiime/ -> silva132_release), in a qiime2 2018.11 version (miniconda environment).
However, when I try to test the classifier, I get the error message:
“There was an issue with viewing the artifact /home/bernardo/Silva_132_classifier.qza as QIIME 2 Metadata:
Artifact <artifact: TaxonomicClassifier uuid: 5d48de97-4b16-440f-b368-930e26b0f5e3> cannot be viewed as QIIME 2 Metadata.”
I’m running the following commands:

qiime metadata tabulate \
–m-input-file /home/bernardo/Silva_132/18S_Silva132_classifier.qza
–o-visualization /home/bernardo/Silva_132/18S_Silva132_taxonomy.qzv

Could you help me understand what’s wrong with my files and/or commands?
Thanks in advance!

Hi @Cravo_Adri,
You are inputting the wrong file to the metadata tabulate command.

I assume you are following this tutorial.

qiime metadata tabulate should have taxonomy.qza, the output of the taxonomy classification command, as its input. You are inputting the trained classifier, which is not an appropriate input for this command. You use that artifact to classify your input sequences with the qiime feature-classifier classify-sklearn command, but that’s the only time you use that artifact.

I hope that helps!

Hi @Nicholas_Bokulich, actually you’re super right, I just messed everything up.
Now I wrote the right command but got another errror message:

“There was an issue with viewing the artifact /home/bernardo/Silva_132_classifier.qza as QIIME 2 Metadata:
CategoricalMetadataColumn does not support values with leading or trailing whitespace characters. Column ‘Taxon’ has the following value: 'D_0__Eukaryota;D_1__Amoebozoa;D_2__Discosea;D_3__Flabellinia;D_4__Dactylopodida;D_5__Paramoeba;D_6__amoeba from gill tissue of Long Island Sound lobster ’
So, I should open the .txt file and just delete this random sentence in the end and then run all the commands again, right?

Yes the space at the end is causing the problem — there may be similar taxonomies in the SILVA reference that will cause this, so you should ideally hunt those out and fix them before importing to QIIME 2 and training your classifier.

@Nicholas_Bokulich thanks for the super fast replies!!

1 Like

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