This is a test version of Biostars. For the public version, visit https://www.biostars.org.
WGCNA time course study

Hello,

I have an RNA-Seq dataset from a vaccine study with multiple groups. This is a longitudinal study where samples were collected from the same individual across multiple timepoints. Each group is comprised of six individuals but the total number of samples is 336.

Can I perform WGCNA on this dataset given that each group is comprised of 6 animals?

Are there any specific steps that should be done as this is a repeated measures study and all the sample are not independent?

Thank you.

longitudinal wgcna

1 answer

Your n for WGCNA is 336, not 6. Network construction pools all samples to estimate gene-gene correlations, and 336 is plenty (the authors' floor is around 15). So on the "can I", yes.

The repeated measures problem is real but it bites somewhere other than where you're worried. Network construction is fairly tolerant of it, since you're estimating a correlation structure rather than testing hypotheses. Where it matters is the module-trait step: feed 336 samples into moduleTraitCor as if they were independent and your p-values come out badly anticonservative, because your real independent units are individuals, not samples. Test the module eigengenes with a mixed model instead, something like ME ~ timepoint * group + (1|individual), and take your inference from there rather than from the correlation heatmap's p-values.

The other thing worth checking: in longitudinal data the between-individual baseline differences are often bigger than the treatment effect, so modules can end up mostly encoding individual identity rather than vaccine response. Plot a module eigengene coloured by individual and see whether it stratifies that way. If it does, consider centering each gene within individual before building the network, so it reflects change rather than absolute level. Whether you want that depends on your question -- centering finds co-varying response programs, not centering finds programs that differ between animals.

Log in to answer this question.