# Link BIOM table with taxonomy

**URL:** <https://forum.qiime2.org/t/link-biom-table-with-taxonomy/24171>\
**Category:** Other Bioinformatics Tools\
**Tags:** taxonomy\
**Created:** [September 15, 2022, 3:14pm UTC](https://forum.qiime2.org/t/link-biom-table-with-taxonomy/24171 "2022-09-15T15:14:31Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![SoilRotifer](https://forum.qiime2.org/user_avatar/forum.qiime2.org/soilrotifer/32/21071_2.png) [@SoilRotifer](https://forum.qiime2.org/u/SoilRotifer)\
**Post date:** [September 16, 2022, 2:21pm UTC](https://forum.qiime2.org/t/link-biom-table-with-taxonomy/24171/4 "2022-09-16T14:21:09Z")

</div>

Hi @Ghaz, not sure how that happened unless the files are getting mixed up. I just tried the following commands using the `table.qza` and `taxonomy.qza` files from the [Moving Pictures tutorial](https://docs.qiime2.org/2022.8/tutorials/moving-pictures/), and the commands below worked as expected.

```auto
# Export:
qiime tools export \
    --input-path table.qza \
    --output-path exported_table
    
qiime tools export \
    --input-path taxonomy.qza \
    --output-path exported_taxonomy/

```

Edit taxonomy header of `exported_taxonomy/taxonomy.tsv` :  
- replace: "Feature ID Taxon Confidence"  
- with: "#OTUID taxonomy confidence"

```auto
# Add metadata:
biom add-metadata \
	-i exported_table/feature-table.biom \
	--observation-metadata-fp exported_taxonomy/taxonomy.tsv \
	--sc-separated taxonomy \
	-o feature-table-tax.biom

# Make tsv:
biom convert \
	--table-type="OTU table" \
	-i feature-table-tax.biom \
	--to-tsv \
	--header-key taxonomy \
	-o feature-table-tax.tsv

```

Optional sanity-check: make a tsv file from your initially exported `exported_table/feature-table.biom` table, _i.e._ w/o taxonomy. Compare this to your `feature-table-tax.tsv` with the taxonomy.

```auto
biom convert \
	--table-type="OTU table" \
	-i exported_table/feature-table-tax.biom \
	--to-tsv \
	-o feature-table.tsv

```

You can find more information about biom conversion [here](https://biom-format.org/documentation/biom_conversion.html).

---

_[View the full topic](https://forum.qiime2.org/t/link-biom-table-with-taxonomy/24171)._
