...
At this point you will need to identify sample outliers and choose a soft threshold power. These are easy to do and are well documented in the online tutorials. It is suggested that you cluster samples by expression to identify any outliers before this step. This is provided in the attached R script.
Code Block | ||
---|---|---|
| ||
# Choose a soft threshold power- USE A SUPERCOMPUTER IRL ------------------------------------ |
...
Code Block | ||
---|---|---|
| ||
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 topology 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 |
...