fitEdgeEffect: Fit a 2D surface to capture the incubation/edge effect on...

Description Usage Arguments Value Examples

View source: R/fitEdgeEffect.R

Description

This function fits a 2D surface using either loess (local regression) model or a 2D sigmod model based on the measurements on each plate to estimate the shape and strength of per-plate incubation effect. This function is normally called by the correctEdgeEffect() function instead of used as a standalone function.

Usage

1
2
3
4
5
6
7
8
fitEdgeEffect(
  screenData,
  method = "loess",
  useNeg = TRUE,
  useLowConcentrations = 0,
  span = 1,
  exclude = c()
)

Arguments

screenData

the data frame containing screen results generated by readScreen() function. For this function to work, the normVal (normalized viability values) generated by readScreen() function with normalization = TRUE must be present.

method

a character string specifying the method used for estimating the shape and strength of edge effect. Currently two methods are supported: 'loess', which uses local regression to estimate edge effect; 'sigmoid', a experimental feature, using 2D-sigmoid model to estimate edge effect.

useNeg

a logical value. If TRUE, only negative controls are used to estimate edge effect. Otherwise, all the wells are used for edge effect estimation.

useLowConcentrations

an integer value. In addition to negative controls, sample wells with low concentrations of drugs or other perturbators can be considered as 'de facto' negative controls and included in edge effect estimation. The default value is 0, means no sample wells are used. If the value n >= 1, the n lowest concentrations will be used.

span

a numeric value. The span parameter for loess, which controls the degree of smoothing.

exclude

a list of samples that should be excluded when performing edge effect correction. Both plate file names or sampleIDs can be used as identifiers.

Value

This function will add one column, edgeFactor, which is the estimated incubation or edge effect, to the input data frame.

Examples

1
2
3
# load drug screen dataset
data('screenData_normalized')
screenData_fitted <- fitEdgeEffect(screenData_normalized, method = 'loess', useNeg = TRUE)

lujunyan1118/DrugScreenExplorer_dev documentation built on Dec. 21, 2021, 12:42 p.m.