# Error in my Feature Table with Taxonomy .tsv

**URL:** <https://forum.qiime2.org/t/error-in-my-feature-table-with-taxonomy-tsv/11539>\
**Category:** User Support\
**Created:** [September 16, 2019, 3:33pm UTC](https://forum.qiime2.org/t/error-in-my-feature-table-with-taxonomy-tsv/11539 "2019-09-16T15:33:34Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felipe\_Rocha](https://forum.qiime2.org/user_avatar/forum.qiime2.org/felipe_rocha/32/5691_2.png) [@Felipe\_Rocha](https://forum.qiime2.org/u/Felipe_Rocha)\
**Post date:** [September 16, 2019, 3:33pm UTC](https://forum.qiime2.org/t/error-in-my-feature-table-with-taxonomy-tsv/11539/1 "2019-09-16T15:33:34Z")

</div>

Hello again,

I'm trying to get a feature table with taxonomy annotation so I can run several downstream analysis, so I followed all the steps wrapped up by @thermokarst on the following post: [Exporting and modifying BIOM tables (e.g. adding taxonomy annotations)](https://forum.qiime2.org/t/exporting-and-modifying-biom-tables-e-g-adding-taxonomy-annotations/3630)

Everything seems ok and I didn't run through any errors, but when I open my feature-table-withtaxon.tsv everything is messed up. I'll attach the files here so you can have a look what I'm talking about.

Thank you,  
Felipe.

[biom-taxonomy.tsv](https://forum.qiime2.org/uploads/short-url/qCk33lr2XlzisjKQC8nK3tRVhk7.tsv) (1.1 MB) [feature-table.tsv](https://forum.qiime2.org/uploads/short-url/DHKjrYdjKLs05hHBndGur6yexc.tsv) (1.4 MB) [feature-table-withtaxon.tsv](https://forum.qiime2.org/uploads/short-url/AiqOkVoVlnAf79Rk4xVhDuhK0II.tsv) (1.5 MB)

---

<div class="post-metadata">

**Author:** ![Oddant1](https://forum.qiime2.org/user_avatar/forum.qiime2.org/oddant1/32/17130_2.png) [@Oddant1](https://forum.qiime2.org/u/Oddant1)\
**Post date:** [September 16, 2019, 3:55pm UTC](https://forum.qiime2.org/t/error-in-my-feature-table-with-taxonomy-tsv/11539/2 "2019-09-16T15:55:14Z")

</div>

Hello @Felipe_Rocha,

The command @thermokarst ran was meant to produce a `.biom` file not a `.tsv` file. I suspect you followed all the steps correctly, but gave your output file, `feature-table-withtaxon.tsv`, the wrong file extension. It should be a valid `.biom` file, but when viewed as a `.tsv` it looks corrupted and broken because `.biom` is a binary file format. Please change the extension on the file from `.tsv` to `.biom` and let us know if it works in your analyses.

Thank you,  
@Oddant1

---

<div class="post-metadata">

**Author:** ![Felipe\_Rocha](https://forum.qiime2.org/user_avatar/forum.qiime2.org/felipe_rocha/32/5691_2.png) [@Felipe\_Rocha](https://forum.qiime2.org/u/Felipe_Rocha)\
**Post date:** [September 16, 2019, 4:49pm UTC](https://forum.qiime2.org/t/error-in-my-feature-table-with-taxonomy-tsv/11539/3 "2019-09-16T16:49:40Z")

</div>

Hi @Oddant1,

thank you so much for the answer. That was indeed the problem, right in front of my eyes ARRGH!  
It worked and I got a feature table with taxonomy.

The thing is that when I try to convert the table with taxonomy to .tsv, the tsv format stays exactly like it was before assigning taxonomy. I still get feature ID instead of taxonomy. I'll have a look on some other posts, but if you have any ideas please share 😃

It's worth noting that when I give the command: biom head -i feature-table-withtaxon.biom, I get feature ID also, and not the taxonomy. So the problem is not on the conversion, but somewhere in assigning taxonomy?

Thank you for your help,  
Felipe.

---

<div class="post-metadata">

**Author:** ![Oddant1](https://forum.qiime2.org/user_avatar/forum.qiime2.org/oddant1/32/17130_2.png) [@Oddant1](https://forum.qiime2.org/u/Oddant1)\
**Post date:** [September 17, 2019, 3:18pm UTC](https://forum.qiime2.org/t/error-in-my-feature-table-with-taxonomy-tsv/11539/4 "2019-09-17T15:18:06Z")

</div>

Hello @Felipe_Rocha

I notice your feature table is also a `.tsv`, did you use this `.tsv` in the command you ran when attempting to create your annotated feature table? If so, please try again using the original `feature-table.biom` file.

Note that this time changing the file extension on that file from `.tsv` to `.biom` will almost certainly not work as `feature-table.tsv` is an actual `.tsv`, and you will need the original `feature-table.biom` you created before transforming it into a `.tsv`.

Thank you,  
@Oddant1

---

<div class="post-metadata">

**Author:** ![Felipe\_Rocha](https://forum.qiime2.org/user_avatar/forum.qiime2.org/felipe_rocha/32/5691_2.png) [@Felipe\_Rocha](https://forum.qiime2.org/u/Felipe_Rocha)\
**Post date:** [September 17, 2019, 4:08pm UTC](https://forum.qiime2.org/t/error-in-my-feature-table-with-taxonomy-tsv/11539/5 "2019-09-17T16:08:22Z")

</div>

Hey,

No, after your first reply I used the feature-table.biom to create my feature-table-withtaxon.biom following the steps provided by @thermokarst. But when I run biom head -i feature-table-withtaxon.biom I still get a table with Feature ID, and not taxonomy.

Thanks,  
Felipe.

---

<div class="post-metadata">

**Author:** ![Felipe\_Rocha](https://forum.qiime2.org/user_avatar/forum.qiime2.org/felipe_rocha/32/5691_2.png) [@Felipe\_Rocha](https://forum.qiime2.org/u/Felipe_Rocha)\
**Post date:** [September 17, 2019, 4:13pm UTC](https://forum.qiime2.org/t/error-in-my-feature-table-with-taxonomy-tsv/11539/6 "2019-09-17T16:13:08Z")

</div>

These are my commands:

(qiime2-2019.4) qiime2@qiime2core2019-4:~/Documents/Felipe-Seq/Exported-FelipeChelifer-FeatTable$ biom add-metadata -i feature-table.biom -o feature-table-withtaxon4.biom --observation-metadata-fp biom-taxonomy.tsv --sc-separated 'taxonomy'

(qiime2-2019.4) qiime2@qiime2core2019-4:~/Documents/Felipe-Seq/Exported-FelipeChelifer-FeatTable$ biom head -i feature-table-withtaxon4.biom

# Constructed from biom file

#OTU ID CN3 P23C P28C P38C C39C  
2ca9258b7350961759ee32c679b9d92a 0.0 0.0 0.0 0.0 0.0  
8ca1d3d61ed01004612a8457a8b7b839 0.0 0.0 0.0 0.0 0.0  
39b8827b8dbc27d3fb7c001d46d219e7 0.0 0.0 0.0 0.0 0.0  
121bd57672d7fe719f07e08f701b7fee 0.0 0.0 0.0 0.0 0.0  
29e4dde5513153801b9403ec372403d8 0.0 0.0 0.0 0.0 0.0

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [September 17, 2019, 4:33pm UTC](https://forum.qiime2.org/t/error-in-my-feature-table-with-taxonomy-tsv/11539/8 "2019-09-17T16:33:23Z")

</div>

> [@Felipe\_Rocha](#):
>
> But when I run biom head -i feature-table-withtaxon.biom I still get a table with Feature ID, and not taxonomy.

Please run the following, instead:

```bash
biom summarize-table -i feature-table-withtaxon.biom

```

What does the section titled "Observation Metadata Categories" say? You should see "confidence; taxonomy"

---

<div class="post-metadata">

**Author:** ![Felipe\_Rocha](https://forum.qiime2.org/user_avatar/forum.qiime2.org/felipe_rocha/32/5691_2.png) [@Felipe\_Rocha](https://forum.qiime2.org/u/Felipe_Rocha)\
**Post date:** [September 17, 2019, 8:05pm UTC](https://forum.qiime2.org/t/error-in-my-feature-table-with-taxonomy-tsv/11539/9 "2019-09-17T20:05:58Z")

</div>

> [@thermokarst](#):
>
> What does the section titled “Observation Metadata Categories” say? You should see “confidence; taxonomy”

Yes, that is exactly what it is showing! Does it mean that I got my taxonomy now?

---

<div class="post-metadata">

**Author:** ![Felipe\_Rocha](https://forum.qiime2.org/user_avatar/forum.qiime2.org/felipe_rocha/32/5691_2.png) [@Felipe\_Rocha](https://forum.qiime2.org/u/Felipe_Rocha)\
**Post date:** [September 17, 2019, 8:21pm UTC](https://forum.qiime2.org/t/error-in-my-feature-table-with-taxonomy-tsv/11539/10 "2019-09-17T20:21:35Z")

</div>

I see that I'm getting exactly the same thing as this other post here: [Biom add-metadata problem - #5 by thermokarst](https://forum.qiime2.org/t/biom-add-metadata-problem/3853/5)

I think there is no solution for now, but I was really forward to use the feature table on R. If you guys know anything, please, let me know!

Thanks,  
Felipe.

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [September 17, 2019, 8:27pm UTC](https://forum.qiime2.org/t/error-in-my-feature-table-with-taxonomy-tsv/11539/11 "2019-09-17T20:27:07Z")

</div>

> [@Felipe\_Rocha](#):
>
> Does it mean that I got my taxonomy now?

Yes, the taxonomy is included as "metadata". Please see the biom docs for more details:

[http://biom-format.org/documentation/adding\_metadata.html](http://biom-format.org/documentation/adding_metadata.html)

> [@Felipe\_Rocha](#):
>
> I see that I’m getting exactly the same thing as this other post here: [Biom add-metadata problem](https://forum.qiime2.org/t/biom-add-metadata-problem/3853/5)
> 
> I think there is no solution for now, but I was really forward to use the feature table on R. If you guys know anything, please, let me know!

I suspect you might be confusing two different concepts here: adding metadata vs collapsing

My suspicion is that you actually are looking for a _collapsed_ feature table, collapsed on your taxonomy.

Check out this method: [collapse: Collapse features by their taxonomy at the specified level — QIIME 2 2019.7.0 documentation](https://docs.qiime2.org/2019.7/plugins/available/taxa/collapse/)

To see it in action: [“Moving Pictures” tutorial — QIIME 2 2019.7.0 documentation](https://docs.qiime2.org/2019.7/tutorials/moving-pictures/#differential-abundance-testing-with-ancom) (there are steps within this ancom section that demonstrate table collapsing).

Once you have collapsed your feature table, you can export it.

---

<div class="post-metadata">

**Author:** ![Felipe\_Rocha](https://forum.qiime2.org/user_avatar/forum.qiime2.org/felipe_rocha/32/5691_2.png) [@Felipe\_Rocha](https://forum.qiime2.org/u/Felipe_Rocha)\
**Post date:** [September 17, 2019, 9:01pm UTC](https://forum.qiime2.org/t/error-in-my-feature-table-with-taxonomy-tsv/11539/12 "2019-09-17T21:01:55Z")

</div>

Oh well, you got me! I was confusing these two different concepts 😢

I already had many different tables with collapsed taxonomy, but I didn't think on using them to export. So frustrating...

I cannot thank you as much as I wanted to. Really!  
Felipe.

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [September 17, 2019, 9:05pm UTC](https://forum.qiime2.org/t/error-in-my-feature-table-with-taxonomy-tsv/11539/13 "2019-09-17T21:05:05Z")

</div>

Glad to hear you got it sorted! I have made this same mistake myself!

---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [October 19, 2019, 3:05am UTC](https://forum.qiime2.org/t/error-in-my-feature-table-with-taxonomy-tsv/11539/14 "2019-10-19T03:05:08Z")

</div>

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