This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to arrange multiple TOMplot() and plotDendroAndColors() in one page

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

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.

0 answers

No answers yet.

Log in to answer this question.