# Diversity analysis with otu table and taxonomy data

**URL:** https://forum.qiime2.org/t/diversity-analysis-with-otu-table-and-taxonomy-data/1602
**Category:** User Support
**Tags:** taxonomy, taxa
**Created:** [October 24, 2017, 4:27pm UTC](https://forum.qiime2.org/t/diversity-analysis-with-otu-table-and-taxonomy-data/1602 "2017-10-24T16:27:00Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [October 24, 2017, 5:28pm UTC](https://forum.qiime2.org/t/diversity-analysis-with-otu-table-and-taxonomy-data/1602/3 "2017-10-24T17:28:31Z")

</div>

Hi @pumpkin,  
Thanks for posting!

> [@pumpkin](#):
>
> it seems that the biom file doesn’t contain the taxonomy

Feature tables in QIIME2 do not contain taxonomy, and will be discarded upon import. Taxonomy is contained in a separate `FeatureData[Taxonomy]` artifact. If you or your collaborators have a list of taxonomy assignments for each feature ID, you can import a file in the following format into qiime:

```auto
Feature ID	Taxon
229854	k __Bacteria; p__ Proteobacteria; c __Gammaproteobacteria; o__ Legionellales; f __Legionellaceae; g__ Legionella; s__
367523	k __Bacteria; p__ Bacteroidetes; c __Flavobacteriia; o__ Flavobacteriales; f __Flavobacteriaceae; g__ Flavobacterium; s__
239330	k __Bacteria; p__ Proteobacteria; c __Deltaproteobacteria; o__ Desulfuromonadales; f __Geobacteraceae; g__ Geobacter; s__

```

Import like this:

```auto
qiime tools import \
  --input-path taxonomy.tsv \
  --output-path taxonomy.qza \
  --type 'FeatureData[Taxonomy]'

```

Alternatively, if you only have the reference sequences associated with each feature ID, or want to classify using the taxonomy classifiers in QIIME2, import as described [here](https://docs.qiime2.org/2017.9/tutorials/importing/#per-feature-unaligned-sequence-data-i-e-representative-sequences).

> [@pumpkin](#):
>
> When I play the following code
> 
> biom validate-table -i feature-table-v210.biom
> 
> Unknown BIOM type: Table
> 
> The input file is not a valid BIOM-formatted file

This is an issue with BIOM formats and out of scope of the QIIME2 forum — you can get support with BIOM on the [qiime 1 forum](http://forum.qiime.org/) (the issue is probably that you have an old version of biom installed or need to specify the biom format (e.g., 2.1.0) that you are using).

> [@pumpkin](#):
>
> Error: Visualization viewing is currently not supported in headless environments.

It sounds like you may be trying to visualize on a remote computing cluster? E.g., see [this post](https://forum.qiime2.org/t/qiime-tools-view-on-headless-server/113) for more details.

> [@pumpkin](#):
>
> When I import it into qiime2, what I get is just the feature ID and taxon

Perfect — sounds like you already figured out how to import `FeatureData[Taxonomy]` as I described above (I've left that advice there in case I misunderstood your post). This is how taxonomy information is handled in QIIME 2. If you want to visualize taxonomic abundances in a barplot, use [`barplot`](https://docs.qiime2.org/2017.9/plugins/available/taxa/barplot/). If you want to collapse your feature table to taxonomic groups and use those groups for downstream analyses, e.g., testing whether taxa are differentially abundant between groups, use [`collapse`](https://docs.qiime2.org/2017.9/plugins/available/taxa/collapse/) and proceed with other commands.

I hope that fixes all of your (non-BIOM-related) problems! Please let us know if these do not resolve the issues you are having.

---

_[View the full topic](https://forum.qiime2.org/t/diversity-analysis-with-otu-table-and-taxonomy-data/1602)._
