Need help with error fromTOMplot network heatmap: "Error in x[, iy] : subscript out of bounds"
0
0
Entering edit mode
5 months ago
dlsublime • 0

I am working with Hovarth's tutorial (https://horvath.genetics.ucla.edu/html/CoexpressionNetwork/Rpackages/WGCNA/Tutorials/index.html) to explore connections between gene expression and formed modules using a network analysis approach (R package WGCNA) in my RNAseq data set.

While exploring step 5 of Part 1 (Network visualization using WGCNA functions; See R script here: https://horvath.genetics.ucla.edu/html/CoexpressionNetwork/Rpackages/WGCNA/Tutorials/FemaleLiver-05-Visualization.R) I receive an error that I cannot seem to figure out. See below for code:

# Calculate topological overlap
dissTOM = 1-TOMsimilarityFromExpr(datExprSe, power = 6);
# Transform dissTOM with a power to make moderately strong connections more visible in the heatmap
plotTOM = dissTOM^7;
# Set diagonal to NA for a cleaner, more readable plot
diag(plotTOM) = NA;
# Call the plot function
sizeGrWindow(9,9) # left as Hovarth default

TOMplot(plotTOM, geneTree, moduleColors, main = "Network heatmap plot, all genes") # After running this I get the error seen below in bold


Error in x[, iy] : subscript out of bounds

Note: I ran the entire tutorial without issue using Hovarth's data set and code. My input is modeled after how their tutorial was created. Any help/advice is welcome!

WGCNA Error TOMplot • 615 views