Learn R Programming

ivolcano (version 0.0.5)

geom_ivolcano_gene: geom_ivolcano_gene

Description

Add gene labels to ivolcano plot

interactive volcano plot

Usage

geom_ivolcano_gene(
  top_n = 10,
  label_mode = "separate",
  fontface = "italic",
  label_sig_only = TRUE,
  filter = NULL
)

ivolcano( data, logFC_col = "logFC", pval_col = "adj.P.Val", gene_col = "gene", title = "Volcano Plot", interactive = TRUE, onclick_fun = NULL, pval_cutoff = 0.05, logFC_cutoff = 1, pval_cutoff2 = NULL, logFC_cutoff2 = NULL, size_by = "none", point_size = list(base = 2, medium = 4, large = 6), threshold_line = list(color = "black", linetype = "dashed", linewidth = 0.5), top_n = 10, label_mode = "separate", fontface = "italic", label_sig_only = TRUE, filter = NULL )

Value

volcano plot

Arguments

top_n

top N genes to display the labels (gene ID)

label_mode

one of 'all' or 'separate' (default). If label_mode = 'all', top_n genes with minimal p values will be displayed, otherwise, top_n up-regulated and top_n down-regulated genes will be displayed.

fontface

one of 'plain', 'bold', 'italic' (default) and their combination, e.g. 'bold.italic'

label_sig_only

whether filter significant genes before subset 'top_n' genes

filter

custom filter expression to select genes for labeling

data

A data frame that contains minimal information with gene id, logFC and adjusted P values

logFC_col

column name in 'data' that stored the logFC values

pval_col

column name in 'data' that stored the adjusted P values

gene_col

column name in 'data' that stored the gene IDs

title

plot title

interactive

whether plot the graph in interactive mode

onclick_fun

effects when click on the dot (gene), default is NULL

pval_cutoff

cutoff of the adjusted P values

logFC_cutoff

cutoff of the logFC values

pval_cutoff2

second cutoff of the adjusted P values for advanced mode

logFC_cutoff2

second cutoff of the logFC values for advanced mode

size_by

one of "none" (default), "manual" (set by point_size), "negLogP", "absLogFC", or other variable in the input data to scale dot sizes.

point_size

set point size when size_by is "manual", a list with three elements: base, medium, large.

threshold_line

customize threshold line style (e.g., line color, type, and width)

Author

Guangchuang Yu

Examples

Run this code
# example data
f <- system.file("extdata/airway.rds", package = "ivolcano")
df <- readRDS(f)
# plot
ivolcano(df,
  logFC_col = "log2FoldChange",
  pval_col = "padj",
  gene_col = "symbol",
  onclick_fun = onclick_genecards
)

Run the code above in your browser using DataLab