Skip to content

Commit 9fdbb1f

Browse files
committed
Update hyp_dots.R
Fixing FDR scale plotting
1 parent b496f10 commit 9fdbb1f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/hyp_dots.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
dplyr::filter(significance <= cutoff) %>%
109109
ggplot(aes(x=signature, y=label, color=significance, size=size)) +
110110
geom_point() +
111-
scale_color_continuous(low="#114357", high="#E53935", trans=.reverselog_trans(10)) +
111+
scale_color_continuous(high = "#114357", low = "#E53935", trans = scales::log10_trans(), guide = guide_colorbar(reverse = TRUE)) +
112112
labs(title=title, color=color.label) +
113113
theme(plot.title=element_text(hjust=0.5),
114114
axis.title.y=element_blank(),
@@ -118,7 +118,7 @@
118118
if (size_by == "none") {
119119
p <- p + guides(size="none")
120120
} else if (size_by == "significance") {
121-
p <- p + scale_size_continuous(trans=.reverselog_trans(10)) + labs(size="Significance")
121+
p <- p + scale_size_continuous(trans=scales::log10_trans()) + labs(size="Significance")
122122
} else if (size_by == "genesets" ) {
123123
p <- p + scale_size_continuous(trans=scales::log10_trans()) + labs(size="Genesets\nSize")
124124
} else if (size_by == "overlap" ) {
1.58 KB
Loading

0 commit comments

Comments
 (0)