12.07.2015 Views

Tutorial for the WGCNA package for R - UCLA Human Genetics

Tutorial for the WGCNA package for R - UCLA Human Genetics

Tutorial for the WGCNA package for R - UCLA Human Genetics

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Scale independenceMean connectivityScale Free Topology Model Fit,signed R^20.0 0.2 0.4 0.6 0.81236 7 816 18209 141012545 10 15 20Soft Threshold (power)Mean Connectivity0 200 400 6001234 5 6 7 8 9 10 12 14 16 18 205 10 15 20Soft Threshold (power)Figure 1: Analysis of network topology <strong>for</strong> various soft-thresholding powers. The left panel shows <strong>the</strong> scale-free fitindex (y-axis) as a function of <strong>the</strong> soft-thresholding power (x-axis). The right panel displays <strong>the</strong> mean connectivity(degree, y-axis) as a function of <strong>the</strong> soft-thresholding power (x-axis).2.b.2Co-expression similarity and adjacencyWe now calculate <strong>the</strong> adjacencies, using <strong>the</strong> soft thresholding power 6:softPower = 6;adjacency = adjacency(datExpr, power = softPower);2.b.3Topological Overlap Matrix (TOM)To minimize effects of noise and spurious associations, we trans<strong>for</strong>m <strong>the</strong> adjacency into Topological Overlap Matrix,and calculate <strong>the</strong> corresponding dissimilarity:# Turn adjacency into topological overlapTOM = TOMsimilarity(adjacency);dissTOM = 1-TOM2.b.4Clustering using TOMWe now use hierarchical clustering to produce a hierarchical clustering tree (dendrogram) of genes. Note that weuse <strong>the</strong> function flashClust that provides a much faster hierarchical clustering routine than <strong>the</strong> standard hclustfunction.# Call <strong>the</strong> hierarchical clustering functiongeneTree = flashClust(as.dist(dissTOM), method = "average");# Plot <strong>the</strong> resulting clustering tree (dendrogram)sizeGrWindow(12,9)plot(geneTree, xlab="", sub="", main = "Gene clustering on TOM-based dissimilarity",labels = FALSE, hang = 0.04);The clustering dendrogram plotted by <strong>the</strong> last command is shown in Figure 2. In <strong>the</strong> clustering tree (dendrogram),each leaf, that is a short vertical line, corresponds to a gene. Branches of <strong>the</strong> dendrogram group toge<strong>the</strong>r denselyinterconnected, highly co-expressed genes. Module identification amounts to <strong>the</strong> identification of individual branches

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!