gravatar for arunprasanna83

2 hours ago by

Hello,

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)
#Genesignificance 
GS1 = abs(cor(datExpr, use = "p"))^6
#plot gene significance against intramodular connectivity
colorLevels=unique(moduleColors)
par(mfrow=c(2,as.integer((0.5+length(colorLevels)/2))))
par(mar = c(4,5,3,1))
for (i in c(1:length(colorLevels)))
{
  whichmodule=colorLevels[[i]];
  restrict1 = (moduleLabels==whichmodule);
  verboseScatterplot(Alldegrees1$kWithin[restrict1],
                     GS1[restrict1], col=colorLevels[restrict1],
                     main=whichmodule,
                     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.



Source link