Weighted unifrac. How to get the raw values and present it in barplot

Hello,

I would like to present my unifrac values on a barplot.
Simmilar to this: https://www.researchgate.net/publication/319010855/figure/fig5/AS:[email protected]/Inter-individual-variations-of-the-gastrointestinal-microbiota-after-feeding-Bar-plot.png

Additionally, I would like to obtain unifrac raw values, those before calculating distace matrix. Is the a chance to get it?

Thanks

Hi @Jo_mee,

See qiime diversity beta-group-significance — looks like that is exactly what you want.

Good luck!

Dear Nicholas,

Thanks for the answer.
I have tested this but I don't really feel what I see.
I am a bit lost in terms of interpreting the results.
Could you please support me with my thinking?

I tell you how I see things with Unifrac.
I followed Moving Pictures tutorial up to alpha and beta diversity part. I got the complete folder of core metrics results. I am interested in weighted unifrac: distance matrix / emperor / pcoa results files. As the tutorial suggested I did in the next step I analyzed sample composition using the command diversity beta-group-significance and exported results with tools export.
So what I get in the weighted_unifrac_distance_matrix.qza, exported to txt, is a matrix of distances each sample vs. each sample.
What are those values there? I understand them as a set of unifracs. OR are those the differences of unifrac meaning each sample has its own unifrac value and the difference is presented in this matrix form?

When I did diversity beta-group-significance /permanova test/ I got data presented in a form of boxplots. Is there a way to have them as barplots?

The exported folder contains raw data.tsv. There I found a list of distances in a column. The values are different from weighted_unifrac_distance_matrix.txt.

I am aware I am asking a lot of questions. The reason is that I want to understand what I have in hand. I got a request to generate a barplot with the unifrac values on the Y axis as on the pic below.

I found in qiime1 tutorial a script make_distance_comparison_plots.py. Is it the equivalent of diversity beta-group-significance?

What command is best for it?

Best regards and thank you for your time!
Joanna

1 Like

Those are the unifrac distances between each pair of samples. Those are the data used to generate the boxplots.

No. Barplots are not a good way to present this information — they tend to be misleading and do not represent distributions of data as well as boxplots do. If you would like to make barplots, you will need to use an external program to make barplots from the distance matrix data that you already exported.

I am not sure it is the equivalent, but it is a similar command. We cannot provide support for qiime1 commands on this forum, though, so if you have questions about that command please ask on the qiime1 forum.

Good luck!

Dear Nicholas,

Thanks for answers. It gets clearer and clearer…
I found that such barplots I can generate in Matlab. Yet I follow your advice and stay with boxplots

Those are the unifrac distances between each pair of samples. Those are the data used to generate the boxplots.

Should I understand that unifrac index is de facto unifrac distance between two samples?
What about the raw_data.txt exported after exporting it after diversity beta-group-significance command.
What are the distances there?
I’m trying to understand what I have in hand.

As far as I know, that should contain the same distance data but in a data frame rather than a matrix, and containing sample information for each sample in the pairs.

Ah yes - true.
The values are the same for each pair of samples.

So if I understand correct the UniFrac index value is always calculated for a pair of samples as a matter of comparison between those two samples, never for single sample.

Yes, that is correct

1 Like

Thanks! I know now what to do :slight_smile:

2 Likes

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