WGCNA automatic vs manual network creation
2
0
Entering edit mode
@akridgerunner-7719
Last seen 8.4 years ago
United States

Hello,

I've created trees using what I thought were two relatively equivalent approaches, but I'm getting two very different results. Dr. Langfelder, if you're out there could you glance at this?

For the first network I'm manually generating a tree from a single block of some ~17,000 probes. For the second I break it in two using a max block size of 10,000. Both are signed networks using bicorr and a deep split of 3. I made sure to use the same datExpr and datTraits input objects. I've attached figures of the trees. It's also very surprising how poorly module assignment performed in block 2 of the automatically generated network, with most probes being thrown into gray. Now I'm desperately curious as to what separates these two approaches so much?

R script generate "automatic network":

adjacency_sp10_bicor_signed = adjacency(datExpr, power= 10, type="signed", corFnc="bicor")

TOM_sp10_bicor_signed = TOMsimilarity(adjacency_sp10_bicor_signed, TOMType="signed", verbose=5)

dissTOM_sp10_bicor_signed = 1-TOM_sp10_bicor_signed

geneTree = hclust(as.dist(dissTOM_sp10_bicor_signed), method = "average");

sizeGrWindow(12,9)

plot(geneTree, xlab="", sub="", main = "GSE10325 Active CD19B Affy GCRMA SP10", labels = FALSE, hang = 0.04);

dynamicMods_hybrid = cutreeDynamic(dendro = geneTree, distM = dissTOM_sp10_bicor_signed, method="hybrid", deepSplit = 3, pamRespectsDendro = TRUE, minClusterSize = 100);

moduleColors = labels2colors(dynamicMods_hybrid)

sizeGrWindow(8,6)

plotDendroAndColors(geneTree, moduleColors, "Dynamic Tree Cut", dendroLabels = FALSE, hang = 0.03, addGuide = TRUE, guideHang = 0.05, main = "GSE10325 GCRMA Affy CDF Signed TOM SP10, Hybrid Cut, DeepSplit=3, minMod=100, 29 modules")

R script to generate "manual network":

net = blockwiseModules(datExpr, power = 10, corType="bicor", deepSplit = 3,
                       TOMType = "signed", minModuleSize = 100,
                       numericLabels = TRUE,
                       pamStage = TRUE, pamRespectsDendro = TRUE,
                       saveTOMs = TRUE,
                       saveTOMFileBase = "GSE10325CD19B-Active-SP10-bicor-ds3",
                       verbose = 5,
                       maxBlockSize = 10000)

What's going wrong here?

Thanks! - Robert

Manually generated network:

Automatically generated network:

WGCNA • 5.9k views
ADD COMMENT
3
Entering edit mode
@peter-langfelder-4469
Last seen 12 days ago
United States

In the call to blockwiseModules, you should include networkType = "signed" (TOMType has a different meaning). But it would also seem to me that there's something wrong with the plotting code for the block-wise dendrograms. The hockey-stick-like branches should correspond between the full and the blockwise analysis, and they don't seem to. Also, if you haven't done so, run goodSamplesGenes(datExpr) to check whether you have any genes with excessive numbers of missing data, although I don't imagine that could be the cause for this.

ADD COMMENT
0
Entering edit mode

Thanks Peter I'm currently running:

net = blockwiseModules(datExpr, power = 10, corType="bicor", deepSplit = 3,
                       networkType = "signed", TOMType = "signed", minModuleSize = 100,
                       numericLabels = TRUE,
                       pamStage = TRUE, pamRespectsDendro = TRUE,
                       saveTOMs = TRUE,
                       saveTOMFileBase = "GSE10325CD19B-Active-SP10-bicor-ds3",
                       verbose = 5,
                       maxBlockSize = 10000)

Do I need to specify both networkType and TOMType? The package documentation is vague on this:

"networkType : Allowed values are (unique abbreviations of) "unsigned", "signed", "signed hybrid". See adjacency.
TOMType: One of "none", "unsigned", "signed". If "none", adjacency will be used for clustering. If "unsigned", the standard TOM will be used (more generally, TOM function will receive the adjacency as input). If "signed", TOM will keep track of the sign of correlations between neighbors."

 

ADD REPLY
1
Entering edit mode
@peter-langfelder-4469
Last seen 12 days ago
United States

See this short report on the differences between signed and usigned TOM:

http://labs.genetics.ucla.edu/horvath/CoexpressionNetwork/Rpackages/WGCNA/TechnicalReports/signedTOM.pdf

 

 

ADD COMMENT
0
Entering edit mode

Great, thanks! I read this some time ago and use signed network analysis. It looks like I confused the TOMtype setting with the networkType setting, and by omitting the latter was generating unsigned networks. My new effort now looks beautiful, with the two blocks from the automatic approach resembling the single block of the manual approach. Thank you, deeply.

ADD REPLY
0
Entering edit mode

Link is down, unfortunately.

ADD REPLY
0
Entering edit mode

Here's the new link: https://horvath.genetics.ucla.edu/html/CoexpressionNetwork/Rpackages/WGCNA/TechnicalReports/signedTOM.pdf

I don't understand what's the difference between the role of network type and TOMType here. I noticed that there isn't a "signed hybrid" option for TOMType, so does it make sense to use networkType = "signed hybrid", TOMType = "signed"?

ADD REPLY

Login before adding your answer.

Traffic: 692 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