Hello,
I have a question about the results of WGCNA for selecting soft-thresholding power, all power numbers are below the line in the scale independence graph, and I don't know which power I need to select for next step.I couldn't insert the picture to be more clear, but code that I used was as follows:
# choose soft-thresholding power
powers = c(c(1:10), seq(from = 12, to=20, by=2))
sft = pickSoftThreshold(datExpr, powerVector = powers, verbose = 5)
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.9,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")
for (i in 1:dim(datExpr)[2]) {
datExpr[,i] <- c(as.double(datExpr[[i]]))
}
mahnazkiani : How to add images to a Biostars post
Thank you for sharing the link
Why are you using
-sign(sft$fitIndices[,3])*sft$fitIndices[,2],
here?