Hi Nicholas,
I am almost there but have a structure error in my data which I do not get. 
Next is a part of my attempt which can be seen in whole on my git page
Could you please point me to a way to correct this !
head taxonomy_export/taxonomy.tsv taxonomy_genus/taxonomy.tsv taxonomy_species/taxonomy.tsv
==> taxonomy_export/taxonomy.tsv <==
Feature ID Taxon Consensus
00020107f579a17c6029b07351bf5744479bd7c8 D_0__Bacteria;D_1__Firmicutes;D_2__Bacilli;D_3__Bacillales;D_4__Bacillaceae;D_5__Bacillus;D_6__Bacillus subtilis 1.0
0003ba2cd3d636339b5bbf188964c6be168b2cf4 D_0__Bacteria;D_1__Firmicutes;D_2__Bacilli;D_3__Bacillales;D_4__Bacillaceae;D_5__Bacillus;D_6__Streptococcus pneumoniae 1.0
00044aa9825d55df21182e70982a97c1c9968184 D_0__Bacteria;D_1__Firmicutes;D_2__Bacilli;D_3__Bacillales;D_4__Bacillaceae;D_5__Bacillus;D_6__Bacillus subtilis 1.0
00052864db9eb0e8e141c725007d9daf9a8be86d D_0__Bacteria;D_1__Proteobacteria;D_2__Gammaproteobacteria;D_3__Pseudomonadales;D_4__Pseudomonadaceae;D_5__Pseudomonas;D_6__metagenome 1.0
0009f868d18c2d64177c453b36b5b3fbcd2bbff2 D_0__Bacteria;D_1__Firmicutes;D_2__Bacilli;D_3__Bacillales;D_4__Staphylococcaceae;D_5__Staphylococcus;D_6__Staphylococcus aureus DAR3919 1.0
000a914ffaaeefe4cc5c5ba7d5fc0d8c2069acbf D_0__Bacteria;D_1__Firmicutes;D_2__Bacilli;D_3__Lactobacillales;D_4__Lactobacillaceae;D_5__Lactobacillus;D_6__Lactobacillus fermentum 1.0
000b7d774410671c26231e4b674fc1b4a2f80e6c D_0__Bacteria;D_1__Firmicutes;D_2__Bacilli;D_3__Bacillales;D_4__Bacillaceae;D_5__Bacillus;D_6__Bacillus subtilis 1.0
0012ee985d6dd440a583ea2e93ae082a00ddcb7f D_0__Bacteria;D_1__Firmicutes;D_2__Bacilli;D_3__Bacillales;D_4__Listeriaceae;D_5__Listeria;D_6__Listeria monocytogenes 1.0
00138ad4bbf960cdcb83de0eb76429344015b90d D_0__Bacteria;D_1__Firmicutes;D_2__Bacilli;D_3__Lactobacillales;D_4__Enterococcaceae;D_5__Enterococcus;D_6__uncultured bacterium 1.0
==> taxonomy_genus/taxonomy.tsv <==
Feature ID Taxon Consensus
00020107f579a17c6029b07351bf5744479bd7c8 Bacillus 1.0
0003ba2cd3d636339b5bbf188964c6be168b2cf4 Bacillus 1.0
00044aa9825d55df21182e70982a97c1c9968184 Bacillus 1.0
00052864db9eb0e8e141c725007d9daf9a8be86d Pseudomonas 1.0
0009f868d18c2d64177c453b36b5b3fbcd2bbff2 Staphylococcus 1.0
000a914ffaaeefe4cc5c5ba7d5fc0d8c2069acbf Lactobacillus 1.0
000b7d774410671c26231e4b674fc1b4a2f80e6c Bacillus 1.0
0012ee985d6dd440a583ea2e93ae082a00ddcb7f Listeria 1.0
00138ad4bbf960cdcb83de0eb76429344015b90d Enterococcus 1.0
==> taxonomy_species/taxonomy.tsv <==
Feature ID Taxon Consensus
00020107f579a17c6029b07351bf5744479bd7c8 D_6__Bacillus subtilis 1.0
0003ba2cd3d636339b5bbf188964c6be168b2cf4 D_6__Streptococcus pneumoniae 1.0
00044aa9825d55df21182e70982a97c1c9968184 D_6__Bacillus subtilis 1.0
00052864db9eb0e8e141c725007d9daf9a8be86d D_6__metagenome 1.0
0009f868d18c2d64177c453b36b5b3fbcd2bbff2 D_6__Staphylococcus aureus 1.0
000a914ffaaeefe4cc5c5ba7d5fc0d8c2069acbf D_6__Lactobacillus fermentum 1.0
000b7d774410671c26231e4b674fc1b4a2f80e6c D_6__Bacillus subtilis 1.0
0012ee985d6dd440a583ea2e93ae082a00ddcb7f D_6__Listeria monocytogenes 1.0
00138ad4bbf960cdcb83de0eb76429344015b90d D_6__uncultured bacterium 1.0
In the scase of species, I left the leading 'D_6__' but the error below remains when also removing this prefix
I ran the command below both with the original table.qza, the table-no-unassigned.qza OR the new <genus|species>-table-no-unassigned.qza without change in the error.
It seems that the simplified taxonomy_species.qza data is not structurally correct anymore to generate the plot
qiime taxa barplot --i-table table-no-unassigned.qza --i-taxonomy taxonomy_species.qza --m-metadata-file $SAMPLE_METADATA --o-visualization species-taxa-bar-plots.qzv
Plugin error from taxa:
'float' object has no attribute 'split'
Debug info has been saved to /tmp/qiime2-q2cli-err-ufm_ty_p.log
(MetONTIIME_env) u0002316@gbw-s-pacbio01:/data2/analyses/MetONTIIME_4smpl_silva$ cat /tmp/qiime2-q2cli-err-ufm_ty_p.log
Traceback (most recent call last):
File "/opt/biotools/miniconda3/envs/MetONTIIME_env/lib/python3.6/site-packages/q2cli/commands.py", line 327, in __call__
results = action(**arguments)
File "</opt/biotools/miniconda3/envs/MetONTIIME_env/lib/python3.6/site-packages/decorator.py:decorator-gen-144>", line 2, in barplot
File "/opt/biotools/miniconda3/envs/MetONTIIME_env/lib/python3.6/site-packages/qiime2/sdk/action.py", line 240, in bound_callable
output_types, provenance)
File "/opt/biotools/miniconda3/envs/MetONTIIME_env/lib/python3.6/site-packages/qiime2/sdk/action.py", line 445, in _callable_executor_
ret_val = self._callable(output_dir=temp_dir, **view_args)
File "/opt/biotools/miniconda3/envs/MetONTIIME_env/lib/python3.6/site-packages/q2_taxa/_visualizer.py", line 34, in barplot
collapsed_tables = _extract_to_level(taxonomy, table)
File "/opt/biotools/miniconda3/envs/MetONTIIME_env/lib/python3.6/site-packages/q2_taxa/_util.py", line 37, in _extract_to_level
max_obs_lvl = _get_max_level(taxonomy)
File "/opt/biotools/miniconda3/envs/MetONTIIME_env/lib/python3.6/site-packages/q2_taxa/_util.py", line 11, in _get_max_level
return taxonomy.apply(lambda x: len(x.split(';'))).max()
File "/opt/biotools/miniconda3/envs/MetONTIIME_env/lib/python3.6/site-packages/pandas/core/series.py", line 3591, in apply
mapped = lib.map_infer(values, f, convert=convert_dtype)
File "pandas/_libs/lib.pyx", line 2217, in pandas._libs.lib.map_infer
File "/opt/biotools/miniconda3/envs/MetONTIIME_env/lib/python3.6/site-packages/q2_taxa/_util.py", line 11, in <lambda>
return taxonomy.apply(lambda x: len(x.split(';'))).max()
AttributeError: 'float' object has no attribute 'split'