spatiallyAdjust: Perform spatial adjustment

Description Usage Arguments Value Author(s) References

View source: R/spatiallyAdjust.R

Description

Given a PBMExperiment containing probe intensity data with array coordinates specified in rowData as "Column" and "Row", this function computes the local intensity bias for each probe, and returns the same PBMExperiment object with an additional array containing spatially corrected (scaled) probe intensities. Optionally, the per-probe bias is also returned as an array in the bias corrected PBMExperiment object.

The spatial bias at each probe is computed as the ratio between the median intensity in a k by k region surrounding the probe and the median intensity of all probes across the array. This approach is taken directly from the Universal PBM Analysis Suite described in Berger and Bulyk (Nature Protocols, 2008).

Only probes passing all probeFilter rules defined in the original PBMExperiment object are spatially adjusted and included in the returned object.

Usage

1
2
3
4
5
6
7
spatiallyAdjust(
  pe,
  assay = SummarizedExperiment::assayNames(pe)[1],
  k = 15L,
  returnBias = TRUE,
  verbose = FALSE
)

Arguments

pe

a PBMExperiment object containing PBM intensity data.

assay

a string name of the assay to adjust. (default = SummarizedExperiment::assayNames(pe)[1])

k

an integer specifying the size of the region to use to for computing local bias. Must be odd. (default = 15L)

returnBias

a logical whether to include the spatial bias as an additional 'assay' (called 'spatialbias') in the returned PBMExperiment object. (default = TRUE)

verbose

a logical value whether to print verbose output during analysis. (default = FALSE)

Value

Original PBMExperiment object with assay containing spatially adjusted intensities ("normalized") and a new column added to the colData, "spatialMedian", containing the global median intensity of the original probe-level data used to compute spatial bias for each sample. If specified, the estimated spatial bias will also be included in an additional assay ("spatialbias"). If assays with the same name are already included in the object, they will be overwritten.

Author(s)

Patrick Kimes

References


pkimes/upbm documentation built on Oct. 17, 2020, 9:10 a.m.