Skip to content

Commit

Permalink
adjust to very large panels due to many groups
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichl committed Dec 24, 2023
1 parent 1b9d4a2 commit 343714b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions workflow/scripts/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ ggsave_new <- function(filename, results_path, plot, width=5, height=5){
dir.create(results_path, recursive = TRUE)
}

# failsafe for large plots
width <- min(100, width)
height <- min(100, height)

for (format in c('png')){
ggsave(
paste0(filename,'.',format),
Expand Down
2 changes: 2 additions & 0 deletions workflow/scripts/volcanos.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ library(EnhancedVolcano, quietly=TRUE)
library(patchwork, quietly=TRUE)
library(ggplot2)

options(ragg.max_dim = 100000) # required for large volcano panels

# source utility functions
# source("workflow/scripts/utils.R")
snakemake@source("./utils.R")
Expand Down

0 comments on commit 343714b

Please sign in to comment.