Learn R Programming

cellHTS2 (version 2.36.0)

spatialNormalization: Spatial normalization

Description

Adjust spatial plate effects. This function works on the data stored in the slot assayData of a cellHTS object by fitting a bivariate function within each plate using local regression (robust local fit) with second degree polynomials. Only wells containing "sample" are considered for the parameter fitting, but adjusted data for all wells are returned.

Usage

spatialNormalization(object, save.model=FALSE, ...)

Arguments

object
a cellHTS object that has already been configured.
...
Parameters that get passed on to the lp function of locfit. Most relevant are nn and h.
save.model
a logical value specifying whether the values of the fitted adjustment functions should be returned in the slot rowcol.effects of the returned object.

Value

An object of class cellHTS with normalized data stored in slot assayData. Furthermore, if save.model=TRUE, it will contain a slot rowcol.effects, a 3D array with the same dimension as Data(object).Moreover, the processing status of the cellHTS object is updated in the slot state to object@state[["normalized"]]=TRUE.

Details

This function is typically not called directly, but rather indirectly from normalizePlates function. The normalization is performed separately for each replicate and channel.

See Also

medpolish, locfit, plotSpatialEffects, normalizePlates, summarizeChannels, plateEffects

Examples

Run this code
    data(KcViabSmall)
    x <- KcViabSmall
    xs <- spatialNormalization(x, save.model = TRUE, h=3)

    ## Calling spatialNormalization function from "normalizePlates":
    xopt <- normalizePlates(x, varianceAdjust="none", save.model = TRUE)
    all(xs@rowcol.effects == xopt@rowcol.effects, na.rm=TRUE)

Run the code above in your browser using DataLab