| Title: | Interactive Volcano Plot |
| Version: | 0.0.4 |
| 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, knitr, rlang, stats, utils |
| Suggests: | fanyi, org.Hs.eg.db, quarto, yulab.utils |
| VignetteBuilder: | quarto |
| License: | Artistic-2.0 |
| URL: | https://github.com/YuLab-SMU/ivolcano |
| BugReports: | https://github.com/YuLab-SMU/ivolcano/issues |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.3 |
| NeedsCompilation: | no |
| Packaged: | 2025-12-02 07:44:13 UTC; HUAWEI |
| Author: | Guangchuang Yu |
| Maintainer: | Guangchuang Yu <guangchuangyu@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2025-12-02 08:10:02 UTC |
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
)
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 |
set point size when |
threshold_line |
customize threshold line style (e.g., line color, type, and width) |
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",
onclick_fun = onclick_genecards
)
geom_ivolcano_line
Description
Add threshold lines to an iVolcano plot
Usage
geom_ivolcano_line(linetype = "longdash", color = "grey40", linewidth = 0.5)
Arguments
linetype |
line type for the threshold lines |
color |
line color for the threshold lines |
linewidth |
line width for the threshold lines |
Value
A ggplot2 layer object
ivolcano_point
Description
Visualize points in volcano plot
Usage
ivolcano_point(
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)
)
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 |
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 |
set point size when |
Value
base plot of a volcano plot
onclick_ensembl
Description
onclick function to popup Ensembl gene webpage
Usage
onclick_ensembl(gene)
Arguments
gene |
query gene |
Value
onclick action
Author(s)
Guangchuang Yu
onclick_fanyi
Description
generate onclick function from fanyi::gene_summary() output
Usage
onclick_fanyi(gene_summary, cols)
Arguments
gene_summary |
output from |
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
onclick_hgnc
Description
onclick function to popup HGNC gene webpage
Usage
onclick_hgnc(gene)
Arguments
gene |
query gene |
Value
onclick action
Author(s)
Guangchuang Yu
onclick_ncbi
Description
onclick function to popup NCBI gene webpage
Usage
onclick_ncbi(gene)
Arguments
gene |
query gene |
Value
onclick action
Author(s)
Guangchuang Yu
onclick_pubmed
Description
onclick function to popup PubMed webpage
Usage
onclick_pubmed(gene)
Arguments
gene |
query gene |
Value
onclick action
Author(s)
Guangchuang Yu
onclick_uniprot
Description
onclick function to popup UniProt webpage
Usage
onclick_uniprot(gene)
Arguments
gene |
query gene |
Value
onclick action
Author(s)
Guangchuang Yu
scale_color_figureya
Description
scale_color_figureya
Usage
scale_color_figureya(
mode = c("classic", "advanced"),
na.value = "grey80",
guide = "none",
...
)
Arguments
mode |
one of "classic" or "advanced" |
na.value |
color for NA values |
guide |
guide parameter passed to ggplot2::scale_color_manual |
... |
additional parameters passed to ggplot2::scale_color_manual |
Value
A ggplot2 scale object