Comparing paired data


(Stef) #1

Hi,
First of all, thanks for a great tool! I think I have said that many times but it also gets better and better so :wink:
I have a new data set with three time points: 1 before treatment, 2 last day of treatment and 3, some time longer after treatment. There are two treatments to compare. I am interested in the following: Does the compositions of the microbiome at the third time point look more similar to the first or the second time point, i.e. how much is the gut flora restored x number of weeks after treatment and does it restore better after one treatment or the other. What would be the best way to approach this? I have used the distance matrices from core_diversity and calculated the average of the distances (both Bray Curtis, Jaccard and UF) for time point 3 to 1 and 3 to 2. Is this legit? The thing is I see quite nice clustering in the PCoA, where e.g. in Bray Curtis 3 clusters pretty close to 1 and not 2 but the average distances are 0.664889037 for 3 to1 and 0.574810612 for 3 to 2, e.g. rather similar and if anything closer to 2 than 1. How can this be explained? Are my calculations logical or did I make a mistake? It there a better way to calculate “microbial community restoration”?
Thanks a lot for your help!
Cheers,
Stef


(Nicholas Bokulich) #2

Hi @Stef,

Thanks! :blush:

You should check out q2-longitudinal. In particular, pairwise-distances would be a better way to compare specific time points while taking differences in a subject’s own composition into account (controlling for inter-subject heterogeneity that would inject too much noise if you are looking at group averages).

Let us know if that fits the bill!


(Stef) #3

Thanks! I will try this out :slight_smile: