Skip to content

Commit

Permalink
change multipanelfigure to gridExtra
Browse files Browse the repository at this point in the history
  • Loading branch information
salzcamino committed Apr 8, 2024
1 parent 8359aa2 commit ed0bf47
Showing 1 changed file with 10 additions and 37 deletions.
47 changes: 10 additions & 37 deletions inst/rmarkdown/CeldaCG_PlotResults.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ require(knitr)
require(ggplot2)
require(gridExtra)
require(SingleCellExperiment)
require(multipanelfigure)
sce <- params$sce
features <- params$features
Expand Down Expand Up @@ -200,42 +199,16 @@ for (i in seq_len(L)) {
altExpName = altExpName,
modules = i
)
# p2 <- moduleHeatmap(
# sce,
# featureModule = i,
# topCells = NULL,
# displayName = displayName,
# moduleLabel = "All cells",
# useRaster = TRUE
# )
# p3 <- moduleHeatmap(
# sce,
# featureModule = i,
# topCells = 100,
# displayName = displayName,
# moduleLabel = "Top 100 cells",
# useRaster = TRUE
# )
fig <- multi_panel_figure(rows = 2,
columns = 2,
figure_name = paste0("fig", i))
fig <- fill_panel(fig,
p1,
row = 1,
column = 1:2,
label = "")
fig <- fill_panel(fig,
p2[[i]],
row = 2,
column = 1,
label = "")
fig <- fill_panel(fig,
p3[[i]],
row = 2,
column = 2,
label = "")
plts <- list(p1,p2[[i]],p3[[i]])
fig <- gridExtra::marrangeGrob(plts,
nrow = 2,
ncol = 2,
layout_matrix = matrix(c(1,1,2,3),
nrow = 2,
ncol = 2,
byrow = TRUE),
top = NA)
fig.list[[i]] <- fig
}
for (i in seq_len(L)) {
Expand Down

0 comments on commit ed0bf47

Please sign in to comment.