volcano_plot: Function to draw a Volcano Plot

Description Usage Arguments Value Examples

View source: R/volcano_plot.R

Description

Function that takes two numeric vectors (P-Value and fold change) and draws a volcano plot using ggplot2

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
volcano_plot(
  pval,
  fc,
  names,
  size = 2,
  tFC = 2,
  tPV = -log10(0.001),
  show.labels = TRUE,
  show.effect = FALSE
)

Arguments

pval

numeric vector of P.Values

fc

numeric vector of fold change

names

character vector with the feature's names.

size

(default 2) Sice of the labels in case they are placed.

tFC

(default 2) fold change threshold. It can be set to NULL to not filter.

tPV

(default -log10(0.001)) P-Value threshold. It can be set to NULL to not filter.

show.labels

(default TRUE) If set to TRUE, features are labelled.

show.effect

(default FALSE) If set to TRUE, the X-axis will should 2^logFC instead to the default logFC.

Value

A ggplot object

Examples

1
2
3
data(rset)
w1 <- getAssociation(rset, rid = 1, fNames = NULL)
volcano_plot(w1$P.Value, w1$logFC, rownames(w1))

MultiDataSet documentation built on Jan. 31, 2021, 2:01 a.m.