Question: Intramodular connectivity and gene significance in WGCNA
gravatar for arunprasanna83
7 months ago by
arunprasanna8340 wrote:


I performed WGCNA for 30 RNASeq samples ( a time-series data). I filtered genes that are significantly expressed over time-series (~3000 genes).

I picked soft thresold power, constructed modules with signed network, intramodular connectivity and identified top hub genes in each module chooseTopHubInEachModule. I wish to plot gene significance vs intramodular connectivity to find interesting module. However, I am stuck at this point. the tutorial seems to make genesignificance with external trait data and I do not have it. How can create genesignificance and then plot intramodular connectivity vs gene significance ?

ADJ1=abs(cor(datExpr, use = "p"))^6
Alldegrees1=intramodularConnectivity(ADJ1, moduleColors)
GS1 = abs(cor(datExpr, use = "p"))^6
#plot gene significance against intramodular connectivity
par(mar = c(4,5,3,1))
for (i in c(1:length(colorLevels)))
  restrict1 = (moduleLabels==whichmodule);
                     GS1[restrict1], col=colorLevels[restrict1],
                     xlab="Connectivity", ylab = "Gene Significance", abline=TRUE)

This throws an error "Error in cor(x, y, use = "p") : 'x' has a zero dimension"

Alldegrees1$Within[restrict1] is 3000 obs. of 4 variables, while GS1 is Largematrix with 9 million elements.

Thanks in advance.

ADD COMMENTlink modified 7 months ago by Kevin Blighe66k • written 7 months ago by arunprasanna8340

You are trying to plot the Intramodular connectivity against an adjacency matrix of correlation values (GS1=ADJ1). Why? What are you trying to prove?

ADD REPLYlink written 7 months ago by andres.firrincieli950

Hi, I am following the tutorial for WGCNA package, III. Using simulated data... Section 7. Module membership, Intramodular connectivity. Basically, above code is from section 7b. Tutorial. Essentially, this give gene significance against intramodular connectivity and helps to infer which of the modules is significant.

ADD REPLYlink written 7 months ago by arunprasanna8340


I think you missed this tutorial:

The result is shown in Fig. 5. The advantage of this second approach is that it can be used for any gene significance measure. A gene significance measure could be defined without reference to a sample trait. For example, it could indicate pathway membership (1 or 0) or gene essentiality (1 or 0), etc.

I personally never tried this without external traits, but I think would be more appropiates inffering which module significantly correlates with your experimental variables by creating a binary trait data. You could follow this part of the tutorial

ADD REPLYlink modified 7 months ago • written 7 months ago by andres.firrincieli950

Can you humour me, please, and replace all instances of cor() in your code with WGCNA::cor()? These are 2 functions with a clash in name, and they do have different functionality.


ADD REPLYlink modified 7 months ago • written 7 months ago by Kevin Blighe66k
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.3.0
Traffic: 1018 users visited in the last hour