xraw of a cellHTS object using the B score method.
  Using this method, a two-way median polish is fitted in a per-plate basis to account for row and column effects.
  Optionally, the obtained residuals within each plate can be further divided by their median absolute deviations to standardize for plate-to-plate variability.
  Optionally, a transformation to z-scores can be performed.
Bscore(x, what="xraw", adjustPlateMedian = TRUE, scale = TRUE, save.model = FALSE)cellHTS object that has already been configured. See details.x to consider: "xraw" (default) or "xnorm".cellHTS, which is a copy of the argument
x, plus an additional slot xnorm containing the normalized
data. This is an array of the same dimensions as xraw.
Furthermore, if save.model=TRUE, the slots residuals, rowcol.effects, and overall.effects (only if adjustPlateMedian was also set to TRUE) are added to x.
The latter slots are arrays with the same dimension as x$xraw, except the 
overall.effects, 
which have dimensions 1 x nr Plates x nr Replicates x nr Channels.Moreover, the processing status of the cellHTS object is updated
in the slot state to x$state["normalized"]=TRUE.
normalizePlates or 
summarizeChannels. 
In the B score method, the residual $r_{ijp}$ of the measurement for row i and column j on the p-th plate is obtained by fitting a two-way median polish, in order to account for both row and column effects within the plate:$$r_{ijp} = y_{ijp} - \hat{y}_{ijp} = y_{ijp} - (\hat{\mu}_p + \hat{R}_{ip} + \hat{C}_{jp})$$
$y_{ijp}$ is the measurement value in row i and column j of plate p (taken from x$xraw), and 
$yest_{ijp}$ is the corresponding fitted value. 
This is defined as the sum between the estimated average
of the plate ($mu_p$), the estimated systematic offset for row i 
($R_{ip}$), and the systematic offset for column j ($C_{jp}$).
If scale=TRUE, for each plate p, each of the obtained residual values $r_{ijp}$'s are divided by the median absolute deviation of the residuals in plate p ($MAD_p$), giving the B score value:
$${B_{score}}_{ijp} = \frac{r_{ijp}}{MAD_p}$$
If adjustPlateMedian is set to FALSE, the estimated overall plate average 
($mu_p$) is not removed from the intensity values $y_{ijp}$'s.
If save.model=TRUE, the models residuals ($r_{ijp}$'s), row and column offsets and overall offsets are stored in the slots residuals, rowcol.effects and overall.effects of the cellHTS object x.
Brideau, C., Gunter, B., Pikounis, B. and Liaw, A. (2003) Improved statistical methods for hit selection in high-throughput screening, J. Biomol. Screen 8, 634--647.
Malo, N., Hanley, J.A., Cerquozzi, S., Pelletier, J. and Nadon, R. (2006) Statistical practice in high-throughput screening data analysis, Nature Biotechn 24(2), 167--175.
medpolish,
  plotSpatialEffects,
  normalizePlates,
  summarizeChannels
    data(KcViabSmall)
    x <- KcViabSmall
    x <- Bscore(x, save.model = TRUE)
    ## identical result, but calling Bscore function from "normalizePlates"
    xopt <- normalizePlates(x, normalizationMethod="Bscore", save.model = TRUE)
    all(x$xnorm==xopt$xnorm, na.rm=TRUE)
Run the code above in your browser using DataLab