qiime longitudinal pairwise-differences with dependent groups and states

Dear QIIME users,

I have a doubt about the proper statistical analysis to use with my kind of samples. I have animals that have been sampled along time in two different parts (healthy and lesional). I wanted to confirm if qiime longitudinal pairwise-differences consider that the “group” variable is independent. Moreover, I would like to know what do you suggest to do in cases the group variable is also dependent (e.g. so healthy and lesional part of the same individual).

Thanks in advance for your attention.
Best regards,
Anna

Welcome to the forum, @AnnaC!

Don’t use this test if you want to compare independent groups only — use something like qiime diversity alpha-group-significance instead (if you are testing alpha diversity differences between independent groups)

That would be a better use of this test. Even though the plugin is designed for longitudinal studies and hence uses lots of time-themed language, the test that’s being run under the hood is appropriate for other types of paired samples. So you could use this to show, for example, that alpha diversity is higher (or lower) in healthy or lesional sites across individuals.

I hope that helps!

Hi @Nicholas_Bokulich!

Thanks for the fast answer. Sorry, I think I did not explain myself.

Indeed I am using this for longitudinal samples, for animals that have undergone treatment through time. So, the variable “state” is time, which is dependent. My doubts come from the grouping variable “group”, which is the healthy and lesional counterpart from the animal (so, no independent groups). Is it correct to use this test when my grouping variable is also dependent?

Here is one of the script:
qiime longitudinal pairwise-differences
–m-metadata-file sample-metadata_corrected.tsv
–m-metadata-file shannon_vector.qza
–p-metric shannon
–p-group-column Sample_type \ ###This variable is also dependent
–p-state-column Time
–p-state-1 D_0
–p-state-2 D_7
–p-individual-id-column Subject
–p-replicate-handling random
–o-visualization shannon-pairwise-diff-D0_D7.qzv

Many thanks again for your patience!
Best,

Anna

1 Like

Hi @AnnaC,
No — this test uses only one dependent variable (state is linked to individual). You can definitely run the command you wrote out, but sample type would be independent.

It looks like you probably have more than one time point. Give linear-mixed-effects a try, it is a bit harder to interpret but I think would be a better fit for your design!

1 Like

Thanks again @Nicholas_Bokulich!

Now having a look at linear-mixed-effects, and I am not sure where I can add the healthy/lesional part of my samples (dependent variable). The main comparison I want to perform is the evolution of the healthy and lesional parts through time with a specific treatment. So, both group and state variables would be dependent on my case. However, if the main objective is to compare the evolution of a specific skin region through time, rather than comparing healthy to lesional, maybe it is just okay to consider the skin regions as independent? Not quite sure how to proceed with this analysis.

“This implementation takes at least one numeric state-column (e.g., Time) and one or more comma-separated group-columns (which may be categorical or numeric metadata columns; these are the fixed effects) as independent variables in a LME model (…).”

Thanks one more time.
Best regards,

Anna

Hi @AnnaC,
For LME you would include region and treatment as fixed effects (either via the formula or as a list to the “group” parameter). Since you are specifying the individual ID, this is taken into account when measuring the effects of group and region and state (state is set with a separate parameter, essentially because it is used for plotting in the visualization, but is treated as a fixed effect along with everything else).

I hope that helps!

1 Like

Many thanks @Nicholas_Bokulich for your patience.
Can I confirm this command would be correct?

qiime longitudinal linear-mixed-effects
–m-metadata-file sample-metadata_corrected.tsv
–m-metadata-file shannon_vector.qza
–p-metric shannon
–p-group-columns Sample_type \ ##lesional or healthy part of the animal
–p-state-column Time
–p-individual-id-column Subject
–o-visualization linear-mixed-effects-sample-type.qzv

Now, I am going to learn how to interpret the results!
Again, many thanks.
Best regards,

Anna

Hi @AnnaC,
That looks correct… though you could add more info if desired, e.g.,:

You could also do something like --p-group-columns Sample_type,Treatment

Good luck!

1 Like

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