doseResponseModel: Calculation of dose response models.

Description Usage Arguments Value Note Author(s) References See Also Examples

View source: R/dataflow.R

Description

This function is used to estimate the dose response models: G: the G model is calculated, R: the relative model is calculated, D: the difference based model is calculated, DG: the G model is calculated based on the D model, RG the G model is calculated based on the R model. When the models are calculated isotonic regression is used to fit the dose response curves while taking the singulatity of the G and D models into account. Finally, the summary statistics GI50, TGI, LC50, and AUC0 is calculated.

Usage

1
2
3
4
5
6
7
doseResponseModel(A.data, models = c("G", "R", "D", "DG", "RG"), 
                  dose.scale = "mol/l", dose.logfun.from = "nolog", 
                  dose.logfun.to = "log10", parametrisation = "restricted", 
                  AUC.q = 0, t = 48, doublingvar = NULL, cut = 0.025, 
                  update = TRUE, verbose = FALSE, 
                  progressbar = "text", save = TRUE, 
                  shiny.input = NULL, session = NULL)

Arguments

A.data

An A.data object created by the function createMetaData.

models

Character vector with indicating what models should be calculated. Currently the follwing models are implemented G: the G model is calculated, R: the relative model is calculated, D: the difference based model is calculated, DG: the G model is calculated based on the D model, RG the G model is calculated based on the R model.

dose.scale

Character indicating the scale used for concentrations when estimating the isotonic regression and the summary statistcs. The unit is written as e.g. ug/ml to indicate micro grams per milli litre and defaults to mol/l. The unit is written as ug/ml The current implementations for multiples are:

Name deca hecto kilo mega giga tera peta exa zetta yotta
Prefix da h k M G T P E Z Y
Factor 10^0 10^1 10^2 10^3 10^6 10^9 10^12 10^15 10^18 10^21 10^24

The current implementations for fractions are:

Name deci centi milli micro nano pico femto atto zepto yocto
Prefix d c m u n p f a z y
Factor 10^-1 10^-2 10^-3 10^-6 10^-9 10^-12 10^-15 10^-18 10^-21 10^-24
dose.logfun.from

Character indicating if the concentrations given in the protocols are log transformed. The possible inputs are nolog for non logtransformed concentrations, log10, log2, log for log transformed with base 10, 2, and e, respectively.

dose.logfun.to

Character indicating if the concentrations should be log transformed. The possible inputs are nolog for non log transformation, log10, log2, log for log transforming with base 10, 2, and e, respectively.

parametrisation

Character indicating whether or not the estimated growth of the treated cells should be restricted such that it is always slower than untreated. Can be either restricted or unrestricted.

AUC.q

Numeric value determining the minimum for the summary statistic AUC.q. When zero this is the area under the dose response curve above zero. Defeaults to 0.

t

Numeric value indicating the time spand LC50 should be based upon for the G model. e.g. when t = 48 the LC50 values corresponds to the concentration where the halving time is 48 hours.

doublingvar

Character giving the name of the column contaning doubling time for each cell line (Optional). When only one time point is used for a dose response experiment it is possible to convert the R model to the G model if the doubling time for each cell line is supplied.

cut

Numeric value determining the lowest allowable value for absorbance value defeaults to 0.025. Since all absorbance values must be positive all negative ones need to be converted to positive values. If the value is set to 0.025 all values below 0.025 are truncated at 0.025.

update

Logical value. Should the analysis be updated or run from scratch. Defaults to TRUE.

verbose

Logical value. Should the function indicate what experiment it is currently reading. Defaults to FALSE.

progressbar

The type of progress bar used to show how far along the function is. Can be either "window", text or none.

save

Should the data be saved.

shiny.input

Used for the shiny server.

session

Used for the shiny server.

Value

The ouput of the function is an A.data object of class bgModel. This is a list with the following components:

meta.list

This is a list of meta data objects.

call

A list containing information regarding the call to the function.

auxiliary

List of auxiliary data used by other functions.

data

List of data frames. The added elements are described below.

drug.color.correct

Contains the results of the fitted dose reponse experiments for colour correction.

fits

List of the fitted objects. The fitted objects for model corrections is stored in element bgModel The fitted objects for the G-model is stored in element growthModel

summary

Summary statistics for the dose response data. The data consists of nested lists as: summary$drug$model$summarystatistic

The element data is expanded with the following elements:

GM.mean

The estimated G model for the dose response data including all bootstrapped data

T0.list

list of data.frames. For each drug the estimated doubling times are stored in a data.frame named after the drug

GI.mean

The estimated D and R models for the dose response data including all bootstrapped data

DR.data

Combination of GI.mean and GM.mean.

iso.fits

List with the fitted curves for each dose response experiment. The data inculding the fitted curves are stored as: drug$model. The data is available for all bootstrapped datasets.

See the examples for usage of the A.data object.

Note

When the dose response models have been estimated it is possible to make various plots of the data. The estimated summary statistics are obtainable using the function CI. See the examples for further usage of the A.data object.

Author(s)

The function was written at department of haematology, Aalborg University Hospital and maintained by Steffen Falgreen.

References

Steffen Falgreen et al. Exposure time independent summary statistics for assessment of drug dependent cell line growth inhibition (2013)

See Also

CI,DRdataBoxplot,plot.DRdata,plot.growthModel,plotGrid

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
require(DoseR)
data(A.data)
# Not run
if(FALSE)
A.data <- doseResponseModel(A.data = A.data,
                            models  = c("G", "R", "RG",  "D", "DG"),
                            t      = 48,
                            AUC.q  = 0,
                            dose.scale = "mol/l",
                            dose.logfun.to = "log10",
                            parametrisation = "restricted",
                            cut = 0.001,   
                            verbose = FALSE,
                            update = FALSE)

# plot of the fitted models with the bootstrapped results shown.
# This plot can be used for investigation of the  fitted model.
plot.growthModel(x = A.data, 
                 drugs = "Rituximab",
                 names = "OCI-Ly7",
                 time.points.used=c("all", 48),
                 bootstrap.conf=FALSE,
                 line.col= c("#662D91",  "#F7931E"),
                 absorbance.CI=FALSE,
                 conc.names = paste("C", c(0, 1:17), sep = ""),
                 pointsize = 8,
                 pdfit = FALSE,
                 plotgrid = TRUE,  nrows=4, ncols=5,
                 col.by.identifier = FALSE)

plot.growthModel(x = A.data, 
                 drugs = "Doxorubicin",
                 names = "SU-DHL-4",
                 time.points.used=c("all", 48),
                 bootstrap.conf=TRUE,
                 line.col= c("#662D91",  "#F7931E"),
                 absorbance.CI=FALSE,
                 conc.names = paste("C", c(0, 1:17), sep = ""),
                 pointsize = 8,
                   pdfit = FALSE,
                 plotgrid = TRUE,  nrows=4, ncols=5,
                 col.by.identifier = FALSE)

# plot a grid of the dose response curves with the bootstrapped results shown 
plotGrid(A.data=A.data, barcol="#33333350", 
         ncol = 2, drug = "Doxorubicin")


# plot of the dose response curve based on the D-model for the different time points
par(mfrow = c(1,2))
plot.DRdata(x = A.data,#xlim = c(-7.5, -4.8),
            model = "D",
            col.scheme =  c("#71965A", "#4F6E9F"),
             drug = "Doxorubicin",legend = TRUE,
            n.columns = 1, plot.data = TRUE,
            legend.cex = 1, times = c(12, 24, 36, 48))

plot.DRdata(x = A.data,#xlim = c(-7.5, -4.8),
            model = "D",
            col.scheme =  c("#71965A", "#4F6E9F"),
             drug = "Rituximab",legend = TRUE,
            n.columns = 1, plot.data = TRUE,
            legend.cex = 1, times = c(12, 24, 36, 48))

par(mfrow = c(2,2))

plot.DRdata(x = A.data,
            model = "G", 
            drug = "Rituximab",
            col.scheme =  c("#71965A", "#4F6E9F"),
            n.columns = 1,
            plot.data = TRUE,legend = TRUE,
            legend.cex = 1)

plot.DRdata(x = A.data,
            model = "G", 
            drug = "Doxorubicin",
            col.scheme =  c("#71965A", "#4F6E9F"),
            n.columns = 1,
            plot.data = TRUE,legend = TRUE,
            legend.cex = 1)


DRdataBoxplot(A.data, type = "AUC", model = "G", 
         splitvar = "disease", col.all = c("#71965A", "#4F6E9F"),
         drug = "Rituximab",
         time = 48)

DRdataBoxplot(A.data, type = "AUC", model = "G", 
         splitvar = "disease", col.all = c("#71965A", "#4F6E9F"),
         drug = "Doxorubicin",
         time = 48)
         
         
# calculate summary statistics based on the G-model
CI(A.data, model="G")

oncoclass/DoseR documentation built on May 24, 2019, 2:18 p.m.