Deleting whitespaces on tsv taxonomy

I know this error has been addressed previously but i am still kind of lost. i got this error while creating the taxa table. Can someone explain how to go about it

There was an issue with viewing the artifact 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__Bacteroidetes;D_2__Ignavibacteria;D_3__OPB56;D_4__uncultured bacterium ’

Hi!
Could you try to run this on your taxonomy file?
I had the same problem and someone from Qiime2 team suggested to run it like this. It helped.

qiime tools export \
    --input-path taxonomy.qza \
    --output-path taxonomy-with-spaces

qiime metadata tabulate \
    --m-input-file taxonomy-with-spaces/taxonomy.tsv  \
    --o-visualization taxonomy-as-metadata.qzv

qiime tools export \
    --input-path taxonomy-as-metadata.qzv \
    --output-path taxonomy-as-metadata

qiime tools import \
    --type 'FeatureData[Taxonomy]' \
    --input-path taxonomy-as-metadata/metadata.tsv \
    --output-path taxonomy-without-spaces.qza

qiime metadata tabulate \
    --m-input-file taxonomy-without-spaces.qza \
    --o-visualization taxonomy-without-spaces.qzv

rm -r taxonomy-with-spaces taxonomy-as-metadata

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