knitr::opts_chunk$set(echo = TRUE, fig.align = "center", fig.width = 4, fig.height = 4) devtools::load_all("..") library(dplyr) library(purrr)
plotmics
# load plotmics library(plotmics)
DEcompare()
DEcompare()
draws an ggplot2
-based scatter plot comparing the log2FC of 2 different differential expression contrasts contrasts.
As input, DEcompare()
takes a list of 2 data frames with the columns Geneid
, padj
.
# read the dataframes into a list deg_list <- list.files("../testdata", "diff_exp", full.names = T, recursive = T) %>% purrr::set_names(paste("cond", 1:3, sep = "")) %>% purrr::map(~read.delim(.x)) deg_list[[1]] %>% head()
DEcompare(deg_list = deg_list[1:2])
DEcompare(deg_list = deg_list[1:2])
DEcompare(deg_list = deg_list[1:2], threshold = 0.1)
DEcompare(deg_list = deg_list[1:2], xlim = c(-5,5), ylim = c(-5, 7))
DEcompare(deg_list = deg_list[1:2], main = "This is a title", subtitle = "This is a subtitle", xlab = "This is the X-axis label", ylab = "This is the Y-axis label")
DEcompare(deg_list = deg_list[1:2], color_corners = c("Gray50", "Gray70", "Gray90", "White"))
DEcompare(deg_list = deg_list[1:2], color_corners = c("White"))
DEcompare(deg_list = deg_list[1:2], alpha_corners = c(1, .1, .4, .7))
DEcompare(deg_list = deg_list[1:2], alpha_corners = .2)
Since DEcompare()
outputs a ggplot2
-based scatter plot, it can be further customized with scales
or theme
, etc.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.