Skip to content

Commit 53a970f

Browse files
committed
Limit size of experimental design plots (and suppress them if there are too many groups)
1 parent daa3b1c commit 53a970f

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

inst/extdata/process_basic_template.Rmd

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ cat(expDesignText(testType = stattest))
855855
if ("design" %in% names(testres$design)) {
856856
## Overall fit
857857
ngroups <- length(unique(testres$design$sampleData$fc))
858-
fh <- max(4, 0.75 * ngroups)
858+
fh <- min(15, max(4, 0.75 * ngroups))
859859
} else {
860860
## Separate fits - always two groups
861861
fh <- 4
@@ -868,9 +868,11 @@ if ("design" %in% names(testres$design)) {
868868
vd <- VisualizeDesign(
869869
testres$design$sampleData, designFormula = NULL,
870870
designMatrix = testres$design$design)
871-
print(cowplot::plot_grid(
872-
plotlist = c(vd$plotlist, vd$cooccurrenceplots), nrow = 1)
873-
)
871+
if (ngroups <= 25) {
872+
print(cowplot::plot_grid(
873+
plotlist = c(vd$plotlist, vd$cooccurrenceplots), nrow = 1)
874+
)
875+
}
874876
cat("\n\n")
875877
cat("<details>\n<summary><b>\nClick to display design matrix and contrast(s)\n</b></summary>\n")
876878
cat("\n````\n")

0 commit comments

Comments
 (0)