I am using Gneiss to detect differential abundance of taxa in many nominal categories of a categorical variable. The summary plots, for example, of 'y0', put the categories on the y-axis in an order that does make sense. Is there a way to specify the order of the categories?
Hi @noah. I’m glad that you are seeing strong signals here!
Considering figures, the qiime2 plugin for Gneiss is not meant to give out of the box publishable figures. To fine tune the plots, I’d recommend taking a look at the Gneiss Python API. There is a python function called balance_boxplot that gives fine-tune control over these sorts of operations.
Let me know how far you get - I’ll be happy to answer any questions.
This is my first time using Python, so I do not know exactly what I am doing. I did get the commands to work. I just don't know how to view the plot. Is there a way to export balance boxplots and other sorts of plots from gneiss so that they can be easily viewed?
Hi @noah! Since this question is veering a ways away from QIIME 2, you might be better off consulting the gneiss support channels (@mortonjt can chime on that), or the matplotlib/seaborn docs or support channels. That said, you should be able to save that by calling savefig (YMMV)
ax.get_figure().savefig(“my_balance_boxlplot.png”) did the trick. Also, I figured out that to display the metadata categories in the correct order, I had to re-order them in my metadata file and specify how = ‘right’ in the pd.merge command.
data = pd.merge(balances, metadata, left_index=True, right_index=True, how=‘right’)