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

I am working with Hovarth's tutorial ( 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: 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 TOMplot • 1.8k views
Entering edit mode

I am having exactly the same issue.

Entering edit mode

This happen because the gene tree and plotTOM have different number of genes. I would open a new thread and post the entire code used to generate datExprSe, geneTree and moduleColors


Login before adding your answer.

Traffic: 2103 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6