Learn R Programming

NanoStringQCPro (version 1.4.0)

subtractBackground,RccSet-method: Subtract background estimates for a NanoString RccSet

Description

Returns a NanoString RccSet with background-corrected count data. During subtraction, any counts below 1 will be truncated to 1 to enable subsequent log transformation of the data.

Usage

"subtractBackground"(rccSet, bgEstimates, bgEstimatesParams = list(), inputMatrix = c("posCtrlData", "exprs"), quietly = FALSE)

Arguments

rccSet
NanoString RccSet object
bgEstimates
Matrix containing the background estimates to subtract.
bgEstimatesParams
A list with the parameters that were used to generate the background estimates (see getBackground()):

  • bgReference
  • summaryFunction
  • stringency
  • nSolverBackground.w1
  • nSolverBackground.shrink
  • inputMatrix

The values of these list elements will be assigned to corresponding elements in the output's experimentData@preprocessing list. If any element is NULL, the corresponding element in the output's preprocessing list will be NA.

inputMatrix
Name of the matrix in the RccSet's assayData to use as input for subtracting background estimates (one of "exprs" or "posCtrlData"). If posCtrlData is specified but not found in the assayData, an error will be generated.
quietly
Boolean specifying whether or not messages and warnings should be omitted.

Value

A NanoString linkS4class{RccSet} object with background estimates subtracted from the count data.

See Also

getBackground

Examples

Run this code
data(example_rccSet)

pcnorm_rccSet <- posCtrlNorm(example_rccSet)

bg1 <- getBackground(pcnorm_rccSet, bgReference="negatives", summaryFunction="mean")
bg2 <- getBackground(pcnorm_rccSet, bgReference="blanks")
bg3 <- getBackground(pcnorm_rccSet, bgReference="both", stringency=1)

bgCor1 <- subtractBackground(pcnorm_rccSet, bgEstimates=bg1)
bgCor2 <- subtractBackground(pcnorm_rccSet, bgEstimates=bg2)
bgCor3 <- subtractBackground(pcnorm_rccSet, bgEstimates=bg3)

Run the code above in your browser using DataLab