Skip to content

Commit

Permalink
Update enrichmat
Browse files Browse the repository at this point in the history
Fix adjusted p-value legend to reflect choice of padj_cutoff.
  • Loading branch information
TylerSagendorf committed Mar 7, 2024
1 parent cdc0d6a commit cc077f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: MotrpacRatTraining6moWAT
Type: Package
Title: Helper Functions for the MotrpacRatTraining6moWATData R Package
Version: 1.0.0
Date: 2024-02-01
Version: 1.0.1
Date: 2024-03-07
Authors@R:
c(
person(given = "Tyler", family = "Sagendorf",
Expand Down Expand Up @@ -56,7 +56,7 @@ Imports:
tools,
utils,
WGCNA
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE)
URL:
https://motrpac.github.io/MotrpacRatTraining6moWAT/,
Expand Down
5 changes: 3 additions & 2 deletions R/enrichmat.R
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ enrichmat <- function(x,
lt_args <- list(
title = padj_legend_title,
at = 1:2,
labels = latex2exp::TeX(c("$< 0.05$", "$\\geq 0.05$")),
labels = latex2exp::TeX(sprintf(c("$< %g$",
"$\\geq %g$"), padj_cutoff)),
legend_gp = gpar(fill = c(padj_fill, "white")),
grid_height = heatmap_args$heatmap_legend_param$grid_width,
grid_width = heatmap_args$heatmap_legend_param$grid_width,
Expand Down Expand Up @@ -258,7 +259,7 @@ layer_fun <- function(j, i, x, y, w, h, f)
r = pindex(rmat, i, j) / 2 * cell_size,
gp = gpar(col = ifelse(pindex(padj_mat, i, j) < padj_cutoff,
"black", NA),
fill = col_fun(pindex(NES_mat, i, j))
fill = col_fun(pindex(NES_mat, i, j))
))
}

Expand Down

0 comments on commit cc077f1

Please sign in to comment.