Beta Diversity Profiling & Significance Testing

Hi everyone,

Newbie here.
I am looking a way for significant test of my pcoa plot.
So I have generated the core-metrics-results for unweighted and weighted unifrac pcoa plot. I can view the emperor.qzv plot in qiime2. Is there any way for me to test the significant between groups? (if any code provided would be appreciated)

I also found to plot using microbiome-analyst software. It require a phylogenetic tree (.tre/nwk format). I tried with the tree generated from rooted and unrooted tree.qza, but it mentioned that "Tree tip labels do not match feature names in the OTU/taxonomic tables". Can anyone help me with troubleshooting please?

Appreciate! Thank you!

Hii @cgpeh,
Welcomer in the forum!

You can use the 'beta-group-significance' plug in. This is meant to do exactly what you asking for. If you look in the 'Moving picture tutorial' (“Moving Pictures” tutorial — QIIME 2 2022.8.3 documentation), in the 'Aplha- and Beta- Diversity' section you may find an example of the command and how to use it!

For your other question, there is one reason that I can think of right now, did you apply any filter in your data? Did you re-create the tree after the filtering?

Hope it helps,
Luca

Hi @llenzi ,

Yes, the online software requires OTU table and phylogenetic tree. I submit the OTU from taxonomy (after the filter) and phylogenetic tree (rooted-tree without filter). I guess that might be the reason. May I know how can I perform the filter for the phylogenetic tree too?

Thanks!

Hi @cgpeh,
Can I ask what do you mean with 'OTU from taxonomy' ? Could you send here a couple of line to see how it looks like?

What you should do, I believe, is to filter the representative sequences to keep only those in the filtered dataset and then repeat the tree-building process.

Cheers
Luca

@llenzi and this is the online software I referring to (MicrobiomeAnalyst). I need to upload the phylogenetic tree (although it's optional) in order to use some of the available functions.

@llenzi This is the code that I use in that link (for previous post)
qiime feature-table filter-features
--i-table 225-172/table.qza
--p-min-frequency 20000
--o-filtered-table feature-frequency-filtered-table.qza

qiime feature-table filter-seqs
--i-data 225-172/rep-seqs.qza
--i-table feature-frequency-filtered-table.qza
--o-filtered-data filtered-rep-seqs.qza

qiime alignment mafft
--i-sequences 225-172/rep-seqs.qza
--o-alignment aligned-rep-seqs.qza
qiime alignment mask
--i-alignment aligned-rep-seqs.qza
--o-masked-alignment masked-aligned-rep-seqs.qza
qiime phylogeny fasttree
--i-alignment masked-aligned-rep-seqs.qza
--o-tree unrooted-tree.qza

qiime tools export
--input-path unrooted-tree.qza
--output-path exported-tree

Hi @llenzi ,

I would say the software required OTU file is actually generated from the taxa barplot (p-level 6).
qiime taxa barplot
--i-table table.qza
--i-taxonomy taxonomy.qza
--m-metadata-file metadata.tsv
--o-visualization taxa-bar-plots.qzv

I tried to generate a filtered phylogenetic tree using this link (Filter OTU table to generate a smaller phylogenetic tree file - #5 by anranzhilv), but I still get the same error message in that online software. "Tree tip labels do not match feature names in the OTU/taxonomic tables!"

Any guidance would be appreciated!
Thanks!

Hi @cgpeh,

I see while it can not work this way, the name in the tree are the hashed sequences from the rep-sequence file, so they can not match with anything in a collapsed taxonomic table. (Which I expect you exported from the taxa-bar-plots.qzv).

You should use the uncollapesed OTU table if you want to use the tree in the analysis. If it works with the collapsed data, you can try without the tree and compare the results.

Cheers
Luca

Hi @llenzi ,

I see. Is there any potential way that I can produce an uncollapsed OTU table? I would like to try with uncollapsed OTU table.

And may I ask what is the difference between uncollapsed vs collapsed OTU table?

Thank you!!

Hi @cgpeh,
I am so sorry I did not give you enough details!

As result of the denoising step, you obtain two artefact: one containing the ASVs abundance table and one containing the representative sequences for each of the identified ASVs.

Each ASV is derived from a different amplicon sequence, however many of them could be assigned at the same species during the taxonomic assignment step. Once you have the taxonomy for each ASV, you can group any ASV assigned to a species to get the total count for the species, but then you can group to focus on the same genus instead, and so on. I call these tables obtained focusing at each of the taxonomic level, abundance table collapsed at that level. If you open the file and see what is in it, you will notice that in thes table the identificative is the full taxonimic assignation for that group, in the ASV table the identificative for each line was a string for each ASVs. If you look in the tree files you obtained, the tip of each branch are the ASV's string, not the taxonomy after collapsing. That why you should use the denoising output and the tree in your online tool.

Hope makes sense.
Luca

Hi @llenzi

I sort of understand what you mean. So I tried to export the denoising output: table.qza and rep-seqs.qza, but the output is not in the correct format nor the file type (.txt/.csv) that I need. Could you please guide me?

Sorry for too many questions.

Thank you!

Hi @cgpeh,
yes if you export from the ASV table you will obtain a biom file, to convert it on txt you need to use the biom tool, whci is already installed in the qiime environment.

Something like:
biom convert -i otu/features.biom -o features.tsv --to-tsv

Cheers
Luca