The RPPAFit
function fits an intensity response model to the
dilution series in a reverse-phase protein array experiment. Individual
sample concentrations are estimated by first matching individual sample
dilution series to the overall logistic response for the slide and then
fitting a second time using the specified model, usually cobs.
The RPPAFitParams
class is a convenient place to wrap the parameters
that control the model fit into a reusable object.
RPPAFit(rppa,
measure,
model="logistic",
xform=NULL,
method=c("nls", "nlrob", "nlrq"),
trim=2,
ci=FALSE,
ignoreNegative=TRUE,
trace=FALSE,
verbose=FALSE,
veryVerbose=FALSE,
warnLevel=0,
residualsrotation = as.integer(0)
)RPPAFitParams( measure,
model="logistic",
xform=NULL,
method=c("nls", "nlrob", "nlrq"),
trim=2,
ci=FALSE,
ignoreNegative=TRUE,
trace=FALSE,
verbose=FALSE,
veryVerbose=FALSE,
warnLevel=0,
residualsrotation = as.integer(0)
)
RPPAFitFromParams(rppa,
fitparams,
progmethod=NULL)
is.RPPAFit(x)
is.RPPAFitParams(x)
# S4 method for RPPAFitParams
paramString(object, slots, ...)
The RPPAFit
generator and RPPAFitFromParams
function return
an object of class RPPAFit
.
The RPPAFitParams
generator returns an object of class
RPPAFitParams
.
The is.RPPAFit
method returns TRUE
if its
argument is an object of class RPPAFit
.
The is.RPPAFitParams
method returns TRUE
if its
argument is an object of class RPPAFitParams
.
The paramString
method returns a character vector, possibly
empty but never NULL
.
object of class RPPA
containing the raw data
to be fit
object of the class RPPAFitParams
, bundling
together the following arguments.
user defined function that will take a string telling which portion of the process is running and do with it as the function specifies. Default is a function that does nothing.
character string identifying the column of the raw RPPA data that should be used to fit to the model.
character string specifying the model for the response curve fitted for the slide. Valid values are:
"logistic" | assumes a logistic shape for the curve |
"loess" | fits a loess curve to the response |
"cobs" | fits a b-spline curve to the slide with the constraint that curve be strictly increasing |
optional function that takes a single input vector and
returns a single output vector of the same length. The measure
column is transformed using this function before fitting the model.
character string specifying the method for matching the individual dilution series to the response curve fitted for the slide. Valid values are:
"nls" | uses the optimal fit based on nonlinear least squares |
"nlrob" | uses nlrob which is robust nls
from robustbase package |
"nlrq" | uses nlrq which is robust median regression
from quantreg package |
numeric or logical scalar specifying trim level for
concentrations. If positive, concentrations will be trimmed to reflect
min and max concentrations we can estimate given the background noise.
If TRUE
, the trim level defaults to 2
, which was originally
the hardcoded value; otherwise, raw concentrations are returned without
trimming.
logical scalar. If TRUE
, computes 90% confidence intervals
on the log concentration estimates.
logical scalar. If TRUE
, converts negative values
to NA
before fitting the model.
logical scalar passed to nls in the method
portion of the routine
logical scalar. If TRUE
, prints updates while fitting
the data
logical scalar. If TRUE
, prints voluminous updates
as each individual dilution series is fitted
integer scalar used to set the warn
option before
calling method
. Since this is wrapped in a try
function, it
won't cause failure but will give us a chance to figure out which dilution
series are failing. Setting warnLevel
to two or greater may change
the values returned.
numeric scalar containing 90 degree value to rotate the generated residuals image by when generating the output graphic. This should be used if the layout of the information in the input txt file does not match the orientation of the slide input image.
object of class RPPAFitParams
object of class RPPAFit
(or RPPAFitParams
)
strings specifying RPPAFitParams
slotnames to display
(for debugging)
extra arguments for generic routines.
Although objects of the class can be created by a direct call to
new, the preferred method is to use the RPPAFitParams
function.
measure
:character; see arguments above
xform
:function or NULL
; see arguments above
method
:character; see arguments above
ci
:logical scalar; see arguments above
ignoreNegative
:logical scalar; see arguments above
trace
:logical scalar; see arguments above
verbose
:logical scalar; see arguments above
veryVerbose
:logical scalar; see arguments above
warnLevel
:numeric; see arguments above
trim
:numeric; see arguments above
model
:character; see arguments above
residualsrotation
:numeric; see arguments above
signature(object = "RPPAFitParams")
:
Returns string representation of object.
The paramString
method should not be called by user except for
informational purposes. The content and format of the returned string
may vary between different versions of this package.
P. Roebuck paul_roebuck@comcast.net, Kevin R. Coombes coombes.3@osu.edu, James M. Melott jmmelott@mdanderson.org
The basic mathematical model is given by $$Y = f(X-\delta_i),$$ where \(Y\) is the observed intensity, \(X\) is the designed dilution step and \(f\) is the model for the protein response curve. By fitting a joint model, we assume that the response curve is the same for all dilution series on the array. The real point of the model, however, is to be able to draw inferences on the \(\delta_i\), which represent the (log) concentration of the protein present in different dilution series.
As the first step in fitting the model, we compute crude estimates of the individual \(\delta_i\) assuming a rough logistic shape for the protein response curve.
Next, we fit an overall response curve for the slide \(f\) using the estimated concentrations and observed intensities \(Y = f(\delta_i)\). The model for \(f\) is specified in the \(model\) parameter.
Next, we update the estimates of the individual \(\delta_i\) using our
improved fitted model \(f\) for the overall slide response curve. These
individual series are matched to the overall slide response curve using the
algorithm specified in method
. The default method is nls
, a
least squares match-up, but we also offer robust alternatives which can do
better.
Finally, we re-estimate \(f\) using the improved estimates for \(\delta_i\). We continue to iterate between \(f\) and \(\delta_i\). We do this twice since that seems to give reasonable convergence.
If the ci
argument is TRUE
, then the function also computes
confidence intervals around the estimates of the log concentration.
Since this step can be time-consuming, it is not performed by default.
Moreover, confidence intervals can be computed after the main model is fit
and evaluated, using the getConfidenceInterval
function.
RPPAFit
,
RPPAFit-class
,
RPPA
,
RPPADesignParams
showClass("RPPAFitParams")
fitparams <- RPPAFitParams(measure="Net.Value",
method="nls",
model="cobs",
trim=2,
ci=FALSE,
ignoreNegative=FALSE,
warnLevel=-1
)
paramString(fitparams)
Run the code above in your browser using DataLab