Skip to content
Snippets Groups Projects

Figures valentina

Merged Susheel Busi requested to merge figures_valentina into master
1 file
+ 8
0
Compare changes
  • Side-by-side
  • Inline
@@ -26,12 +26,17 @@ counts$tool <- GENE_TOOL_NAMES[counts$tool]
colnames(counts) <- sapply(colnames(counts), function(x){ ifelse(x %in% names(ASM_TOOL_NAMES), ASM_TOOL_NAMES[x], x) })
# reshape
counts_melted <- reshape2::melt(counts, id.vars="tool")
# Gene tool name - as ordered factor
counts_melted$tool <- factor(counts_melted$tool, levels=GENE_TOOL_NAMES, ordered=TRUE)
# Gene tool name - short version
counts_melted$tool_name <- sapply(as.character(counts_melted$tool), function(x){ unlist(strsplit(x, " "))[1] })
## PLOT
counts_p <-
ggplot(data=counts_melted, aes(x=tool, y=value, fill=variable)) +
geom_col(position = "dodge") +
scale_fill_manual(values=ASM_TOOL_COLORS$notmeth, guide="legend") +
facet_wrap(vars(tool_name), nrow=1, scales="free_x") +
labs(
# title="",
# subtitle="",
@@ -44,6 +49,9 @@ counts_p <-
legend.title=element_blank(),
# grid
panel.grid=element_blank(),
# strip
strip.background=element_rect(fill="white"),
strip.text=element_text(size=12, color="black"),
# axes
axis.title=element_text(size=12, color="black"),
axis.text.y=element_text(size=9, color="black"),
Loading