FilterCODEX.internal: Removes points from CODEX matrix that are not cells as...

View source: R/data_processing.R

FilterCODEX.internalR Documentation

Removes points from CODEX matrix that are not cells as determined by the gating strategy on the blank channels from the CODEX paper, then normalizes data by total counts per cell Takes matrices and data frames instead of STvEA.data class

Description

Removes points from CODEX matrix that are not cells as determined by the gating strategy on the blank channels from the CODEX paper, then normalizes data by total counts per cell Takes matrices and data frames instead of STvEA.data class

Usage

FilterCODEX.internal(
  codex_raw,
  size,
  blanks,
  size_lim = NULL,
  blank_upper = NULL,
  blank_lower = NULL
)

Arguments

codex_raw

CODEX expression matrix after spillover correction, not including blank channels (cells x proteins)

size

vector of cell sizes from CODEX segmentation

blanks

expression matrix for blank channels after spillover correction (cells x channels)

size_lim

lower and upper limits on size of each cell. If blank, set to 0.025 and 0.99 quantiles

blank_upper

a vector with an upper bound expression cutoff for each blank channel. If NULL, blank upper bounds are set as the 0.995 quantile for each blank

blank_lower

a vector with a lower bound expression cutoff for each blank channel. If NULL, blank lower bounds are set as the 0.002 quantile for each blank

Value

CODEX expression matrix with some cells filtered out (cell x protein)


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