I would like to create a pcoa biplot at the family level. Would it be possible to do that? I would also like to show the taxonomic name on the arrow instead of featureID. I tried to use qiime taxa collapse as previously suggested, but It didn't work. Any suggestion? Thanks in advance for the help
What exactly did you try?
You can create a collapsed table at desired taxonomy level, then run core-metrics plugin, create a table with relative abundances using rarefied table from core-metrics output and use those files to create biplots.
Thank you so much for your quick reply. Yes, I tried to do that. Please find below the commands that I have used:
For the relative frequency table:
qiime feature-table rarefy
qiime taxa collapse
qiime feature-table relative-frequency
Then I run the metrics plugin
qiime diversity core-metrics-phylogenetic
And then I tried the biplot
qiime diversity pcoa-biplot
qiime emperor biplot
But in this last step, It didn't work. If I don't collapse the table, it works.
Thanks for the details.
Could you also provide the error you are getting from the last command?
I remember that I was able to get biplots with collapsed tables, but it was many Qiime2 versions ago.
Just noticed, that this PCoA artifact is located not in the core-metrics results that you got with collapsed table.
Could you try to rerun it with PCoA artifact, created with collapsed core-metrics?
Do you mean to run the qiime diversity core-metrics-phylogenetic using the rarefied collapsed table (Active-table-main-BP-rarefied-table-l5.qza) instead of the rarefied one?
Step 1. Collapse unrarefied table to level 5.
Step 2. Run core-metrics command on collapsed table (note that you should choose a new sampling depth since number of features will decrease after collapse to certain taxonomy level).
Step 3. Convert rarefied table (in core-metrics output) to relative abundances.
Step 4. Create a biplots based on the pcoa files from core-metrics output.
Step 5. Create visualization.
In your command that I cited a comment ago you pointed a pcoa file that was not located in core-metrics output, that you got with collapsed table. Also, you rarefied a table, collapsed and then used core-metrics with the same sampling depth (incorrect) as in first ratefaction command. It would be better to rerun all commands in order above to see if it will solve the problem.
Very good point. I didn't realise that I was using the rarefied table in the core-metrics. I collapsed the unrarefied table and then run the qiime diversity core-metrics-phylogenetic command and the following error appeared:
Plugin error from diversity:
The table does not appear to be completely represented by the phylogeny.
Debug info has been saved to /var/folders/kg/61tr5gk96nn27myl063_7mqc9wr7b0/T/qiime2-q2cli-err-6rt8057o.log
You are right. To run core-metrics phylogenetic you need a rooted tree. I am not aware if there is an option to create one for collapsed by taxonomy table (hi mods, let me know if I missed it!) in Qiime2.
The workaround will be to use core-metrics non-phylogenetic version of the plugin. That will create only jaccard and bray-Curtis pcoa files since unifracs requirea rooted tree.
One also can run core-metrics phylogenetic command with uncollapsed table then create biplots with taxonomy artifact as in this tutorial (take a look on the part where they creating biplots).
Thank you very much for the suggestions. I also exported the images and edited the labels.
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.