WGCNA - Network construction and module detection
0
0
Entering edit mode
2.3 years ago
Recep • 0

Hello im using WGCNA to cluster genes. I got this tutorial code from here.

I got the concept and how to choice the power but I am wondering, how can i select the parameters of power (like here from 10 to 30 and c is between 1 and 10) and h, which is here 0.90.

powers = c(c(1:10), seq(from =10, to=30, by=1)) #choosing a set of soft-thresholding powers
sft = pickSoftThreshold(datExpr, powerVector=powers, verbose =5, networkType="signed") #call network enter code heretopology analysis function

sizeGrWindow(9,5)
par(mfrow= c(1,2))
cex1=0.9
plot(sft$fitIndices[,1], -sign(sft$fitIndices[,3])*sft$fitIndices[,2], xlab= "Soft Threshold (power)", ylab="Scale Free Topology Model Fit, signed R^2", type= "n", main= paste("Scale independence"))
text(sft$fitIndices[,1], -sign(sft$fitIndices[,3])*sft$fitIndices[,2], labels=powers, cex=cex1, col="red")
abline(h=0.90, col="red")
plot(sft$fitIndices[,1], sft$fitIndices[,5], xlab= "Soft Threshold (power)", ylab="Mean Connectivity", type="n", main = paste("Mean connectivity"))
text(sft$fitIndices[,1], sft$fitIndices[,5], labels=powers, cex=cex1, col="red")

#from this plot, we would choose a power of 18 becuase it's the lowest power for which the scale free topology index reaches 0.90
R Bioconductor WGCNA • 862 views
ADD COMMENT
0
Entering edit mode

I'm not sure I understand your question but

powers is a vector from 1 to 30.

> powers = c(c(1:10), seq(from =10, to=30, by=1))
> powers
 [1]  1  2  3  4  5  6  7  8  9 10 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
[31] 30

which can be simplified in this way

> powers = c(seq(from =1, to=30, by=1))
> powers
 [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

h=0.90 in abline(h=0.90, col="red") just draw a straight horizontal red line at the specified coordinates.

The power values from 12 to 30 are generally used to calculate the scale free topology fitting index for signed network (see networkType="signed"). In other words, depending on your dataset you would expect to achieve a 0.9 scale free topology index within the range 12 to 30.

cross-posted on bioconductor: https://support.bioconductor.org/p/9146232/

ADD REPLY

Login before adding your answer.

Traffic: 1553 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