can i draw a barplot with the feature table only?


the feature table ↑
I'm new to qiime2, and I wonder if I can generate a barplot using this feature table only? Because I only have the feature table as a result.
if I can, what code should I use?
thanks

Hello! Welcome to the forum!
To create a barplot, you need at least 2 files:

  1. Feature table
  2. Taxonomy

Here is the link to plugin description: taxabarplot

Upd.
I see that you have already collapsed to taxa features, so you can use heatmap to visualize your table in Qiime2 or use Python or R to create taxabarplot based on your table

2 Likes

Thank you very much for your reply!
I have drawn a heatmap like this ↓


However, the taxa levels are different, some are genera while some are families.
Q:

  1. I wonder if I can generate a feature table only on a specific level (such as level 2) using the feature table I have or not?
    I've seen codes to realize this by using the picture below image
  2. Can I generate file taxonomy.qza from feature table? ( which i don't think it can be realized🙊)

Thank you

Looks like you are working with already collapsed data. Is it possible to ask for ASV/OTU tables, taxonomy annotations and representative sequences from the same person you got this table? With those three files you can recreate any analysis in Qiime2.

I am not sure, but if you will create a tsv table like this:


And just diplicate your IDs (your IDs actually taxonomy annotations) in both columns and import it to Qiime2 as taxonomy artifact... Then you can try to collapse it to level 2 or even create a barplot as it is (probably).
But it would be better to find original ASV/OTU tables, taxonomy annotations and representative sequences.

1 Like

Thank You very much! I'll get back to you if I'm succeed :grin:

I asked for the taxonomy annotations from the same person I got the feature table and ran the commands below, but it shows an error:



This is how the taxonomy annotation looks like:

So this is also an artifact of type FeatureTable[Frequency] ?
Can I use this one to draw a taxa barplot then? :crying_cat_face:

It looks like a feature table with taxa as feature ID's, so in fact it is collapsed to taxonomy level feature table.
See my previous comment that you already marked as a solution how you can use your table to get taxonomy file and try to use both of them to create a barplot

1 Like

Could you please show me how to convert this table to a taxonomy file? I'm really weak at using qiime2 :sweat_smile: Sorry for bothering you again. Thank you! :smiley_cat:

Just create a tsv table with 2 columns named as on screenshot. Currently your IDs are taxonomy annotations. So copy all your IDs into the first column and in a second one as well, since your IDs already contain taxonomy levels. Import it to qiime2 as taxonomy artifact. Not sure if it will work, but you still can try it. With these 2 files, you can create a barplot (hopefully :thinking:).
When table is ready, import it:

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


Like this one?
or this one?

this is what happened when i use screenshot No.2:

I meant OTU IDs from your first screen in the post :wink:

oh! it works!


thank you so much for helping me !

2 Likes

I am surprised that it worked :rofl:. Glad to help

5 Likes

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