WGCNA can not reach Clusters
1
0
Entering edit mode
19 months ago
Recep • 0

Hello,

i have clustered my genes through this tutorial.

I want to correlate each these clusters with disease scores. Though i cant find my clusters as a dataframe.

How can I find the dataframe showing the genes and the clusters they belong to?

WGCNA • 633 views
ADD COMMENT
0
Entering edit mode
19 months ago

I want to correlate each these clusters with disease scores. Though i cant find my clusters as a dataframe.

You first calculate the module (cluster) eigengenes (MEs) with

MEs = moduleEigengenes(datExpr, moduleColors)$eigengenes

Then use the MEs to calculate the correlation values and significance with the disease score

moduleTraitCor = cor(MEs, datTraits, use= "p") # calculate the correlation (pearson)
moduleTraitPvalue = corPvalueStudent(moduleTraitCor, nSamples) # calculate the pvalues

If you do not understand what the MEs are, read the paper

ADD COMMENT
0
Entering edit mode

Thank you! yes i understand, but i dont want to correlate with pearson, but linear mixed models. So i just need the clusters.

Therefore i need a code like:

mixed.lmer <- lmer(MEs ~ DiseaseScores + (1|df$PatientID_x), data = df)
ADD REPLY
0
Entering edit mode

Hi Recep,

sorry for the late reply. To subset the expression matrix of each module from the original datExpr you could use the following chunck of code:

datExpr_blue<-datExpr[,moduleColors=="blue" ] # to extract the expression matrix of the blue module

edit: I would run the lmer only for modules that show significant correlation with the DiseaseScores.

ADD REPLY

Login before adding your answer.

Traffic: 3021 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6