seekDEvolcano: creates a volcano plot from diff.expr. data

Description Usage Arguments Value Examples

View source: R/DEGs.R

Description

Imports: ggplot2, ggrepel, scales

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
seekDEvolcano(
  DE,
  genes = NA,
  cutP = 0.05,
  cutFC = 1.5,
  tophitsL = 5,
  tophitsR = 5,
  Title = "",
  textSize = 25,
  labelSize = 7,
  annoSize = 8,
  xLim = c(min(subset(DE, !is.na(padj))$log2FC) - 0.5, max(subset(DE,
    !is.na(padj))$log2FC)) + 0.5,
  yLim = c(min(DE$log10padj), max(DE$log10padj)),
  colors = c("red", "blue", "gray20"),
  lineSize = 1,
  line2Size = 1,
  dotSize = 1,
  dotOpacity = 0.6,
  tickSize = 1,
  annoX = c(2, -2, 0),
  annoY = c(0.1, 0.1, 0.01)
)

Arguments

DE

data.frame with at least 4 columns: Symbol, log2FC, log10padj, color

genes

character vector, genes of interest that will have their label shown

cutP

number, p value cutoff, will result in a dashed line

cutFC

number, fold change cutoff will result in 2 dashed lines (positive and negative cutoff)

Title

string, for ggTitle

textSize

integer, textsize of title and axis labels

labelSize

integer, textsize of individual gene labels

annoSize

integer, textsize of the annotation showing the amount of genes for each group

xLim

vector of two numbers, limits to the x axis (log2FC). Defaults to the maximum absolute of log2FC expanded by 3 (same value on on each side)

colors

vector of strings, determines colors for significant genes 1) up and 2) down, and for 3) unsignificant genes

lineSize

number, regulates width of both axis lines

dotSize

number, regulates the size of the dots

dotOpacity

number between 0 and 1, regulates opacity of dots

tickSize

number, regulates width of ticks

annoX

vector of numbers, regulates where the annotation for point number is situated on the x axis

annoY

vector of numbers, regulates where the annotation for point number is situated on the y axis

ggplot

logical, if FALSE, output will be plotly, if TRUE, output will be ggplot2 with labels

tophits

either an integer, or the string "custom". If integer, genes with the n-th most positive and n-th most negative log2FC values and/or lowest padj value will be labeled. If "custom", there must already be a column named "tophitsR" and one named "topgitsL".

Value

a plotly object

Examples

1
2
myDE <- sqDE
seekDEvolcano(myDE[[1]])

Solatar/seeqR documentation built on Feb. 19, 2021, 8:07 p.m.