volcano_plot: Quickly plot a volcano plot

Description Usage Arguments Details Value Examples

View source: R/quick_plots.R

Description

'volcano_plot()' plots a volcano plot

Usage

1
volcano_plot(fit, fc_cutoff = 2, pval_cutoff = 0.05)

Arguments

fit

tidied dataframe of fit results

fc_cutoff

cutoff to determine what is considered differentially expressed

pval_cutoff

plots horizontal line at p-value

Details

Like any other ggplot object, you can customize the theme of the plot. Note that this function generates a fairly generic volcano plot, and thus is intended for quick exploratory purposes (much like the intention behind 'qplot()').

Value

a 'list' containing a volcano plot (ggplot object) and the data used to generate the volcano plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# As an EDA step within a pipeline of functions

counts <- readr::read_delim("data/GSE60450_Lactation-GenewiseCounts.txt", delim = "\t")
meta <- readr::read_delim("data/SampleInfo_Corrected.txt", delim = "\t") %>%
  mutate(FileName = stringr::str_replace(FileName, "\\.", "-"))

id <- as.character(counts$EntrezGeneID)
my_design <- check_sample_names(counts, c(1,2), meta, FileName) %>%
  purrr::pluck("meta") %>%
  make_design_matrix(., c("Status"))

check_sample_names(counts, c(1,2), meta, FileName) %>%
  purrr::pluck("mod_count") %>%
  filter_genes(., id, "edgeR") %>%
  make_voom(., my_design) %>%
  model_limma() %>%
  make_contrasts(design_matrix = my_design, Statuspregnant, Statusvirgin) %>%
  model_bayes() %>%
  tidy.marray.lm() %>%
  volcano_plot()

latlio/tidyde documentation built on Dec. 21, 2021, 9:40 a.m.