Skip to contents

Box-plots become unmanagable with large numbers of samples. This function plots lines at the median, quartiles, and whiskers, plotting points for outliers beyond that

Usage

interactive_quartiles(
  matrix,
  labels = rownames(matrix),
  expressiontype = "expression",
  whisker_distance = 1.5,
  should_transform = NULL
)

Arguments

matrix

Numeric matrix

labels

String vector of labels to be used for each matrix row

expressiontype

Y axis label

whisker_distance

IQR multiplier for whiskers, and beyond which to show outliers (see coef in geom_boxplot)

should_transform

A boolean indicating if the log2 transformation should be applied. If TRUE, log2 transformation is applied unconditionally. If FALSE, no transformation is applied. If NULL, a conditional transformation based on threshold is applied.

Value

A plotly htmlwidget

Examples

data(airway, package = "airway")
interactive_quartiles(assays(airway)[[1]], as(airway, "ExploratorySummarizedExperiment"))
#> Error in as.vector(x): no method for coercing this S4 class to a vector