Can anyone solve this problem? metadata column doesn't support with leading or trailing characters?

Dear Researcher,
I am using qiime2-2018.11 version. After training Silva128 database with my 16S primers, I used the following command to view the taxonomy,

qiime metadata tabulate \

--m-input-file taxonomy.qza
--o-visualization taxonomy.qzv

However, I got the following error
"There was an issue with viewing the artefact taxonomy.qza as QIIME 2 Metadata:
CategoricalMetadataColumn does not support values with leading or trailing whitespace characters. Column 'Taxon' has the following value: 'D_0__Bacteria;D_1__Chlorobi;D_2__Chlorobia;D_3__Chlorobiales;D_4__OPB56;D_5__uncultured bacterium '"

Could anyone help me?

Thanks

Hi @khaknasheen,
I guess there is some issue with the reference taxonomy file that you had used for taxonomy assignment. Can you share the commands and the reference taxonomy file that you used.

1 Like

Dear Sir,

I open Silva-128 Qimme release and then go to rep-set and then rep set 16S only and import 99-otus-16S.fasta file with the commands as follows;
qiime tools import **

–type ‘FeatureData[Sequence]’ **

–input-path silva_128_99_16S.fasta **

–output-path 99_otus.qza

For taxonomy I open Silva-128 Qimme release and then go to taxonomy\16S_only\99\ and import majority_taxonomy_all_levels.txt with the following commands;
qiime tools import **

–type ‘FeatureData[Taxonomy]’ **

–input-format HeaderlessTSVTaxonomyFormat **

–input-path majority_taxonomy_all_levels.txt **

–output-path ref-taxonomy.qza

As I have paired end reads, each read is about 300bp and I use the following commands with the primers provided by the company.

qiime feature-classifier extract-reads **

–i-sequences 99_otus.qza **

–p-f-primer CCTACGGRRBGCASCAGKVRVGAAT **

–p-r-primer GGACTACNVGGGTWTCTAATCC **

–o-reads ref-seqs.qza

Then I use the following commands to get my classifier as
qiime feature-classifier fit-classifier-naive-bayes **

–i-reference-reads ref-seqs.qza **

–i-reference-taxonomy ref-taxonomy.qza **

–o-classifier classifier.qza

To get taxonomy I used the following commands

qiime feature-classifier classify-sklearn **

–i-classifier classifier.qza **

–i-reads rep-seqs.qza **

–o-classification taxonomy.qza

However when to get taxonomy. qzv I got following errors;

qiime metadata tabulate **

–m-input-file taxonomy.qza **

–o-visualization taxonomy.qzv

“There was an issue with viewing the artefact taxonomy.qza as QIIME 2 Metadata:
CategoricalMetadataColumn does not support values with leading or trailing whitespace characters. Column ‘Taxon’ has the following value: 'D_0__Bacteria;D_1__Chlorobi;D_2__Chlorobia;D_3__Chlorobiales;D_4__OPB56;D_5__uncultured bacterium '”

Thank You

Did you try importing the ref-taxonomy file without specifying the format? Is the ref-taxonomy file a tab-separated (tsv) file without a header?

1 Like

Dear Sir,

I have downloaded the Silva 128 database from this website. Archive.

I could not upload the taxonomy file as it is too large. I used other data to check whether my command works or not, I got some results, however what are D0, D1 and D3... Please check the I have attached relative frequency is fine. However, I could not go to the genus or species.

Thanks

D stands for domain I believe, and D_0 for e.g. means the top taxa level. The nomenclature of this file does not go as K__, p__, g__, rather all taxa are arranged as D_0, D_1, D_2 in order of their levels.

1 Like

Dear Sir,

The commands are fine. Am I right? Might I use the commands for my other PF data which may contains primers, adapters, or linker, so I got the above error. Now I have check by removing the primers, adapters and barcodes and got the relative frequency that I have sent to you. Is the barplots representing the taxon with D1, D2 annotations are right? Waiting for your reply!

Thanks

Ahh! so there was error in the upstream analysis. Looks pretty good now.

Dear Sir,

When I did fungal analysis I got K, P, O, like notations, very easy to interpret, However for bacteria, I get D1, D2, 3, Please help me, How can I get K, P, O, C notations with bacteria? If we cannot get these annotation, I will work with the D1, D2, as shown in the above taxa bar plots of relative frequency.

Thanks

Best would be to use the q2-taxa collapse method to collapse your table down to the taxa you desire and then use the output table for further plotting in MS excel. You may replace D_0 etc. with the corresponding taxon level e.g kingdom or phylum etc easily in excel. For publication, you may have to re-create the q2 bar-plots with another tool (R or excel).

1 Like

Dear Sir, Solved Thanks

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