how to take into account sample replicates in beta-group-significance testing?

Hello,

I was wondering if it's necessary to take into account repeated measures or nested relationships when performing beta diversity significance testing, such as with beta-group-significance or adonis? If so, is it possible to specify this within QIIME2 commands?

For a specific example, in my data I have ten subjects who donated one fecal sample each, which was then treated using three different methods. Additionally, there are three replicates per sample per treatment method. (E.g. Subject 1 --> Fecal Sample --> MethodA x3, MethodB x3, MethodC x3). I am testing whether beta diversity is significantly different based on treatment method, so it seemed like some level of grouping was necessary, given the nested relationships?

Thank you!

Hi @Dot,

There are two ways to answer this question. Im currently waiting for data to process and drinking :tea: so I'm going to give you the long winded explanation while my code compiles instead of hitting people with swords (expand for relevant XKCD)

a single panel xkcd comic.  The text across the top says "The #1 excuse for programers slacking off:  "My code is compiling". In the foreground, two stick figures are fighting with swords, one on a rolling chair. Through an open door, someone yells "Hey, get back to work". A sword fighter responds "compiling" and the person in hte other room says "Oh. Carry on"
source: XKCD

The short answer to this is yes. Adonis will take a nesting variable, that you can specify with a "/" symbol. So, for example treatment \ cage would let me test whether there's a treatment effect by cage in a mouse study.

However... this may not be the best analytical approach for what you're doing! (Your design is a semi new variant on what I'm used to. Huh.) I would first recommend visualizing your data in an ordination plot (PCoA or rPCA) to see what's driving clustering. My intutition is that it's by your donor, because with 10 donors the individual signature is going to be strong.

But, that's not your question. You want to know if the samples from the same individual with the same treatment are more or less similar to samples from the same individual with a different treatment. So, I would probably recommend pulling out the distance matrix, filtering for pairs of distances, and then doing a permutative t-test. It's not implemented in qiime2 (although its on my long list of things to do in my free time :upside_down_face: ).

You might find the results of a similar experiment useful as well:

https://www.nature.com/articles/nbt.3981

Best,
Justine

5 Likes

Hi Justine, thanks so much for the super prompt and helpful reply! :star_struck:
I plotted a weighted unifrac PCoA and visually it seems like samples from one of the treatments is clustering away from the others.

But, that's not your question. You want to know if the samples from the same individual with the same treatment are more or less similar to samples from the same individual with a different treatment.

Hmm...that does sound kind of right but I'm not sure, let me try to rephrase. I want to know if the samples that had the same treatment are more or less similar to samples that had a different treatment. I was just trying to take into account in the model the presence of multiple subjects and multiple replicates because I thought that there might be within-subject or within-replicate similarities that could bias the results. Sorry if I was unclear before or am still being unclear!!

So, for example treatment \ cage would let me test whether there's a treatment effect by cage in a mouse study.

Got it! I think my confusion comes in due to the presence of both multiple subjects and multiple replicates in my data...so would I need to specify multiple nesting variables? So in the mouse example I think it would be like if there were three treatment events of each treatment as well as multiple cages.

So sorry if this is convoluted or I'm overthinking things :grimacing:

Thanks!

1 Like

Hi @Dot,

Not too convoluted at all!

I guess I'm making an assumption (based on lots of past experience :older_woman:) that your subjects will be more similar to themselves than to anyone else. So, like you said, you have two levels of nesting:

subject -> replicate

If you want to know if the treatments are different across the samples from the sample individual, I'd use the method described able. Again, this assumes that you're doing individual nesting. Otherwise, a permanova may work for you, which would have an equation for adonis like

treatment \ subject.

Because then you'd say the replicates belong to a subject, and we're going to nest by subject. ...I think. Becuase the replicates should be interchangable, so it shouldnt matter if youre comparing R1, R2, etc within the same subject because the 1, 2, 3, etc are just arbitary assignments. Or, again, this is my assumption.

Personally, I'm just vaguely wary of adonis in this case because I've seen it misused in the past. This may actually be a good use and I'm being closed minded!

Best,
Justine

2 Likes

Hi Justine, ah I see! Thanks so much for your input. This makes a lot of sense and really helped me to think through things...thanks again :grinning:

1 Like

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