algorithm2: SpatialDecon mixed cell deconvolution algorithm

Description Usage Arguments Value

View source: R/algorithm2.R

Description

Runs the generic SpatialDecon decon workflow, including:

  1. run deconvolution once

  2. remove poorly-fit genes from first round of decon

  3. re-run decon with cleaned-up gene set

  4. compute p-values

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
algorithm2(
  Y,
  X,
  bg = 0,
  weights = NULL,
  resid_thresh = 3,
  lower_thresh = 0.5,
  align_genes = TRUE,
  maxit = 1000
)

Arguments

Y

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

X

p * K Training matrix.

bg

Expected background counts. Provide a scalar to apply to all data points, or else a matrix/vector aligning with Y to provide more nuanced expected background.

weights

The same as the weights argument used by lm

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.

lower_thresh

A scalar. Before log2-scale residuals are calculated, both observed and fitted values get thresholded up to this value. Prevents log2-scale residuals from becoming extreme in points near zero.

align_genes

Logical. If TRUE, then Y, X, bg, and wts are row-aligned by shared genes.

maxit

Maximum number of iterations. Default 1000.

Value

a list:


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