Question: Problem with WGCNA - Module-trait relationship
gravatar for amoltej
5 months ago by
amoltej10 wrote:

Hello everyone, 

I am trying to run the WGCNA on my data set of 87 samples. 

First 2 steps executed successfully. In the third step when running following commands I am getting all the "NA"s in the output.

moduleTraitCor = cor(MEs, datTraits, use = "p")
moduleTraitPvalue = corPvalueStudent(moduleTraitCor, nSamples)

please find input files for these commands below

MEs0 -

MEs -

Can someone please help to understand whats happening.

thanks in advance


ADD COMMENTlink modified 5 months ago by Lluís R310 • written 5 months ago by amoltej10
gravatar for Lluís R
5 months ago by
Lluís R310
European Union
Lluís R310 wrote:

The first line calculates the correlation of each trait with the egienvalue of each module, the second line gives you the p-value of said correlations for a given number of p-values. I advise you to use a function named somehow like corAndPvalue which gives both correlations and p-values takeing into account the number of samples with information for each trait

ADD COMMENTlink written 5 months ago by Lluís R310

Hi Lluis, 

Thanks for the reply but the result is still same. I suspect for some reason correlation is not calculating or calculating it to 0 for all the values

ADD REPLYlink written 5 months ago by amoltej10

What code do you use for "the third step"? Are there any NA in your input data? Did you use the "complete" observations option to calculate the correlations?

ADD REPLYlink written 5 months ago by Lluís R310

I am using this code for third step -

Yes, I am using complete observations to calculate correlations. There are no NA's in the input dataset for these commands. you can check input files from my question. 




ADD REPLYlink written 5 months ago by amoltej10
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 109 users visited in the last hour