how to arrange multiple TOMplot() and plotDendroAndColors() in one page
0
0
Entering edit mode
4.2 years ago
kingwind333 ▴ 20

In WGCNA, I got several TOM and dendroandcolor plots via the TOMplot() and plotDendroAndColors(). I want to arrange them in one page in a pdf file which gets the sagitta vector graph.

p1 = TOMplot(plotDisscons, selectdissTreecons,selectdissColorscons)
p2 = plotDendroAndColors(net$dendrograms[[1]], mergedColors[net$blockGenes[[1]]], "Module colors", setLayout = T, dendroLabels = FALSE, hang = 0.03, addGuide = TRUE, guideHang = 0.05)
layoutMatrix = matrix(c(1,2),byrow = FALSE)
multiplot(p1, p2, layout = layoutMatrix)

Then the returned result is not a combined figure, but the value of p1 and p2. enter image description here p1 and p2 are not figures either, but the lists, list of 4, or list of 1...enter image description here

I found WGCNA functions TOMplot() and plotDendroAndColors() could not be used in the same way as ggplot2 functions, such as p1 = ggplot(), p2 = barchart()...... because class() p1 or p2 here you got the type 'gg' 'ggplot'.

Then, could you please tell me how to combine the figures, which are results of TOMplot() and plotDendroAndColors(), into one page of pdf. Thanks!

WGCNA TOMplot plotDendroAndColors multiplot • 1.4k views
ADD COMMENT
0
Entering edit mode

I am not sure, but take a look at the setLayout parameter that can be passed to both TOMplot() and plotDendroAndColors(). If all else fails, just save them to disk as PDFs and then bind them together via, e.g., PDF-Shuffler or Adobe, or something else.

ADD REPLY

Login before adding your answer.

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