Learn R Programming

inDAGO (version 1.0.0)

volcanoPlottly: volcanoPlottly

Description

Create an interactive volcano plot of differential expression results using "Plotly".

Usage

volcanoPlottly(
  x,
  palettePoint,
  Th_logFC,
  Th_Pvalue,
  subsetGenes,
  st_significance
)

Value

A Plotly object ("plotly::ggplotly") representing the interactive volcano plot.

Arguments

x

Character. File path to a CSV containing DEG results, with at least columns "ID", "logFC", and one of "PValue", "FDR", or "FWER".

palettePoint

Character. Name of a discrete palette from the "paletteer" package, supplying colors for "UP", "DOWN", and "NO".

Th_logFC

Numeric. Absolute log2 fold-change threshold to call a gene "UP" or "DOWN".

Th_Pvalue

Numeric. P-value threshold to call significance (uses "FDR"/"FWER" if "st_significance = "adjustPvalue"", otherwise raw "PValue").

subsetGenes

Integer or "Inf". If numeric, only the top "subsetGenes" genes by p-value are included in the plot.

st_significance

Character. Which p-value column to use: "adjustPvalue" (FDR or FWER) or "PValue".

Details

This function reads a CSV of DEGs, classifies genes as up/down/no change based on log-fold change and p-value thresholds, and renders an interactive volcano plot via "plotly::ggplotly()".

  1. Reads the input CSV and checks for duplicate IDs.

  2. Standardizes columns to "ID", "logFC", and "adjustPvalue" or "PValue".

  3. Optionally subsets to the top N genes by p-value.

  4. Classifies each gene as "UP", "DOWN", or "NO" based on thresholds.

  5. Plots points with manual fill, size, and alpha scales, adds threshold lines, and converts to an interactive Plotly graph.