Title: Interactive Volcano Plot
Version: 0.0.1
Description: Generate interactive volcano plots for exploring gene expression data. Built with 'ggplot2', the plots are rendered interactive using 'ggiraph', enabling users to hover over points to display detailed information or click to trigger custom actions.
Depends: R (≥ 4.1.0)
Imports: dplyr, ggplot2, ggiraph, ggrepel, rlang
Suggests: quarto, yulab.utils
VignetteBuilder: quarto
License: GPL (≥ 3)
Encoding: UTF-8
RoxygenNote: 7.3.2
NeedsCompilation: no
Packaged: 2025-09-09 06:56:20 UTC; HUAWEI
Author: Guangchuang Yu ORCID iD [aut, cre, cph]
Maintainer: Guangchuang Yu <guangchuangyu@gmail.com>
Repository: CRAN
Date/Publication: 2025-09-11 09:20:07 UTC

ivolcano

Description

interactive volcano plot

Usage

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,
  top_n = 10,
  label_mode = "separate",
  fontface = "italic",
  label_sig_only = TRUE,
  threshold_line = list(color = "black", linetype = "dashed", linewidth = 0.5),
  sig_colors = c(Up = "red", Down = "blue", Not_Significant = "grey70"),
  size_by = "none"
)

Arguments

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

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

threshold_line

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

sig_colors

customize colors for up- and down-regulated, and non-significant genes

size_by

one of "none" (default), "negLogP", or "absLogFC" to scale dot sizes.

Value

volcano plot

Author(s)

Guangchuang Yu

Examples

# 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",
        top_n = 5,
        onclick_fun=onclick_genecards)

onclick_fanyi

Description

generate onclick function from fanyi::gene_summary() output

Usage

onclick_fanyi(gene_summary, cols)

Arguments

gene_summary

output from fanyi::gene_summary()

cols

selected columns from 'gene_summary'

Value

onclick function

Author(s)

Guangchuang Yu


onclick_genecards

Description

onclick function to popup genecards webpage

Usage

onclick_genecards(gene)

Arguments

gene

query gene

Value

onclick action

Author(s)

Guangchuang Yu