flagOutliers: Identify outlier genes in a decon result

Description Usage Arguments Value

View source: R/flagOutliers.R

Description

Analyses a decon result's residuals to identify poorly-fit genes and flag them for removal. Rule: flag anything with

Usage

1
flagOutliers(Y, yhat, resids, wts, resid_thresh = 3)

Arguments

Y

p-length expression vector or p * N expression matrix - the actual (linear-scale) data

yhat

Expectation of Y given the decon fit

resids

Log2-scale residuals of Y vs. yhat (log2(pmax(Y, 0.5)) - log2(yhat))

wts

Matrix of data point weights, aligned to dimensions of resids

resid_thresh

A scalar, sets a threshold on how extreme individual data points' values can be (in log2 units) before getting flagged as outliers and set to NA.

Value

a vector of names of poorly-fit genes


SpatialDecon documentation built on Nov. 8, 2020, 6 p.m.