Need help with error fromTOMplot network heatmap: "Error in x[, iy] : subscript out of bounds"
0
0
Entering edit mode
3.5 years 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 TOMplot • 2.3k views
ADD COMMENT
0
Entering edit mode

I am having exactly the same issue.

ADD REPLY
0
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

ADD REPLY

Login before adding your answer.

Traffic: 1107 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6