taxa barplot: taxonomy stack order

Hi there,

I am wondering if I can change the order of stacking taxonomy in qiime2 view?
Take an example, please look at the taxa bar plot below, the taxonomy order is c__bacteroidia, followed by c__Clostridia, c__Bacilli...from the top to the bottom.
Now I am only interested in the c__Bacilli, so I want to place it on the top of taxa bar plot.
Is there any way to solve this problem?
Thank you in advance!

Hello there!

In this viewer, you can only sort by one item at a time. :crying_cat_face:

Making the graph using another program (R, python, excel, google sheets) will give you more control. If graph customization is something you need, I think you will have to venture outside of this Qiime plugin-in.

Let me know what you have tried and if you have any more great questions.

Colin

Hi Colin,
Thank you for your reply!
I have two more questions:
(1) Are the taxonmy bars ordered by the average abundance of the taxonomy in all sample?
(2) Can I change the order of x-ticklabels? For example, in moving picture tutorial taxonomy barplot, when I sort samples by body site, the x axis tick labels show ['gut', 'left palm', 'right palm', 'tongue'] from left to right, Can I change this order to [left, right, gut, tongue].
image

Thank you!

Best,
Jericho

1 Like

Actually, you can sort samples by any number of criteria, simply press the blue + sign next to the words "Sort Samples By" to add another sorter.

Unfortunately though, I don't think @maque4004 is talking about sorting samples, rather, they appear to be asking about sorting features, which, is not currently possible.

The feature order is based on global abundance, across all samples.

It is a lexicographical sort, either ascending or descending. If you wanted to force the sorting you could prefix values --- 0_left, 1_right, 2_gut, 3_tongue, for example.

1 Like

Thanks, Matthew, it helps a lot!

1 Like