Beta-rarefaction diversity matrix export or mean distance?

Hello,

Thanks for all your help so far!

I’ve been successful in running beta diversity rarefaction, but I would like the output data matrix. For example, if I ran beta-rarefaction using bray-curtis, I would like to be able to export the bray-curtis matrix file. I want to do this because I have multiple samples for each species. When building the upgma dendrogram, I would like to be able to find the mean distance of samples from of species and plot a single tip instead of plotting each sample as individual tips. Is there a way to do this?

I know there is a group function “qiime feature-table group.” However, I think my output is less prone to errors if I group the beta diversity distances and not my sample groups.

Thanks

Hi @Biancabrown,

That’s an interesting idea.

If I’m understanding correctly, for some metric M (in particular Bray Curtis) you’d like a new metric M^{mean} where

M^{mean}(sp_A, sp_B) = mean(\{M(a, b) | a \in sp_A, b \in sp_B\})

Which is then used to create a UPGMA tree normally, resulting in a tree where the tips are all species instead of samples.

Unfortunately there isn’t a good way to accomplish that. Furthermore, I’m not certain if the mean of a metric is itself a metric (obeying the triangle inequality for example).

As you’ve noted, there is feature-table group, but it’s not the same.

I’m not aware of any libraries or tools that can accomplish this, has anyone else run across a way to do this?

Hello,

I’m not sure if anyone else has done it this way. However, this can be done R using the vegan function meandist.
First you calculate your metric then you find the mean distance based on a grouping of your preference. I’m sure I could potentially accomplish all this R, but I’m not sure how I would carry out rarefaction prior to metric of interest.

Hey @Biancabrown,

In that case, you could always run the qiime feature-table rarefy command N times and then run the qiime diversity beta command on the resulting tables. That’s all that beta-rarefaction is doing behind the scenes. Then you should be able to use those distance matrices in vegan.

Let me know if you need more detail on that process, but you should be able to just use qiime tools export to get the TSV files for R consumption.

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