Draw volcano plot to visualize differential expression. Uses data.frame output from getDEG(..., return.list = F).

miko_volcano(
  df.deg,
  group = NULL,
  show.n = 10,
  show.sig.only = T,
  rank.by = c("auc", "logFC", "pval"),
  features = NULL,
  sig.threshold = 0.05,
  lfc.threshold = 0,
  label.size = NA,
  pt.size.range = c(1, 4),
  correct.p.value = T,
  plot.title = "Volcano Plot",
  cols = list(low = scales::muted("blue"), mid = "white", high = scales::muted("red"))
)

Arguments

df.deg

Differential expression data. Dataframe output from presto::wilcoxauc() or scMiko::getDEG(..., return.list = F).

group

group to visaulize data for. Must be entry in 'group' column of df.deg.

show.n

Top n features to label. Default is 10.

show.sig.only

Show significant genes only. Default is T.

rank.by

statistic to rank features by when selecting top feature to label. Default is "auc" (options include "auc", "logFC", "pval").

features

Specific features to label. If specified, show.n is ignored.

sig.threshold

significance (p-value) threshold. Default is 0.05.

lfc.threshold

log fold change (lfc) threhsold. Default is 0.

label.size

Label size.

pt.size.range

vector with two values, the first representing the smallest point size, and the second representing the largest point size. Default is c(1,4).

correct.p.value

use adjusted p-value (FDR) for thresholding significant hits. Default is T.

plot.title

title of volcano plot. Default is "Volcano Plot".

cols

named listed with 3 entries labeled "low", "mid", "high" specifying colors to create a color gradient. Default is list(low = scales::muted("blue"), mid = "white", high = scales::muted("red")).

Value

ggplot handle

See also

getDEG

Examples


 df.dat <- getDEG(so.query, return.list = F)
#> Loading required package: presto
#> Loading required package: Rcpp
#> Loading required package: data.table
#> 
#> Attaching package: 'data.table'
#> The following objects are masked from 'package:dplyr':
#> 
#>     between, first, last
#> Error in "Seurat" %in% class(object): object 'so.query' not found
 plt.volcano <-  miko_volcano(df.deg = df.dat)
#> Error in is.data.frame(x): object 'df.dat' not found