GRbox: Boxplots of a given GR metric

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/GRbox.R

Description

Given a SummarizedExperiment object created by GRfit, this function creates boxplots according to the parameters below.

Usage

1
2
GRbox(fitData, metric, groupVariable, pointColor, factors = "all",
  wilA = NULL, wilB = NULL, plotly = TRUE)

Arguments

fitData

a SummarizedExperiment object, generated by the GRfit function.

metric

the GR metric (GR50, GRinf, h_GR, GRmax, GEC50, or GR_AOC) or traditional metric (IC50, Einf, h, Emax, EC50, or AUC) that will be used for the boxplot.

groupVariable

the name of the variable from data (e.g. drug, cell-line, etc.) to select factors from.

pointColor

a variable that defines the coloring of the points overlayed on the boxplot.

factors

a vector of values of "groupVariable" of data that define which variables to make boxplots for. By default, a separate boxplot is made for each unique value of groupVariable.

wilA

one value or a vector of values from "factors", i.e. a subset of the boxplots. If specified, a one-sided Wilcoxon rank sum test (wilcox.test) will be performed between "wilA" and "wilB" and the results will be displayed on the figure. The null hypothesis that the values from "wilA" and "wilB" have the same mean will be tested against the alternative hypothesis that the mean of the "wilB" values is greater than that of the "wilA" values.

wilB

one value or a vector of values from "factors", i.e. a subset of the boxplots (not overlapping "wilA").

plotly

a logical value indicating whether to output a ggplot2 graph or an interactive ggplotly graph

Details

Given a SummarizedExperiment object created by GRfit, this function creates boxplots of a given GR metric (GR50, GRmax, etc.) or traditional metric (IC50, Emax, etc.) for values of the grouping variable. The results can be viewed in a static ggplot image or an interactive plotly graph.

By default, a boxplot is created for all unique values of the grouping variable. The "factors" parameter can be used to specify a smaller subset of values for which to create boxplots. Points are overlayed on the boxplots and they can be colored by the variable specified in the pointColor parameter. If pointColor is set to NULL, the points will all be black. The results can be viewed in a static ggplot image or an interactive plotly graph.

Value

ggplot2 or ggplotly boxplots of the factors along the x-axis, with points colored by the given variable.

Author(s)

Nicholas Clark

See Also

To create the object needed for this function, see GRfit. For other visualizations, see GRdrawDRC and GRscatter. For online GR calculator and browser, see http://www.grcalculator.org.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# Load Case A (example 1) input
data("inputCaseA")
head(inputCaseA)
# Run GRfit function with case = "A"
output1 = GRfit(inputData = inputCaseA,
groupingVariables = c('cell_line','agent', 'perturbation','replicate',
'time'))
GRbox(output1, metric ='GRinf',
groupVariable = 'cell_line', pointColor = 'agent' , factors = c('BT20',
'MCF10A'))
GRbox(output1, metric ='GRinf',
groupVariable = 'cell_line', pointColor = 'cell_line' ,
factors = c('BT20', 'MCF10A'), plotly = FALSE)
GRbox(output1, metric = 'GR50', groupVariable = 'cell_line',
pointColor = 'cell_line', wilA = "BT20", wilB = c("MCF7","MCF10A"))

uc-bd2k/GRmetrics_old documentation built on May 3, 2019, 2:13 p.m.