subtractBackground: Subtract background estimates for a NanoString RccSet

Description Usage Arguments Value Author(s) See Also Examples

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

1
2
3
4
## S4 method for signature 'RccSet'
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.

Author(s)

Dorothee Nickles

See Also

getBackground

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)

NanoStringQCPro documentation built on Nov. 8, 2020, 8:11 p.m.