Title: | Reverse-Phase Protein Array Super Position and Concentration Evaluation |
---|---|
Description: | Provides tools for the analysis of reverse-phase protein arrays (RPPAs), which are also known as 'tissue lysate arrays' or simply 'lysate arrays'. The package's primary purpose is to input a set of quantification files representing dilution series of samples and control points taken from scanned RPPA slides and determine a relative log concentration value for each valid dilution series present in each slide and provide graphical visualization of the input and output data and their relationships. Other optional features include generation of quality control scores for judging the quality of the input data, spatial adjustment of sample points based on controls added to the slides, and various types of normalization of calculated values across a set of slides. The package was derived from a previous package named SuperCurve. For a detailed description of data inputs and outputs, usage information, and a list of related papers describing methods used in the package please review the vignette 'Guide_to_RPPASPACE'. 'RPPA SPACE: an R package for normalization and quantitation of Reverse-Phase Protein Array data'. Bioinformatics Nov 15;38(22):5131-5133. <doi: 10.1093/bioinformatics/btac665>. |
Authors: | James M. Melott [aut, cre], Paul L. Roebuck [aut], Kevin R. Coombes [aut], Zhenlin Ju [aut], Huma Shehwana [aut], Shwetha V. Kumar [aut], E. Shannon Neeley [aut], Corwin Joy [aut], Jianhua Hu [aut], Keith A. Baggerly [aut], Rehan Akbani [aut], Mary A. Rohrdanz [ctb], Chris Wakefield [ctb], Doris R. Siwak [ctb], Yiling Lu [ctb], Bradley M. Broom [ctb], John N. Weinstein [ctb], Gordon B. Mills [ctb] |
Maintainer: | James M. Melott <[email protected]> |
License: | Artistic-2.0 |
Version: | 1.0.10 |
Built: | 2024-12-17 03:11:30 UTC |
Source: | https://github.com/MD-Anderson-Bioinformatics/rppaspace |
A package for analyzing reverse phase protein lysate arrays (RPPA).
Package: | RPPASPACE |
Type: | Package |
Version: | 1.0.10 |
Phase: | |
Date: | 2023-10-19 |
License: | Artistic-2.0 |
For a complete list of functions, use library(help="RPPASPACE")
.
For a high-level summary of the changes for each revision, usefile.show(system.file("NEWS", package="RPPASPACE"))
.
Kevin R. Coombes [email protected], P. Roebuck [email protected], James M. Melott [email protected]
The CobsFitClass
class represents models that were fit with the
nonparametric model.
## S4 method for signature 'CobsFitClass' fitSeries(object, diln, intensity, est.conc, method="nls", silent=TRUE, trace=FALSE, ...) ## S4 method for signature 'CobsFitClass' fitSlide(object, conc, intensity, ...) ## S4 method for signature 'CobsFitClass' fitted(object, conc, ...) ## S4 method for signature 'CobsFitClass' trimConc(object, conc, intensity, design, trimLevel, ...)
## S4 method for signature 'CobsFitClass' fitSeries(object, diln, intensity, est.conc, method="nls", silent=TRUE, trace=FALSE, ...) ## S4 method for signature 'CobsFitClass' fitSlide(object, conc, intensity, ...) ## S4 method for signature 'CobsFitClass' fitted(object, conc, ...) ## S4 method for signature 'CobsFitClass' trimConc(object, conc, intensity, design, trimLevel, ...)
object |
object of class |
diln |
numeric vector of dilutions for series to be fit |
intensity |
numeric vector of observed intensities for series to be fit |
est.conc |
numeric estimated concentration for EC50 dilution |
method |
character string specifying regression method to use to fit the series |
silent |
logical scalar. If |
trace |
logical scalar. Used in |
conc |
numeric vector containing estimates of the log concentration for each dilution series |
design |
object of class |
trimLevel |
numeric scalar multiplied to Median Absolute Deviation MAD |
... |
extra arguments for generic routines |
The fitted
method returns a numeric vector.
Objects are created internally by calls to the methods
fitSlide
or RPPAFit
.
model
:object of class cobs
summarizing nonparametric
fit
lambda
:numeric
Class FitClass
, directly.
signature(object = "CobsFitClass")
:
Finds the concentration for an individual dilution series given the
curve fit for the slide.
signature(object = "CobsFitClass")
:
Uses the concentration and intensity series for an entire slide to
fit a curve for the slide of intensity = f(conc).
signature(object = "CobsFitClass")
:
Extracts fitted values of the model.
signature(object = "CobsFitClass")
:
Returns concentration and intensity cutoffs for the model.
P. Roebuck [email protected], James M. Melott [email protected]
The Directory class represents a file system directory.
Directory(path) is.Directory(x) ## S4 method for signature 'character,Directory' coerce(from, to, strict=TRUE) ## S4 method for signature 'Directory,character' coerce(from, to, strict=TRUE)
Directory(path) is.Directory(x) ## S4 method for signature 'character,Directory' coerce(from, to, strict=TRUE) ## S4 method for signature 'Directory,character' coerce(from, to, strict=TRUE)
path |
character string specifying a directory |
x |
object of class |
from |
object of class |
to |
object of class |
strict |
logical scalar. If |
The Directory
generator returns an object of class Directory
.
The is.Directory
method returns TRUE
if its
argument is an object of class Directory
.
Although objects of the class can be created by a direct call to
new, the preferred method is to use the Directory
generator function.
path
:character string specifying a directory
signature(from = "Directory", to = "character")
:
Coerce an object of class Directory
to its character string
pathname equivalent.
signature(from = "character", to = "Directory")
:
Coerce a character string specifying directory pathname to an
equivalent object of class Directory
.
The coercion methods should not be called explicitly; instead, use an
explicit call to the as
method.
P. Roebuck [email protected], James M. Melott [email protected]
The DS5RPPAPreFitQC class represents the inputs necessary to determine the quality control rating of a reverse-phase protein array slide with 5 dilution series.
## S4 method for signature 'DS5RPPAPreFitQC' qcprob(object, ...) ## S4 method for signature 'DS5RPPAPreFitQC' summary(object, ...)
## S4 method for signature 'DS5RPPAPreFitQC' qcprob(object, ...) ## S4 method for signature 'DS5RPPAPreFitQC' summary(object, ...)
object |
object of class |
... |
extra arguments for generic routines |
The prediction model used multiple training datasets from the RPPA Core Facility by fitting a logistic regression model using an expert rating of a slide's quality (good, fair, or poor) as the response variable and a host of metrics about the raw positive control data as predicting variables.
Although objects of the class can be created by a direct call to
new, the preferred method is to use the RPPAPreFitQC
factory generator function.
antibody
:character string specifying name of antibody
slopediff
:numeric scalar specifying the difference from perfect slope
cvs
:numeric vector containing the coefficient of variance for each positive control dilution series
slopes
:numeric vector containing the slopes for each positive control dilution series
drdiffs
:numeric vector containing the difference in dynamic range of each positive control dilution series
percentgood
:numeric scalar specifying percentage of "good" sample spots on the slide
adjusted
:logical scalar specifying if adjusted measures were used
Class RPPAPreFitQC
, directly.
signature(object = "DS5RPPAPreFitQC")
:
Calculates the probability of good slide, returned as numeric scalar.
signature(object = "DS5RPPAPreFitQC")
:
Prints a summary of the underlying data frame.
P. Roebuck [email protected], James M. Melott [email protected]
Ju Z, Liu W, Roebuck PL, Siwak DR, Zhang N, Lu Y, Davies MA,
Akbani R, Weinstein JN, Mills GB, Coombes KR
Development of a Robust Classifier for Quality Control of
Reverse Phase Protein Arrays.
Bioinformatics (2015) 31(6): 912-918.
https://pubmed.ncbi.nlm.nih.gov/25380958/
The FitClass
class is a virtual class representing the model that
was fit in the RPPAFit
routine. Functions for use with FitClass
are only to be used internally.
is.FitClass(x) ## S4 method for signature 'FitClass' coef(object, ...) ## S4 method for signature 'FitClass' coefficients(object, ...) ## S4 method for signature 'FitClass' fitSeries(object, diln, intensity, est.conc, method="nls", silent=TRUE, trace=FALSE, ...) ## S4 method for signature 'FitClass' fitSlide(object, conc, intensity, ...) ## S4 method for signature 'FitClass' fitted(object, conc, ...) ## S4 method for signature 'FitClass' trimConc(object, conc, intensity, design, trimLevel, ...)
is.FitClass(x) ## S4 method for signature 'FitClass' coef(object, ...) ## S4 method for signature 'FitClass' coefficients(object, ...) ## S4 method for signature 'FitClass' fitSeries(object, diln, intensity, est.conc, method="nls", silent=TRUE, trace=FALSE, ...) ## S4 method for signature 'FitClass' fitSlide(object, conc, intensity, ...) ## S4 method for signature 'FitClass' fitted(object, conc, ...) ## S4 method for signature 'FitClass' trimConc(object, conc, intensity, design, trimLevel, ...)
x |
object of (sub)class |
object |
object of (sub)class |
diln |
numeric vector of dilutions for series to be fit |
intensity |
numeric vector of observed intensities for series to be fit |
est.conc |
numeric estimated concentration for EC50 dilution |
method |
character string specifying regression method to use to fit the series |
silent |
logical scalar. If |
trace |
logical scalar. Used in |
conc |
numeric vector containing current estimates of concentration for each series |
design |
object of class |
trimLevel |
numeric scalar multiplied to Median Absolute Deviation MAD |
... |
extra arguments for generic routines |
The is.FitClass
method returns TRUE
if its
argument is an object of subclass of class FitClass
.
The coef
and coefficients
methods return NULL
.
This class should not be instantiated directly; extend this class instead.
signature(object = "FitClass")
:
Placeholder method which should be implemented by subclass if appropriate
for the particular model.
signature(object = "FitClass")
:
An alias for coef
.
signature(object = "FitClass")
:
Placeholder method which must be implemented by subclass.
signature(object = "FitClass")
:
Placeholder method which must be implemented by subclass.
signature(object = "FitClass")
:
Placeholder method which must be implemented by subclass.
signature(object = "FitClass")
:
Placeholder method which must be implemented by subclass.
P. Roebuck [email protected], James M. Melott [email protected]
This function computes confidence intervals for the estimated concentrations in a four-parameter logistic model fit to a set of dilution series in a reverse-phase protein array experiment.
getConfidenceInterval(result, alpha=0.1, nSim=50, progmethod=NULL)
getConfidenceInterval(result, alpha=0.1, nSim=50, progmethod=NULL)
result |
object of class |
alpha |
numeric scalar specifying desired significance of the confidence interval; the width of the resulting interval is 1 - alpha. |
nSim |
numeric scalar specifying number of times to resample the data in order to estimate the confidence intervals. |
progmethod |
optional function that can be used to report progress. |
In order to compute the confidence intervals, the function assumes
that the errors in the observed intensities are independent
normal values, with mean centered on the estimated curve and
standard deviation that varies smoothly as a function of the (log)
concentration. The smooth function is estimated using
loess
.
The residuals are resampled from this estimate and the model is refit;
the confidence intervals are computed empirically as symmetrically
defined quantiles of the refit parameter sets.
An object of class RPPAFit
, containing updated values for the
slots lower
, upper
, and conf.width
that describe the
confidence interval.
Kevin R. Coombes [email protected], P. Roebuck [email protected], James M. Melott [email protected]
The LoessFitClass
class represents models that were fit with the
nonparametric model.
## S4 method for signature 'LoessFitClass' fitSeries(object, diln, intensity, est.conc, method="nls", silent=TRUE, trace=FALSE, ...) ## S4 method for signature 'LoessFitClass' fitSlide(object, conc, intensity, ...) ## S4 method for signature 'LoessFitClass' fitted(object, conc, ...) ## S4 method for signature 'LoessFitClass' trimConc(object, conc, intensity, design, trimLevel, ...)
## S4 method for signature 'LoessFitClass' fitSeries(object, diln, intensity, est.conc, method="nls", silent=TRUE, trace=FALSE, ...) ## S4 method for signature 'LoessFitClass' fitSlide(object, conc, intensity, ...) ## S4 method for signature 'LoessFitClass' fitted(object, conc, ...) ## S4 method for signature 'LoessFitClass' trimConc(object, conc, intensity, design, trimLevel, ...)
object |
object of class |
diln |
numeric vector of dilutions for series to be fit |
intensity |
numeric vector of observed intensities for series to be fit |
est.conc |
numeric estimated concentration for EC50 dilution |
method |
character string specifying regression method to use to fit the series |
silent |
logical scalar. If |
trace |
logical scalar. Used in |
conc |
numeric vector containing estimates of the log concentration for each dilution series |
design |
object of class |
trimLevel |
numeric scalar multiplied to Median Absolute Deviation MAD |
... |
extra arguments for generic routines |
The fitted
method returns a numeric vector.
Objects are created internally by calls to the methods
fitSlide
or RPPAFit
.
model
:object of class loess
summarizing loess fit
Class FitClass
, directly.
signature(object = "LoessFitClass")
:
Finds the concentration for an individual dilution series given the
curve fit for the slide.
signature(object = "LoessFitClass")
:
Uses the concentration and intensity series for an entire slide to
fit a curve for the slide of intensity = f(conc).
signature(object = "LoessFitClass")
:
Extracts fitted values of the model.
signature(object = "LoessFitClass")
:
Returns concentration and intensity cutoffs for the model.
P. Roebuck [email protected], James M. Melott [email protected]
The LogisticFitClass
class represents models that were fit with the
logistic model.
## S4 method for signature 'LogisticFitClass' coef(object, ...) ## S4 method for signature 'LogisticFitClass' coefficients(object, ...) ## S4 method for signature 'LogisticFitClass' fitSeries(object, diln, intensity, est.conc, method="nls", silent=TRUE, trace=FALSE, ...) ## S4 method for signature 'LogisticFitClass' fitSlide(object, conc, intensity, ...) ## S4 method for signature 'LogisticFitClass' fitted(object, conc, ...) ## S4 method for signature 'LogisticFitClass' trimConc(object, conc, intensity, design, trimLevel, ...)
## S4 method for signature 'LogisticFitClass' coef(object, ...) ## S4 method for signature 'LogisticFitClass' coefficients(object, ...) ## S4 method for signature 'LogisticFitClass' fitSeries(object, diln, intensity, est.conc, method="nls", silent=TRUE, trace=FALSE, ...) ## S4 method for signature 'LogisticFitClass' fitSlide(object, conc, intensity, ...) ## S4 method for signature 'LogisticFitClass' fitted(object, conc, ...) ## S4 method for signature 'LogisticFitClass' trimConc(object, conc, intensity, design, trimLevel, ...)
object |
object of class |
diln |
numeric vector of dilutions for series to be fit |
intensity |
numeric vector of observed intensities for series to be fit |
est.conc |
numeric estimated concentration for EC50 dilution |
method |
character string specifying regression method to use to fit the series |
silent |
logical scalar. If |
trace |
logical scalar. Used in |
conc |
numeric vector containing estimates of the log concentration for each dilution series |
design |
object of class |
trimLevel |
numeric scalar multiplied to Median Absolute Deviation MAD |
... |
extra arguments for generic routines |
The coef
and coefficients
methods return a named vector
of length three with logistic curve coefficients.
The fitted
method returns a numeric vector.
Objects are created internally by calls to the methods
fitSlide
or RPPAFit
.
coefficients
:numeric vector of length 3, representing alpha, beta, and gamma respectively.
Class FitClass
, directly.
signature(object = "LogisticFitClass")
:
Extracts model coefficients from objects returned by modeling functions.
signature(object = "LogisticFitClass")
:
An alias for coef
signature(object = "LogisticFitClass")
:
Finds the concentration for an individual dilution series given the
curve fit for the slide.
signature(object = "LogisticFitClass")
:
Uses the concentration and intensity series for an entire slide to
fit a curve for the slide of intensity = f(conc).
signature(object = "LogisticFitClass")
:
Extracts fitted values of the model.
signature(object = "LogisticFitClass")
:
Returns concentration and intensity cutoffs for the model.
P. Roebuck [email protected], James M. Melott [email protected]
This function performs normalization for sample loading after quantification.
It is typically invoked as part of the process of creating summary
information from an RPPASet
object.
## S4 method for signature 'MatrixLike' normalize(object, method=getRegisteredNormalizationMethodKeys(), calc.medians=TRUE, sweep.cols=calc.medians, ...)
## S4 method for signature 'MatrixLike' normalize(object, method=getRegisteredNormalizationMethodKeys(), calc.medians=TRUE, sweep.cols=calc.medians, ...)
object |
data frame or matrix to be normalized |
method |
character string specifying name of method of sample loading normalization (see section ‘Details’ below) |
calc.medians |
logical scalar. If |
sweep.cols |
logical scalar. If |
... |
extra arguments for normalization routines |
By default, column medians are subtracted from the input data values; these adjusted data values are then passed to the requested normalization routine for further processing.
The method
argument may be augmented with user-provided normalization
methods. Package-provided values are:
medpolish | Tukey's median polish normalization |
median | sample median normalization |
house | housekeeping normalization |
vs | variable slope normalization |
none | no normalization done |
Specifying “median” as the method
argument causes the row
median to be subtracted from each sample. Specifying “house” causes
the median of one or more housekeeping antibodies to be used. The names of
the antibodies to be used must be supplied as a named argument to this
method. Specifying “vs” causes the sample median to be used along
with a multiplicative gamma (see reference below).
Returns normalized concentrations as matrix appropriately annotated.
P. Roebuck [email protected], E. Shannon Neeley [email protected], James M. Melott [email protected]
normalize
is a generic function used to normalize the data based
on the input object. The method invokes particular methods
which depend on the class
of the first argument.
## S4 method for signature 'ANY' normalize(object, ...) ## S4 method for signature 'NULL' normalize(object, ...)
## S4 method for signature 'ANY' normalize(object, ...) ## S4 method for signature 'NULL' normalize(object, ...)
object |
an object to be normalized |
... |
additional arguments affecting the normalization process |
The form of the value returned by normalize
depends on the
class of its argument. See the documentation of the particular methods
for details of what is produced by that method.
If the object is NULL
, NA
is returned.
P. Roebuck [email protected]
qcprob
is a generic function used to produce a quality control
probability based on the input object. The method invokes particular
methods
which depend on the class
of the
first argument.
## S4 method for signature 'ANY' qcprob(object, ...) ## S4 method for signature 'NULL' qcprob(object, ...)
## S4 method for signature 'ANY' qcprob(object, ...) ## S4 method for signature 'NULL' qcprob(object, ...)
object |
an object for which a QC probability is desired |
... |
additional arguments affecting the QC probability produced |
The form of the value returned by qcprob
depends on the
class of its argument. See the documentation of the particular methods
for details of what is produced by that method.
If the object is NULL
, NA
is returned.
P. Roebuck [email protected], James M. Melott [email protected]
These routines represent the high-level access for model registration, which enables data-driven access by other routines. This represents the initial implementation and may change in the future.
getRegisteredModel(key) getRegisteredModelLabel(key) getRegisteredModelKeys() registerModel(key, classname, ui.label=names(key))
getRegisteredModel(key) getRegisteredModelLabel(key) getRegisteredModelKeys() registerModel(key, classname, ui.label=names(key))
key |
character string representing a registered model |
classname |
character string specifying Model class name to register |
ui.label |
character string specifying label to display by UI |
getRegisteredModel
returns the classname
associated with
key
.
getRegisteredModelLabel
returns the ui.label
associated with
key
.
getRegisteredModelKeys
returns vector of key
s for all
registered models.
registerModel
is invoked for its side effect, which is registering
classname
and ui.label
by association to key
.
P. Roebuck [email protected], James M. Melott [email protected]
getRegisteredObject
,
getRegisteredObjectKeys
,
registerClassname
## Create new (but nonfunctional) fit model ## Not run due to lack of capability to unregister class ## Not run: setClass("TestFitClass", representation("FitClass", testfit="character"), prototype(testfit="TestFitClass")) ## Register fit model to enable its use by package registerModel("testfit", "TestFitClass", "Registered Test Fit Class") ## Show all registered fit models sapply(getRegisteredModelKeys(), function(key) { c(model=getRegisteredModel(key), label=getRegisteredModelLabel(key)) }) ## End(Not run)
## Create new (but nonfunctional) fit model ## Not run due to lack of capability to unregister class ## Not run: setClass("TestFitClass", representation("FitClass", testfit="character"), prototype(testfit="TestFitClass")) ## Register fit model to enable its use by package registerModel("testfit", "TestFitClass", "Registered Test Fit Class") ## Show all registered fit models sapply(getRegisteredModelKeys(), function(key) { c(model=getRegisteredModel(key), label=getRegisteredModelLabel(key)) }) ## End(Not run)
These routines represent the high-level access for normalization method registration, which enables data-driven access by other routines. This represents the initial implementation and may change in the future.
getRegisteredNormalizationMethod(key) getRegisteredNormalizationMethodLabel(key) getRegisteredNormalizationMethodKeys() registerNormalizationMethod(key, method, ui.label=names(key))
getRegisteredNormalizationMethod(key) getRegisteredNormalizationMethodLabel(key) getRegisteredNormalizationMethodKeys() registerNormalizationMethod(key, method, ui.label=names(key))
key |
character string representing a registered normalization method |
method |
function to invoke for normalization |
ui.label |
character string specifying label to display by UI |
getRegisteredNormalizationMethod
returns the method
associated
with key
.
getRegisteredNormalizationMethodLabel
returns the ui.label
associated with key
.
getRegisteredNormalizationMethodKeys
returns vector of key
s
for all registered normalization methods.
registerNormalizationMethod
is invoked for its side effect, which is
registering method
and ui.label
by association to key
.
P. Roebuck [email protected], James M. Melott [email protected]
getRegisteredObject
,
getRegisteredObjectKeys
,
registerMethod
## Not run: ## Not run due to lack of capability to unregister methods ## Create new normalization method normalize.testNorm <- function(concs, bar) { return(normconcs <- concs - bar) } ## Register normalization method to enable its use by package registerNormalizationMethod("testNorm", normalize.testNorm, "Registered Test Normalization Class") ## Use it... concs <- matrix(runif(500), nrow=10) normalize(concs, method="testNorm", bar=0.005) ## Show all registered fit models sapply(getRegisteredNormalizationMethodKeys(), function(key) { c(key = key, label=getRegisteredNormalizationMethodLabel(key)) }) ## End(Not run)
## Not run: ## Not run due to lack of capability to unregister methods ## Create new normalization method normalize.testNorm <- function(concs, bar) { return(normconcs <- concs - bar) } ## Register normalization method to enable its use by package registerNormalizationMethod("testNorm", normalize.testNorm, "Registered Test Normalization Class") ## Use it... concs <- matrix(runif(500), nrow=10) normalize(concs, method="testNorm", bar=0.005) ## Show all registered fit models sapply(getRegisteredNormalizationMethodKeys(), function(key) { c(key = key, label=getRegisteredNormalizationMethodLabel(key)) }) ## End(Not run)
The RPPA class represents the raw quantification data from a reverse-phase protein array experiment.
RPPA(file, path=".", slideNumber=NA, antibody=NULL, tracking=NULL, seriesToIgnore=NULL, warningsFileName="warnings.txt" ) is.RPPA(x) ## S4 method for signature 'RPPA' dim(x) ## S4 method for signature 'RPPA' image(x, measure="Net.Value", main = .mkPlotTitle(measure, x@antibody), colorbar=FALSE, col=terrain.colors(256), ...) ## S4 method for signature 'RPPA' summary(object, ...) seriesNames(rppa) seriesToUseToMakeCurve(rppa)
RPPA(file, path=".", slideNumber=NA, antibody=NULL, tracking=NULL, seriesToIgnore=NULL, warningsFileName="warnings.txt" ) is.RPPA(x) ## S4 method for signature 'RPPA' dim(x) ## S4 method for signature 'RPPA' image(x, measure="Net.Value", main = .mkPlotTitle(measure, x@antibody), colorbar=FALSE, col=terrain.colors(256), ...) ## S4 method for signature 'RPPA' summary(object, ...) seriesNames(rppa) seriesToUseToMakeCurve(rppa)
file |
character string or connection specifying text file containing quantifications of a reverse-phase protein array experiment |
path |
character string specifying the path from the current
directory to the file. The default value assumes the file is
contained in the current directory. If |
antibody |
character string specifying antibody name. If missing,
default value is filename (referenced by |
slideNumber |
integer containing the index of the slide currently being processed. |
warningsFileName |
character string holding the name of the file to which to write out warning messages generated during processing. |
tracking |
data.frame used to track the points data from a slide and how they are used. (see section ‘Tracking’ below) |
seriesToIgnore |
Comma separated list of series names to ignore. These series will not be used to calculate the curve used to fit data. Names in list must match series names in sample file. |
object |
object of class |
x |
object of class |
measure |
character string containing the name of the measurement column
in |
main |
character string used to title the image plot |
colorbar |
logical scalar that determines whether to include a
color bar in the plot. If |
col |
graphics parameter used by image. |
... |
extra arguments for generic or plotting routines |
rppa |
object of class |
The data frame slot (data
) in a valid RPPA object constructed
from a quantification file using the RPPA
generator function
is guaranteed to contain at least 14 columns of information:
Order |
Spot number order in file |
Main.Row |
logical location of spot on the array |
Main.Col |
logical location of spot on the array |
Sub.Row |
logical location of spot on the array |
Sub.Col |
logical location of spot on the array |
Series.Id |
unique numeric identifier of sample spotted at location |
Spot.Type |
type of spot at location |
Dilution |
measurement representing background-corrected mean intensity of the spot |
Net.Value |
measurement representing background-corrected mean intensity of the spot |
Raw.Value |
measurement representing mean intensity of the spot |
Background.Value |
measurement representing mean background intensity of the spot |
Spot.X.Position |
X location of spot on graphic image |
Spot.Y.Position |
Y location of spot on graphic image |
Original.Order |
Spot number order in original input file |
Taken together, the four components (Main.Row, Sub.Row, Main.Col, Sub.Col) give the logical location of aspot on an array. Additional columns may be included.
The RPPA
generator returns an object of class RPPA
.
The is.RPPA
method returns TRUE
if its
argument is an object of class RPPA
.
The dim
method returns a numeric vector of length 4.
The image
method invisibly returns the RPPA
object on
which it was invoked.
The summary
method returns a summary of the underlying data frame.
The seriesNames
function returns a character vector containing
the names of the unique (non-control) dilution series on the array.
The seriesToUseToMakeCurve
function returns a character vector containing
the names of the unique (non-control) dilution series on the array that are
used to create a curve to fit samples to.
An object for tracking how points in the slide are to be used in the process. The information comes from the sample file of the first slide that has a valid layout. The layout of all other slides are compared to this and skipped if they don't have an identical layout.
Slots
spotType |
Spot.Type according to design file. | No default | |
isNegCtrl |
Is point a Negative Control Point. | Default: FALSE | TRUE if value of Spot.Type is negative control type (Blank, Buffer, NegCtrl) |
isPosCtrl |
Is point a Positive Control Point. | Default: FALSE | TRUE if value of Spot.Type is positive control type (PosCtrl, or PosCtrl-Noise) |
isCtrl |
Is point a Control Point. | Default: FALSE | TRUE if value of Spot.Type is any control type (Blank, Buffer, NegCtrl, PosCtrl or PosCtrl-Noise) |
applySpatialCorrection |
Apply spatial correction to point | Default: TRUE | FALSE if Spot.Type in design file is any control type, but TRUE if an Noise type. |
makePartOfCurve |
Should point be used to create curve to which to fit data? | Default: TRUE | FALSE if SpotType is control type or noise type (Blank, Buffer, Noise, NegCtrl, PosCtrl or PosCtrl-Noise) or in SeriesToIgnore parameter |
fitToCurve |
Should point be fit to curve? | Default: TRUE | FALSE if point is control in design but not a noise point (Blank, Buffer, NegCtrl, or PosCtrl) |
isNoise |
Should point be used in noise calculations | Default: FALSE | TRUE if Noise Point (Noise or PosCtrl-Noise) |
isSample |
Is point a sample point? | Default: TRUE | FALSE if not Sample Point in design file |
badPoint |
Does this point have a value that was not used or caused problems in processing and whos output accuracy should be questioned? | Default: FALSE | Used as status indicator during run. |
dilution |
Dilution value for this point. (Decimal value from slide). | ||
Although objects of the class can be created by a direct call to
new, the preferred method is to use the
RPPA
generator function.
data
data.frame containing the contents of a quantification file
file
character string specifying the name of the file that the data was loaded from
slideNumber
:integer containing the index of the slide currently being processed.
antibody
character string specifying name of antibody
tracking
data.frame used to track the points data from a slide and how they are used. (see section ‘Tracking’ below)
seriesToIgnore
NULL or Comma separated list of series names to ignore. These series will not be used to calculate the curve used to fit data. Names in list must match series names in sample file.
warningsFileName
character string holding the name of the file to which to write out warning messages generated during processing.
signature(x = "RPPA")
:
Returns the dimensions of the slide layout.
signature(x = "RPPA")
:
Produces a "geographic" image of the measurement column named by
the measure
argument. The colors in the image represent the
intensity of the measurement at each spot on the array, and the
display locations match the row and column locations of the spot.
Any measurement column can be displayed using this function. An
optional color bar can be added, placed along the right edge.
signature(object = "RPPA")
:
Prints a summary of the underlying data frame.
Kevin R. Coombes [email protected], P. Roebuck [email protected], James M. Melott [email protected]
The RPPADesignParams
class is used to bundle the design parameter
set together for easier re-use.
RPPADesignParams( center = FALSE, seriesToIgnore = NULL, majorXDivisions=as.integer(NA), majorYDivisions=as.integer(NA)) is.RPPADesignParams(x) ## S4 method for signature 'RPPADesignParams' paramString(object, slots, ...) ## S4 method for signature 'RPPA' plot(x, measure, main, ...)
RPPADesignParams( center = FALSE, seriesToIgnore = NULL, majorXDivisions=as.integer(NA), majorYDivisions=as.integer(NA)) is.RPPADesignParams(x) ## S4 method for signature 'RPPADesignParams' paramString(object, slots, ...) ## S4 method for signature 'RPPA' plot(x, measure, main, ...)
center |
logical scalar. If |
x |
object of class |
seriesToIgnore |
object of class |
majorXDivisions |
integer to describe distance between grid lines on the X axis of the R2 residuals plot. Defaults to 10 if NA or invalid value provided. |
majorYDivisions |
integer to describe distance between grid lines on the Y axis of the R2 residuals plot. Defaults to 10 if NA or invalid value provided. |
object |
object of class |
slots |
strings specifying |
main |
overall title for plot |
measure |
character string specifying measure to plot |
... |
extra arguments for generic or plotting routines |
Allows control of some specific controls for how RPPA slides are processed.
The RPPADesignParams
generator returns an object of class
RPPADesignParams
.
The is.RPPADesignParams
method returns TRUE
if its
argument is an object of class RPPADesignParams
.
The paramString
method returns a character vector, possibly
empty but never NULL
.
Although objects of these classes can be created by a direct call to
new, the preferred method is to start with the
RPPADesignParams
generator, followed by the
RPPADesignFromParams
function to construct the final object
(the RPPADesign
generator is directly implemented in this way).
For RPPADesignParams
class:
center
:see corresponding argument above
seriesToIgnore
:see corresponding argument above
majorXDivisions
:see corresponding argument above
majorYDivisions
:see corresponding argument above
signature(object = "RPPADesignParams")
:
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.
Kevin R. Coombes [email protected], P. Roebuck [email protected], James M. Melott [email protected]
showClass("RPPADesignParams") designparams <- designparams <- RPPADesignParams(center=FALSE, seriesToIgnore=list(), majorXDivisions = as.integer(11), majorYDivisions = as.integer(11) ) paramString(designparams)
showClass("RPPADesignParams") designparams <- designparams <- RPPADesignParams(center=FALSE, seriesToIgnore=list(), majorXDivisions = as.integer(11), majorYDivisions = as.integer(11) ) paramString(designparams)
Objects of the RPPAFit
class represent the results of fitting a
statistical model of response to the dilution series in a
reverse-phase protein array experiment.
## S4 method for signature 'RPPAFit' coef(object, ...) ## S4 method for signature 'RPPAFit' coefficients(object, ...) ## S4 method for signature 'RPPAFit' fitted(object, type=c("Y", "y", "X", "x"), ...) ## S4 method for signature 'RPPAFit' hist(x, type=c("Residuals", "StdRes", "ResidualsR2"), xlab=NULL, main=NULL, ...) ## S4 method for signature 'RPPAFit' image(x, measure=c("Residuals", "ResidualsR2", "StdRes", "X", "Y"), main, ...) ## S4 method for signature 'RPPAFit,missing' plot(x, y, type=c("cloud", "series", "individual", "steps", "resid"), col=NULL, main, xform=NULL, xlab="Log Concentration", ylab="Intensity", ...) ## S4 method for signature 'RPPAFit' resid(object, type=c("raw", "standardized", "r2"), ...) ## S4 method for signature 'RPPAFit' residuals(object, type=c("raw", "standardized", "r2"), ...) ## S4 method for signature 'RPPAFit' summary(object, ...)
## S4 method for signature 'RPPAFit' coef(object, ...) ## S4 method for signature 'RPPAFit' coefficients(object, ...) ## S4 method for signature 'RPPAFit' fitted(object, type=c("Y", "y", "X", "x"), ...) ## S4 method for signature 'RPPAFit' hist(x, type=c("Residuals", "StdRes", "ResidualsR2"), xlab=NULL, main=NULL, ...) ## S4 method for signature 'RPPAFit' image(x, measure=c("Residuals", "ResidualsR2", "StdRes", "X", "Y"), main, ...) ## S4 method for signature 'RPPAFit,missing' plot(x, y, type=c("cloud", "series", "individual", "steps", "resid"), col=NULL, main, xform=NULL, xlab="Log Concentration", ylab="Intensity", ...) ## S4 method for signature 'RPPAFit' resid(object, type=c("raw", "standardized", "r2"), ...) ## S4 method for signature 'RPPAFit' residuals(object, type=c("raw", "standardized", "r2"), ...) ## S4 method for signature 'RPPAFit' summary(object, ...)
object |
object of class |
x |
object of class |
type |
character string describing the type of fitted values, residuals, images, histograms, or plots |
measure |
character string specifying measure to compute from fit |
xlab |
graphics parameter specifying how the x-axis should be labeled |
ylab |
graphics parameter specifying how the y-axis should be labeled |
main |
character string specifying title for the plot |
xform |
function to transform the raw data associated with the
|
y |
not used |
col |
graphics parameter, used only if |
... |
extra arguments for generic or plotting routines |
The RPPAFit
class holds the results of fitting a response model to
all the dilution series on a reverse-phase protein array. For details on
how the model is fit, see the RPPAFit
function. 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 , which represent the
(log) concentration of the protein present in different dilution series.
The coef
and coefficients
methods return the numeric model
coefficients from objects returned by modeling functions.
The fitted
method returns a numeric vector.
The hist
method returns an object of class histogram
.
The image
method invisibly returns the object x
on which
it was invoked.
The plot
method invisibly returns the object x
on which
it was invoked.
The resid
and residuals
methods return a numeric vector.
The summary
method invisibly returns NULL
.
Objects should be constructed using the RPPAFit
function.
call
:object of class call
specifying the function
call that was used to generate this model fit
rppa
:object of class RPPA
containing the raw data
that was fit
measure
:character string containing the name of the measurement column in the raw data that was fit by the model
method
:character string containing the name of the method that was used to estimate the upper and lower limit parameters in the model
trimset
:numeric vector of length 5 containing the low and high intensities, the low and high concentrations that mark the trimming boundaries, and the trim level used
model
:object of class FitClass
unique to the
model that was fit
noise
:numeric vector of estimated relative background concentrations for noise for use in calculating qc values for positive control dilution series with Spot.Types designated as posCtrl-Noise or Noise.
concentrations
:numeric vector of estimates of the relative log concentration of protein present in each sample
lower
:numeric vector containing the lower bounds on the confidence interval of the log concentration estimates
upper
:numeric vector containing the upper bounds on the confidence interval of the log concentration estimates
conf.width
:numeric scalar specifying width of the confidence interval
intensities
:numeric vector containing the predicted observed intensity at the estimated concentrations for each dilution series
ss.ratio
:numeric vector containing statistic measuring the
for each individual dilution series
warn
:character vector containing any warnings that arose when trying to fit the model to individual dilution series
version
:character string containing the version of RPPASPACE that produced the fit
signature(object = "RPPAFit")
:
Extracts model coefficients from objects returned by modeling functions.
signature(object = "RPPAFit")
:
An alias for coef
.
signature(object = "RPPAFit")
:
Extracts the fitted values of the model. This process is more
complicated than it may seem at first, since we are estimating values
on both the and
axes. By default, the fitted
values are assumed to be the intensities,
, which are
obtained using either an uppercase or lowercase 'y' as the
type
argument. The fitted log concentrations are
returned when type
is set to either uppercase or
lowercase 'x'. In the notation used above to describe the model,
these fitted values are given by .
signature(x = "RPPAFit")
:
Produces a histogram of the residuals. The exact form of the residuals
being displayed depends on the value of the type
argument.
signature(x = "RPPAFit")
:
Produces a 'geographic' plot of either the residuals or the fitted
values, depending on the value of the measure
argument. The
implementation reuses code from the image
method for an
RPPA
object.
signature(x = "RPPAFit", y = "missing")
:
Produces a diagnostic plot of the model fit. The default type
,
'cloud', simply plots the fitted values against the observed
values as a cloud of points around the jointly estimated
sigmoid curve. The 'series' plot uses different colored lines to join
points belonging to the same dilution series. The 'individual' plot
produces separate graphs for each dilution series, laying each one
alongside the jointly fitted sigmoid curve.
signature(object = "RPPAFit")
:
An alias for residuals
.
signature(object = "RPPAFit")
:
Reports the residual errors. The 'raw' residuals are defined
as the difference between the observed intensities and the
fitted intensities, as computed by the fitted
function.
The 'standardized' residuals are obtained by standardizing the
raw residuals.
signature(object = "RPPAFit")
:
Prints a summary of the RPPAFit
object, which reports the
function call used to fit the model and important fitting parameters.
Kevin R. Coombes [email protected], P. Roebuck [email protected], James M. Melott [email protected]
RPPA
,
RPPADesignParams
,
RPPAFit
,
hist
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 signature 'RPPAFitParams' paramString(object, slots, ...)
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 signature 'RPPAFitParams' paramString(object, slots, ...)
rppa |
object of class |
|||||||
fitparams |
object of the class |
|||||||
progmethod |
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. |
|||||||
measure |
character string identifying the column of the raw RPPA data that should be used to fit to the model. |
|||||||
model |
character string specifying the model for the response curve fitted for the slide. Valid values are:
|
|||||||
xform |
optional function that takes a single input vector and
returns a single output vector of the same length. The |
|||||||
method |
character string specifying the method for matching the individual dilution series to the response curve fitted for the slide. Valid values are:
|
|||||||
trim |
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 |
|||||||
ci |
logical scalar. If |
|||||||
ignoreNegative |
logical scalar. If |
|||||||
trace |
logical scalar passed to nls in the |
|||||||
verbose |
logical scalar. If |
|||||||
veryVerbose |
logical scalar. If |
|||||||
warnLevel |
integer scalar used to set the |
|||||||
residualsrotation |
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 |
object of class |
|||||||
x |
object of class |
|||||||
slots |
strings specifying |
|||||||
... |
extra arguments for generic routines. |
The basic mathematical model is given by
where is the observed intensity,
is the designed dilution
step and
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
, 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 assuming a rough logistic shape for the protein
response curve.
Next, we fit an overall response curve for the slide using the
estimated concentrations and observed intensities
.
The model for
is specified in the
parameter.
Next, we update the estimates of the individual using our
improved fitted model
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 using the improved estimates for
. We continue to iterate between
and
.
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.
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
.
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 [email protected], Kevin R. Coombes [email protected], James M. Melott [email protected]
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)
showClass("RPPAFitParams") fitparams <- RPPAFitParams(measure="Net.Value", method="nls", model="cobs", trim=2, ci=FALSE, ignoreNegative=FALSE, warnLevel=-1 ) paramString(fitparams)
The RPPANormalizationParams class is used to bundle the parameter set together that control how to perform spatial adjustment into a reusable object.
RPPANormalizationParams(method, arglist=NULL) is.RPPANormalizationParams(x) ## S4 method for signature 'RPPANormalizationParams' paramString(object, slots, ...)
RPPANormalizationParams(method, arglist=NULL) is.RPPANormalizationParams(x) ## S4 method for signature 'RPPANormalizationParams' paramString(object, slots, ...)
method |
character string specifying normalization method to use |
arglist |
list of named key/value pairs representing argument list to
be passed upon invocation of |
object |
object of class |
x |
object of class |
slots |
strings specifying |
... |
extra arguments for generic routines |
The method
argument is combined with the arglist
argument
prior to invocation of normalize
method.
The RPPANormalizationParams
generator returns an object of class
RPPANormalizationParams
.
The is.RPPANormalizationParams
method returns TRUE
if its
argument is an object of class RPPANormalizationParams
.
The paramString
method returns a character vector, possibly
empty but never NULL
.
Although objects of the class can be created by a direct call to
new, the preferred method is to use the
RPPANormalizationParams
generator function.
name
:character string; see arguments above
method
:character string; see arguments above
arglist
:list of named key/value pairs; see arguments above
signature(object = "RPPANormalizationParams")
:
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 [email protected], James M. Melott [email protected]
showClass("RPPANormalizationParams") normparams <- RPPANormalizationParams(method="medpolish", arglist=list(calc.medians=FALSE)) paramString(normparams)
showClass("RPPANormalizationParams") normparams <- RPPANormalizationParams(method="medpolish", arglist=list(calc.medians=FALSE)) paramString(normparams)
The RPPAPreFitQC class represents the inputs necessary to determine the quality control rating of a reverse-phase protein array slide.
RPPAPreFitQC(rppa, useAdjusted=FALSE) is.RPPAPreFitQC(x) ## S4 method for signature 'RPPAPreFitQC' qcprob(object, ...) ## S4 method for signature 'RPPAPreFitQC' summary(object, ...)
RPPAPreFitQC(rppa, useAdjusted=FALSE) is.RPPAPreFitQC(x) ## S4 method for signature 'RPPAPreFitQC' qcprob(object, ...) ## S4 method for signature 'RPPAPreFitQC' summary(object, ...)
rppa |
object of class |
useAdjusted |
logical scalar. If |
object |
object of (sub)class |
x |
object of (sub)class |
... |
extra arguments for generic routines |
The RPPAPreFitQC
generator returns an object of subclass of class
RPPAPreFitQC
.
The is.RPPAPreFitQC
method returns TRUE
if its
argument is an object of subclass of class RPPAPreFitQC
.
The summary
method returns a summary of the underlying data frame.
Objects are created by calls to the RPPAPreFitQC
factory method.
signature(object = "RPPAPreFitQC")
:
Placeholder method which must be implemented by subclass.
signature(object = "RPPAPreFitQC")
:
Placeholder method which must be implemented by subclass.
The current implementation only handles designs with 5 dilution
series.
Anything else will fail.
P. Roebuck [email protected] James M. Melott [email protected]
The RPPASet class fits rppaspace curves to an entire directory of reverse-phase protein array experiments.
RPPASet(path, designparams, fitparams, spatialparams=NULL, normparams, doprefitqc=FALSE, parallelClusterSize, residualsrotation = as.integer(0), warningsFileName="warnings.txt", printTimings=TRUE ) is.RPPASet(x) ## S4 method for signature 'RPPASet' normalize(object, ...) ## S4 method for signature 'RPPASet' summary(object, onlynormqcgood=ran.prefitqc(object), ...) ## S4 method for signature 'RPPASet' write.summary(object, path, prefix="rppaspace", graphs=TRUE, createcombinedoutputimage=FALSE, imagedir=NULL, onlynormqcgood=ran.prefitqc(object), imageextension=".tif", imagerotation=as.integer(0), residualsrotation=as.integer(0), majorXDivisions = object@design@majorXDivisions, majorYDivisions = object@design@majorYDivisions, ...)
RPPASet(path, designparams, fitparams, spatialparams=NULL, normparams, doprefitqc=FALSE, parallelClusterSize, residualsrotation = as.integer(0), warningsFileName="warnings.txt", printTimings=TRUE ) is.RPPASet(x) ## S4 method for signature 'RPPASet' normalize(object, ...) ## S4 method for signature 'RPPASet' summary(object, onlynormqcgood=ran.prefitqc(object), ...) ## S4 method for signature 'RPPASet' write.summary(object, path, prefix="rppaspace", graphs=TRUE, createcombinedoutputimage=FALSE, imagedir=NULL, onlynormqcgood=ran.prefitqc(object), imageextension=".tif", imagerotation=as.integer(0), residualsrotation=as.integer(0), majorXDivisions = object@design@majorXDivisions, majorYDivisions = object@design@majorYDivisions, ...)
path |
character string specifying a directory. In the case of
the |
designparams |
object of class |
fitparams |
object of class |
spatialparams |
object of class |
normparams |
object of class |
doprefitqc |
logical scalar. If |
printTimings |
TRUE/FALSE whether or not to print out the time taken as the method is run. Used for performance debugging purposes. |
object |
object of class |
prefix |
character string used as a filename prefix on files generated by the write.summary method. |
graphs |
logical scalar. If |
createcombinedoutputimage |
logical scalar. If |
imagedir |
character string specifying the directory containing the images corresponding to the quantification files |
imageextension |
character string specifying extension to use when searching for images matching the slide file names. |
imagerotation |
numeric scalar containing 90 degree value to rotate the input image by when appending it to the generated graphs in the combined output image file for each slide. |
residualsrotation |
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. |
majorXDivisions |
integer to describe distance between grid lines on the X axis of the R2 residuals plot. Defaults to 10 if NA or invalid value provided. |
majorYDivisions |
integer to describe distance between grid lines on the Y axis of the R2 residuals plot. Defaults to 10 if NA or invalid value provided. |
warningsFileName |
character string specifying file to append any warnings generated by this function. |
onlynormqcgood |
logical scalar. If |
x |
object of class |
parallelClusterSize |
Number of parallel cores to use when processing. |
... |
extra arguments for generic or plotting routines |
Quantify all the slides in a directory using RPPASet
generator.
This returns an object containing slide data and fits for each slide.
Typically this is followed by a call to write.summary
to write
the resulting quantifications and diagnostic plots to a directory.
Potentially generates multiple CSV and TSV files:
one for the raw concentrations (rppaspace_conc_raw.csv"),
one for the statistics (rppaspace_ss_ratio.csv),
and one for the normalized concentrations (rppaspace_conc_norm_[norm_method].csv);
a fourth file containing the goodness of fit probabilities
(rppaspace_prefit_qc.csv) may be present if pre-fit QC analysis was requested.
If spatial adjustments were requested, a TSV file
(spatial_adjustments.tsv) will be created.
If positive control dilution series have been declared as Noise or
PosCtrl-Noise points in the design file, an additional CSV file
of noise statistics will be created (rppaspace_noise.csv).
If prefit QC analysis was done and/or noise qc metric were created, a
combined qc metrics file will be created (rppaspace_combined_qc.csv) as well.
Additionally, a TSV file detailing completion of each stage of
processing for each slide is produced (rppaspace_summary.tsv).
If imagedir
is NULL
, the directory is assumed to be a sibling
directory to path
named "tif". If graphs
is TRUE
,
two PNG files containing output graphs are created per antibody.
The original slide image is merged with these output PNG graph files,
generating an additional JPEG file per antibody.
The RPPASet
generator returns an object of class RPPASet
.
The is.RPPASet
method returns TRUE
if its
argument is an object of class RPPASet
.
The summary
method returns an object of class RPPASetSummary
.
The write.summary
method invisibly returns NULL
.
Although objects of the class can (in theory) be created by a direct call
to new, the only realistic method is to use the
RPPASet
generator function.
call
:object of class call
specifying the function
call that was used during construction
version
:character string containing the version of this package used to construct the object
design
:object of class RPPADesignParams
, common to all
the slides
errorsFileName
:character string holding the name of the file to which to write out error messages generated during processing.
warningsFileName
:character string holding the name of the file to which to write out warning messages generated during processing.
rppas
:array of objects of class RPPA
spatialparams
:object of class RPPASpatialParams
that was used to perform spatial adjustment, or NULL
prefitqcs
:array of objects of class
RPPAPreFitQCParams
fitparams
:object of class RPPAFitParams
that was
used to construct the model fits
normparams
:object of class RPPANormalizationParams
used to normalize the raw concentrations
fits
:array of fitted objects of class RPPAFit
completed
:logical matrix specifying stage completion for each slide
signature(object = "RPPASet")
:
Assembles matrix of concentrations from all fits in object,
using the object's normalization settings.
signature(object = "RPPASet")
:
Creates an object of class RPPASetSummary
.
signature(object = "RPPASet")
:
Writes a record of the entire RPPASet, including fitted values,
residuals, and images of the processed slides.
Kevin R. Coombes [email protected], P. Roebuck [email protected], James M. Melott [email protected]
RPPA
,
RPPADesignParams
,
RPPAFit
,
RPPASetSummary
The RPPASetSummary class contains the summary information derived from an RPPASet object.
RPPASetSummary(rppaset, onlynormqcgood=ran.prefitqc(rppaset)) is.RPPASetSummary(x) ## S4 method for signature 'RPPASetSummary' write.summary(object, path, prefix="rppaspace", ...)
RPPASetSummary(rppaset, onlynormqcgood=ran.prefitqc(rppaset)) is.RPPASetSummary(x) ## S4 method for signature 'RPPASetSummary' write.summary(object, path, prefix="rppaspace", ...)
rppaset |
object of class |
onlynormqcgood |
logical scalar. If |
x |
object of class |
object |
object of class |
path |
character string specifying the path from the current directory to the directory containing the files to be processed |
prefix |
character string used as a prefix on files generated by
the |
... |
extra arguments for generic routines |
The RPPASetSummary
generator returns an object of class
RPPASetSummary
.
The is.RPPASetSummary
method returns TRUE
if its
argument is an object of class RPPASetSummary
.
The write.summary
method invisibly returns NULL
.
Although objects of the class can (in theory) be created by a direct call
to new, the only realistic method is to use the
RPPASetSummary
generator function.
raw
:numeric matrix of raw concentrations
ss
:numeric matrix of statistical values
norm
:numeric matrix of normalized concentrations
probs
:numeric vector of goodness of fit probabilities,
or NULL
(if pre-fit QC analysis was not requested)
completed
:logical matrix specifying stage completion for each slide
noise
:numeric vector of calculated log concentrations for noise qc values for positive control dilution series with Spot.Types designated as posCtrl-Noise or Noise.
design
:object of class RPPADesignParams
, common to all
the slides
onlynormqcgood
:logical scalar specifying if raw concentrations were filtered according to their pre-fit quality control scores prior to normalization
version
:character string containing the version of this package used to construct the object
signature(object = "RPPASetSummary")
:
Potentially generates multiple CSV and TSV files:
one for the raw concentrations (rppaspace_conc_raw.csv"),
one for the statistics (rppaspace_ss_ratio.csv),
and one for the normalized concentrations (rppaspace_conc_norm_[norm_method].csv);
a fourth file containing the goodness of fit probabilities
(rppaspace_prefit_qc.csv) may be present if pre-fit QC analysis was requested.
If spatial adjustments were requested, a TSV file
(spatial_adjustments.tsv) will be created.
If positive control dilution series have been declared as Noise or
PosCtrl-Noise points in the design file, an additional CSV file
of noise statistics will be created (rppaspace_noise.csv).
If prefit QC analysis was done and/or noise qc metric were created, a
combined qc metrics file will be created (rppaspace_combined_qc.csv) as well.
Additionally, a TSV file detailing completion of each stage of
processing for each slide is produced (rppaspace_summary.tsv).
The three CSV files may be reordered (to match that of the original input) when written to disk.
P. Roebuck [email protected], James M. Melott [email protected]
The RPPASPACESettings class represents the arguments needed to perform curve fitting.
RPPASPACESettings(txtdir, imgdir, outdir, designparams, fitparams, spatialparams=NULL, normparams, doprefitqc=FALSE, onlynormqcgood=doprefitqc, parallelClusterSize=as.integer(1), createcombinedoutputimage = FALSE, imageextension=".tif", imagerotation=as.integer(0), residualsrotation=as.integer(0), warningsFileName="warnings.txt", errorsFileName = "errors.txt" ) fitCurveAndSummarizeFromSettings(settings) is.RPPASPACESettings(x) ## S4 method for signature 'RPPASPACESettings' write.summary(object, path=as(object@outdir, "character"), ...) ## S4 method for signature 'RPPASPACESettings' paramString(object, designparams.slots, fitparams.slots, spatialparams.slots, normparams.slots, ...)
RPPASPACESettings(txtdir, imgdir, outdir, designparams, fitparams, spatialparams=NULL, normparams, doprefitqc=FALSE, onlynormqcgood=doprefitqc, parallelClusterSize=as.integer(1), createcombinedoutputimage = FALSE, imageextension=".tif", imagerotation=as.integer(0), residualsrotation=as.integer(0), warningsFileName="warnings.txt", errorsFileName = "errors.txt" ) fitCurveAndSummarizeFromSettings(settings) is.RPPASPACESettings(x) ## S4 method for signature 'RPPASPACESettings' write.summary(object, path=as(object@outdir, "character"), ...) ## S4 method for signature 'RPPASPACESettings' paramString(object, designparams.slots, fitparams.slots, spatialparams.slots, normparams.slots, ...)
txtdir |
character string specifying the directory containing quantification files in text format |
imgdir |
character string specifying the directory containing
image files associated with each of the aforementioned quantification
files, or |
outdir |
character string specifying the directory where output from analysis should be stored. Must be writable. |
designparams |
object of class |
fitparams |
object of class |
spatialparams |
object of class |
normparams |
object of class |
doprefitqc |
logical scalar. If |
onlynormqcgood |
logical scalar. If |
parallelClusterSize |
Number of parallel cpus to use on computer when running RPPASPACE. Spatial corrections and fitting diltion series to the calculated curve sections of the code will be done in parallel when this number is greater than 1. Defaults to 1 for backwards compatibility if not specified. |
createcombinedoutputimage |
logical scalar. If |
imageextension |
character string specifying extension to use when searching for images matching the slide file names. Acceptable values are (".tif", ".png", ".bmp", ".gif", ".jpg") |
imagerotation |
numeric scalar containing 90 degree value to rotate the input image by when appending it below the generated graphs in the combined output image file for each slide. Defaults to 0 if not specified. Acceptable values (0, 90, 180, 270) |
residualsrotation |
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. Defaults to 0 if not specified. Acceptable values (0, 90, 180, 270) |
warningsFileName |
character string specifying file to append any warnings generated by this function. Defaults to "warnings.txt" |
errorsFileName |
character string specifying file to append any errors generated by this function. Defaults to "errors.txt" |
object |
object of class |
settings |
object of class |
x |
object of class |
path |
character string specifying the directory where settings summary should be saved. Must be writable. |
designparams.slots |
strings specifying |
fitparams.slots |
strings specifying |
spatialparams.slots |
strings specifying |
normparams.slots |
strings specifying |
... |
extra arguments for generic routines |
The RPPASPACESettings
generator returns an object of class
RPPASPACESettings
.
The is.RPPASPACESettings
method returns TRUE
if its
argument is an object of class RPPASPACESettings
.
The paramString
method returns a character vector, possibly
empty but never NULL
.
The write.summary
method invisibly returns NULL
.
Although objects of the class can be created by a direct call to
new, the preferred method is to use the
RPPASPACESettings
generator function.
txtdir
:object of class Directory
specifying the
directory containing quantification files in text format
imgdir
:object of class Directory
specifying the
directory containing TIFF image files
outdir
:object of class Directory
specifying the
directory where analysis results should be stored
designparams
:object of class RPPADesignParams
specifying the parameters that describe how a particular set of
RPPA slides was designed
fitparams
:object of class RPPAFitParams
specifying the parameters that control model fit
spatialparams
:object of class RPPASpatialParams
specifying the parameters that control spatial adjustment
normparams
:object of class RPPANormalizationParams
specifying the parameters that control normalization
doprefitqc
:see argument
createcombinedoutputimage
:see argument
imageextension
:see argument
imagerotation
:see argument
residualsrotation
:see argument
onlynormqcgood
:see argument
seriesToIgnore
:see argument
parallelClusterSize
:see argument
warningsFileName
:see argument
errorsFileName
:see argument
signature(object = "RPPASPACESettings")
:
Returns string representation of object.
signature(object = "RPPASPACESettings")
:
Writes a text file 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 [email protected], James M. Melott [email protected]
Directory
,
RPPADesignParams
,
RPPASpatialParams
,
RPPAFitParams
,
RPPANormalizationParams
## Not run: showClass("RPPASPACESettings") #Insert an existing directory containing txt, img, and out subdirectories # analysishome <- "C:/temp" txtdir <- file.path(analysishome, "txt" ) imgdir <- file.path(analysishome, "img" ) outdir <- file.path(analysishome, "out") number_cpus_to_use <- 2 warningsFileName <- "warnings.txt" errorsFileName <- "errors.txt" designparams <- RPPADesignParams(center=FALSE, seriesToIgnore=list(), majorXDivisions=as.integer(10), majorYDivisions=as.integer(10) ) spatialparams <- RPPASpatialParams(cutoff=0.8, k=100, gamma=0.1, plotSurface=FALSE) fitparams <- RPPAFitParams(measure="Net.Value", method="nls", model="cobs", trim=2, ci=FALSE, ignoreNegative=FALSE, warnLevel=-1 ) normparams <- RPPANormalizationParams(method="none") settings <- RPPASPACESettings(txtdir=txtdir, imgdir=imgdir, outdir=outdir, designparams=designparams, spatialparams=spatialparams, doprefitqc=TRUE, fitparams=fitparams, normparams=normparams, onlynormqcgood=FALSE, imageextension=".jpg", createcombinedoutputimage=TRUE, warningsFileName=warningsFileName, parallelClusterSize=as.integer(number_cpus_to_use)) #Print the created object paramString(settings) ## End(Not run)
## Not run: showClass("RPPASPACESettings") #Insert an existing directory containing txt, img, and out subdirectories # analysishome <- "C:/temp" txtdir <- file.path(analysishome, "txt" ) imgdir <- file.path(analysishome, "img" ) outdir <- file.path(analysishome, "out") number_cpus_to_use <- 2 warningsFileName <- "warnings.txt" errorsFileName <- "errors.txt" designparams <- RPPADesignParams(center=FALSE, seriesToIgnore=list(), majorXDivisions=as.integer(10), majorYDivisions=as.integer(10) ) spatialparams <- RPPASpatialParams(cutoff=0.8, k=100, gamma=0.1, plotSurface=FALSE) fitparams <- RPPAFitParams(measure="Net.Value", method="nls", model="cobs", trim=2, ci=FALSE, ignoreNegative=FALSE, warnLevel=-1 ) normparams <- RPPANormalizationParams(method="none") settings <- RPPASPACESettings(txtdir=txtdir, imgdir=imgdir, outdir=outdir, designparams=designparams, spatialparams=spatialparams, doprefitqc=TRUE, fitparams=fitparams, normparams=normparams, onlynormqcgood=FALSE, imageextension=".jpg", createcombinedoutputimage=TRUE, warningsFileName=warningsFileName, parallelClusterSize=as.integer(number_cpus_to_use)) #Print the created object paramString(settings) ## End(Not run)
The RPPASpatialParams class is used to bundle the parameter set together that control how to perform spatial adjustment into a reusable object.
RPPASpatialParams(cutoff=0.8, k=100, gamma=0.1, plotSurface=FALSE) is.RPPASpatialParams(x) ## S4 method for signature 'RPPASpatialParams' paramString(object, slots, ...)
RPPASpatialParams(cutoff=0.8, k=100, gamma=0.1, plotSurface=FALSE) is.RPPASpatialParams(x) ## S4 method for signature 'RPPASpatialParams' paramString(object, slots, ...)
cutoff |
numeric scalar used to identify the background cutoff
with value in closed interval [0..1]. Default is |
k |
numeric scalar used as smoothing model argument.
Default is |
gamma |
numeric scalar used as model parameter with value in
closed interval [0..2]. Default is |
plotSurface |
logical scalar. If |
object |
object of class |
x |
object of class |
slots |
strings specifying |
... |
extra arguments for generic routines |
The cutoff
argument passed to quantile
is percentile
of the background estimates used to define the noise region of slide.
The k
argument passed to s
sets upper limit on
degrees of freedom associated with smoothing.
The gamma
argument passed to gam
provides a constant
multiplier used to inflate model degrees of freedom in the
GCV or UBRE/AIC score.
The RPPASpatialParams
generator returns an object of class
RPPASpatialParams
.
The is.RPPASpatialParams
method returns TRUE
if its
argument is an object of class RPPASpatialParams
.
The paramString
method returns a character vector, possibly
empty but never NULL
.
Although objects of the class can be created by a direct call to
new, the preferred method is to use the
RPPASpatialParams
generator function.
cutoff
:numeric scalar; see arguments above
k
:numeric scalar; see arguments above
gamma
:numeric scalar; see arguments above
plotSurface
:logical scalar; see arguments above
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 [email protected], James M. Melott [email protected]
showClass("RPPASpatialParams") spatialparams <- RPPASpatialParams(cutoff=0.8, k=100, gamma=0.1, plotSurface=FALSE) paramString(spatialparams)
showClass("RPPASpatialParams") spatialparams <- RPPASpatialParams(cutoff=0.8, k=100, gamma=0.1, plotSurface=FALSE) paramString(spatialparams)
This function estimates a smoothed surface from positive control spots on
an RPPA slide. The surface is used to perform spatial corrections (i.e.,
because of uneven hybridization) on the array.
It is used before RPPAFit
, one slide at a time.
spatialAdjustmentFromParams(rppa, spatialparams) spatialAdjustment(rppa, cutoff=0.8, k=100, gamma=0.1, plotSurface=FALSE) spatialCorrection(rppa, measure=c("Net.Value", "Raw.Value"), cutoff=0.8, k=100, gamma=0.1, plotSurface=FALSE)
spatialAdjustmentFromParams(rppa, spatialparams) spatialAdjustment(rppa, cutoff=0.8, k=100, gamma=0.1, plotSurface=FALSE) spatialCorrection(rppa, measure=c("Net.Value", "Raw.Value"), cutoff=0.8, k=100, gamma=0.1, plotSurface=FALSE)
rppa |
object of class |
spatialparams |
object of class |
measure |
character string specifying fit measure to smooth |
cutoff |
numeric scalar used to identify the background cutoff with value in range [0..1] |
k |
numeric scalar used as smoothing model argument. |
gamma |
numeric scalar used as model parameter with value in range [0..2] |
plotSurface |
logical scalar. If |
The observed spot intensities are assumed to be a combination of true signal, background noise, and hybridization effects according to the following model:
where is the observed intensity,
is the true signal,
is the effect of hybridization, and
is the
background noise. The subscripts "r" and "c" refer to the physical row
and column of the spot on the array. Background noise is estimated
locally by the array software. The hybridization effect is estimated
fitting a generalized additive model (GAM) to positive control
spots printed uniformly across the array.
The estimated surface is used to scale the intensities on the array. Each intensity is adjusted by the amount that is needed to make the positive control surface flat at the value of the median of the surface. This is done by dividing each spot by the estimated surface value and then multiplying by the median of the surface.
Positive control spots that are expressed below the cutoff for the noise region are excluded from the computation of the surface.
Sometimes, positive control spots are printed in a dilution series to avoid saturation problems with these spots. When this happens, the observed intensities are adjusted by the positive control surface that has the most similar expression level.
The cutoff
argument passed to quantile
is percentile
of the background estimates used to define the noise region of slide.
The k
argument passed to s
sets upper limit on
degrees of freedom associated with smoothing.
The gamma
argument passed to gam
provides a constant
multiplier used to inflate model degrees of freedom in the
GCV or UBRE/AIC score.
Returns modified rppa
with an additional measurement column
named after the measure
with an Adj.
prefix. For example,
if the measure was Net.Value
, the name of the adjusted column
would be Adj.Net.Value
.
P. Roebuck [email protected], E. Shannon Neeley [email protected], James M. Melott [email protected]
Neeley ES, Baggerly KA, Kornblau SM.
Surface Adjustment of Reverse Phase Protein Arrays Using Positive
Control Spots
Cancer Informatics (2012) 11: 77-86.
https://pubmed.ncbi.nlm.nih.gov/22550399/
RPPASpatialParams
,
quantile
,
gam
,
s
,
choose.k
write.summary
is a generic function used like a summary
method
that writes to disk, saving summary information from the object in an
external format. The method invokes particular methods
which
depend on the class
of the first argument.
## S4 method for signature 'ANY' write.summary(object, ...)
## S4 method for signature 'ANY' write.summary(object, ...)
object |
an object for which saving summary information externally is desired |
... |
additional arguments affecting the summary information produced |
Exactly what is written to disk by write.summary
depends on the
class of its argument. See the documentation of the particular methods
for details of what is written by that method.
P. Roebuck [email protected], James M. Melott [email protected]