Skip to contents

One interactive volcano plot per contrast; points are linked across the plots with crosstalk, so selecting a protein highlights it in every contrast.

Usage

volcano_plotly(
  data,
  effect = "fc",
  significance = "BFDR",
  contrast = "condition",
  proteinID = "Prey",
  color = "modelName",
  palette = NULL,
  xintercept = c(-2, 2),
  yintercept = 0.1,
  minsignificance = NULL,
  title_size = 25,
  group = "BB",
  .data
)

Arguments

data

data frame

effect

effect size x-axis

significance

significance

contrast

column with contrast labels

proteinID

column with protein ids

color

column used for colouring points

palette

named colour vector for the colour aesthetic

xintercept

vertical abline at x

yintercept

horizontal abline at y

minsignificance

optional minimum significance value (floor for -log10 axis). If NULL, only exact zero and negative values are replaced with the smallest positive observed value in the same score column.

title_size

font size of the subplot title annotation

group

crosstalk group name for linked brushing

.data

deprecated; use data

Value

A list of plotly objects, one per contrast; combine them with plotly::subplot().

Examples


data <- data.frame(fc = c(-1,0,1,2,8), BFDR = c(0.01,1, 0.01, 0.005,0),
condition = rep("A",5), Prey = LETTERS[1:5], modelName = c("A","A","B","A","A"))

dataB <- data.frame(fc = c(-1,0,1,2,8), BFDR = c(0.01,1, 0.01, 0.005,0),
condition = rep("B",5), Prey = LETTERS[1:5],modelName = c("A","A","B","B","B"))
data <- dplyr::bind_rows(data, dataB)
bc <- volcano_plotly(data, xintercept = 1, yintercept= 0.01, palette = c(A = "black" , B = "red"))
bc |> plotly::subplot()