plotDoseRespViol: Plot single-cell dose response as violin plots

Description Usage Arguments Value Examples

Description

Individual data points are plotted as points, then a line average is plotted as function of concentrations. For concentration equal to 0, a circle with a plus is plotted. Concentrations are treated as factors.

Usage

1
2
3
plotDoseRespViol(in.dt, in.xvar, in.yvar, in.group.col = NULL,
  in.facet = NULL, in.ylim = NULL, in.xlab = NULL, in.ylab = NULL,
  in.xtickbreaks = NULL, in.xticklabels = NULL, ...)

Arguments

in.dt

Input data table. Should contain at least two numeric columns, and one vategorical variable.

in.xvar

String with the column name with the concentration.

in.yvar

String with the column name with the measurement.

in.facet

String with the column name for splitting data across plot facets, e.g. drug name or compound type (CTRL vs compounds)

in.xlab

String for the x-axis label

in.ylab

String for the y-axis label

in.group

String with the column name with grouping for the average line, e.g. drug name.

Value

ggPlots2 object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Dose response of a single compound
dt = data.table(conc = rep(1:10,3), meas = rnorm(30), compound = rep('comp1', 30))
plotDoseResp(dt, in.xvar = 'conc', in.yvar = 'meas', in.group = 'compound', in.facet = 'compound', in.xlab = 'Concnetration (uM)', in.ylab = 'Mean. fl. int.')

# Dose response of a single compound with control
dt = data.table(conc = c(rep(0, 5), rep(1:10, each = 3)), meas = c(rnorm(5, mean = 0, sd = .1), rnorm(30, mean = 2, sd = .1)), compound = c(rep('DMSO', 5), rep('comp1', 30)))
plotDoseResp(dt, in.xvar = 'conc', in.yvar = 'meas', in.group = 'compound', in.facet = 'compound', in.xlab = 'Concnetration (uM)', in.ylab = 'Mean. fl. int.')

# Dose response of two compounds with control; two compounds plotted in the same facet, ctrol in a separate
dt = data.table(conc = c(rep(0, 5), rep(1:10, each = 3), rep(1:10, each = 3)),
                meas = c(rnorm(5, mean = 0, sd = .1), rnorm(30, mean = 2, sd = .1), rnorm(30, mean = 1, sd = .1)),
                compound = c(rep('DMSO', 5), rep('comp1', 30), rep('comp2', 30)),
                type = c(rep('CTRL', 5), rep('compund', 60)))
plotDoseResp(dt, in.xvar = 'conc', in.yvar = 'meas', in.group = 'compound', in.facet = 'type', in.xlab = 'Concnetration (uM)', in.ylab = 'Mean. fl. int.')

dmattek/hcs-package documentation built on May 16, 2019, 7:24 a.m.