-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinitialize-DRE-method.Rd
82 lines (66 loc) · 3.28 KB
/
initialize-DRE-method.Rd
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DRE.R
\docType{methods}
\name{initialize,DRE-method}
\alias{initialize,DRE-method}
\title{Initialise a DRE object}
\usage{
\S4method{initialize}{DRE}(.Object, compound.name, name = NULL, compound,
fraction = NULL, dose = NULL, min.dose = NULL, max.dose = NULL,
num.doses = 5, dose.series.type = "exp", dilution.factor.decimals = 2)
}
\arguments{
\item{.Object}{object of class DRE}
\item{compound.name}{names of compounds that are included in the dre object, character}
\item{name}{optional name of the dose-response experiment, character}
\item{compound}{a list of \linkS4class{Compound} objects}
\item{fraction}{optional vector of compound fractions, numeric, should add up to 1}
\item{dose}{optional vector of doses. In case of mixtures, these are the doses of an entire mixture.}
\item{min.dose}{optional minimal dose, numeric.}
\item{max.dose}{optional maximal dose, numeric.}
\item{num.doses}{number of different doses in the dose-response experiment}
\item{dose.series.type}{the type of dose series. Supported values are "exp" and "linear".
See the Details.}
\item{dilution.factor.decimals}{integer number of decimal points in the dilution factor}
}
\value{
DRE object
}
\description{
DRE object represents a dose-response experiment. This function creates a new DRE object from one or more \linkS4class{Compound} objects
}
\details{
Generally, a dose-response experiment is conducted on a mixture of compounds.
Suppose each compound is referred to by an index \emph{i} and there are \emph{n} compounds.
If parameters \code{fraction} and \code{dose} are both supplied by the caller, the following must be true:
dose[j] = SUM(fraction[i]*dose[ij])
where dose[j] is the j'th dose of the mixture and dose[ij] is the j'th dose of an individual compound
If not supplied by the caller, parameters \code{fraction}, \code{min.dose} and \code{max.dose} are computed as follows:
\enumerate{
\item fraction[i] = sqrt(min.dose[i]*max.dose[i]) / sum(sqrt(min.dose[1:n]*max.dose[1:n]))
\item min.dose = 1/sum(fraction[1:n]/min.dose[1:n])
\item max.dose = 1/sum(fraction[1:n]/max.dose[1:n])
}
Unless the \code{dose} parameter is supplied by the caller, the doses are calculated as a series of
\code{num.doses} values from \code{min.dose} to \code{max.dose}. The type of the series is determined
by \code{dose.series.type}:
\enumerate{
\item \strong{"exp"} series is exponential, e.g. 1,2,4,8,16
\item \strong{"linear"} series is linear, e.g. 1,2,3,4,5
}
In exponential dose series, the minimal dose will not be exactly the same as min.dose supplied
by the caller. The initialize method will round the dilution factor to the number of decimals
specified by parameter dilution.factor.decimals. Resulting minimal dose should be reasonably
close to the supplied min.dose parameter, but won't equal it exactly.
}
\examples{
data(sim15_screen3)
compound(sim15_screen3,"Cpd1")
new("DRE", compound.name="Cpd1", compound=list(compound(sim15_screen3,"Cpd1")),
num.doses=5, dose.series.type="exp")
new("DRE", compound.name="Cpd1", compound=list(compound(sim15_screen3,"Cpd1")),
num.doses=5, dose.series.type="linear")
}
\seealso{
\linkS4class{DRE}, \linkS4class{Compound}
}