draw_cum_freq: A function to visualize the inverse-cummulative DEG...

Description Usage Arguments Value Examples

View source: R/draw_cum_freq.R

Description

This function create a ggplot object with the inverse-cummulative DEG distribution

Usage

1
draw_cum_freq(meta_diffexp, nstud)

Arguments

meta_diffexp

data.frame/data.table containing all the input studies

nstud

the number of inputed GEO2R outputs <integer>

Value

ggplot2 object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
library(dplyr)
data(diffexplist)
diffexp <- lapply(diffexplist, function(...) deg_def(..., "pvalue", 
           "Log2FC", 0.05, 0))
diffexp <- rename_col(diffexp, "Symbol")
meta_diffexp <- Reduce(function(...) merge(..., by = "Symbol", all = TRUE),
           diffexp)
meta_diffexp %>%
dplyr::select(dplyr::matches("deg_")) %>%
    data.matrix -> n_deg
meta_diffexp[['ndeg']] <- rowSums(n_deg^2, na.rm = TRUE)
gg <- draw_cum_freq(meta_diffexp, length(diffexplist))
plot(gg)

MetaVolcanoR documentation built on Nov. 8, 2020, 7:52 p.m.