CleanCODEX.nb.internal: Removes noise from CODEX protein data by fitting a...

View source: R/data_processing.R

CleanCODEX.nb.internalR Documentation

Removes noise from CODEX protein data by fitting a two-component Negative Binomial mixture and computing each expression measurement as the cumulative distribution of the Negative Binomial with the higher median. Normalizes CODEX protein data by the original total counts per cell. Takes matrices and data frames instead of STvEA.data class

Description

Removes noise from CODEX protein data by fitting a two-component Negative Binomial mixture and computing each expression measurement as the cumulative distribution of the Negative Binomial with the higher median. Normalizes CODEX protein data by the original total counts per cell. Takes matrices and data frames instead of STvEA.data class

Usage

CleanCODEX.nb.internal(
  codex_protein,
  num_cores = 1,
  maxit = 500,
  factr = 1e-09,
  optim_inits = NULL,
  normalize = FALSE
)

Arguments

codex_protein

Raw CODEX protein data (cell x protein)

num_cores

number of cores to use for parallelized fits. On Windows, this must be set to 1.

maxit

maximum number of iterations for optim function

factr

accuracy of optim function

optim_inits

a matrix of (proteins x params) with initialization parameters for each protein to input to the optim function. If NULL, starts at two default parameter sets and picks the better one

normalize

divide cleaned CODEX expression by total expression per cell

Value

Cleaned CODEX protein data matrix (cell x protein)


CamaraLab/STvEA documentation built on April 2, 2024, 6:07 a.m.