Create OTU table from biom

Hi everyone
I need to create something like this OTU table.


I read some discussions in the forum and found out I should use biom add-metadata to do that.
But It doesn't look like what I expect.
first of all, it exports a biom file, not a text file. and if I convert it to a tsv file by changing its postfix it is unreadable.
I used this command :
biom add-metadata -i feature-table.biom -o table- with -taxonomy.biom --observation-metadata-fp biom-taxonomy.tsv
I know I should consider header but I don't know what it is exactly?
could you please let me know what is my mistake?
Thank you

I used this tutorial but I didn’t understand what is level in this command:
qiime taxa collapse
–i-table table.qza
–i-taxonomy taxonomy.qza
–p-level 6 \ # or whatever level of taxonomy you want
–output-dir taxtable/
also after I did all the steps I got a file with just 37 rows while in table.qza or taxonomy.qza file there are more than 100 rows.
sorry if I am asking a simple question.
thank you

Hi @mohsen_ej,

Try looking at the documentations for this plugin, ex qiime taxa collapse --help shows a description of that parameter as:

  --p-level INTEGER               The taxonomic level at which the features
                                  should be collapsed. All ouput features will
                                  have exactly this many levels of taxonomic
                                  annotation.  [required]

When using taxonomies this refers to the taxonomic level, in the example case above this refers to:
1=Kingdom, 2=Phylum, 3=Class, 4=Order, 5=Family, 6=Genus, 7=Species.
Though note this order depends on the reference database structure and can (though usually not likely) vary depending on what you’re using.

This plugin is essentially collapsing all of your ASVs to those higher level categories, so 100 ASVs are categorized into 37 genera in your case.

1 Like

Thank you.
but I didn’t understand “level” still.
If I choose for example level 7, I will not get taxonomies that don’t have species (not completed until level 7) and I will lost them in the result? Or if I choose level 7 I will get all the genera that contain level 1 and level 2 … level 7?
I mean if I choose each level, I get results of that level only? or I will get results of that level and lesser?
Thank you

Hi @mohsen_ej,
Pay attention to the description I quoted above:

                                  have exactly this many levels of taxonomic
                                  annotation.

So, according to that you would expect to have 6 levels if you choose 6, meaning everything from Phylum to Genus. If a feature does not have genus level taxonomy to be assigned to, it will just be left blank and only show you the highest level it was able to assign taxonomy to, you will not lose that feature.

Try looking through the Moving Pictures tutorial, in particular the taxa barplot demonstrates this concept pretty well. Try changing the levels from the drop down menu and see what happens. For example I select Level 6, and you can see something like:
k__Bacteria;p__Firmicutes;c__Clostridia;o__Clostridiales;f__Lachnospiraceae;__
So even though I selected level 6, I am getting a blank here because the feature did not have a genus designation.
Hope that helps.

2 Likes

Thank you very much.

2 Likes

A post was split to a new topic: Combining feature ID and taxonomy in feature/biom tables

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