Given a PBMExperiment with foreground and background intensities, this function performs simple background subtraction and returns the same PBMExperiment object with the background intensities subtracted from the foreground intensities.
backgroundSubtract( pe, assay = SummarizedExperiment::assayNames(pe)[1], assayb = SummarizedExperiment::assayNames(pe)[2], keepb = TRUE, nonnegative = TRUE, verbose = FALSE )
pe | a PBMExperiment object containing PBM intensity data. |
---|---|
assay | a numeric index or string specifying the foreground assay.
(default = |
assayb | a numeric index or string specifying the background assay.
(default = |
keepb | a logical value whether to keep the background assay after subtraction. (default = TRUE) |
nonnegative | a logical value whether to restrict intensities to non-negative values by setting negative values to NA. (default = TRUE) |
verbose | a logical value whether to print verbose output during analysis. (default = FALSE) |
PBMExperiment object with background subtracted intensities replacing the original
assay
assay values.