AssignCells: AssignCells

View source: R/CELESTA_functions.R

AssignCellsR Documentation

AssignCells

Description

Iteratively assigns cells based on spatial and protein expression information.

Usage

AssignCells(
  celesta_obj,
  max_iteration = 10,
  cell_change_threshold = 0.01,
  min_diff = 0,
  min_probability = 0,
  high_expression_threshold_anchor = rep(0.7, length = 50),
  low_expression_threshold_anchor = rep(0.9, length = 50),
  high_expression_threshold_index = rep(0.5, length = 50),
  low_expression_threshold_index = rep(1, length = 50),
  progress = NULL,
  save_result = T
)

Arguments

celesta_obj

an initialized and filtered Celesta object (provided by FilterCells)

max_iteration

the maximum number of iterations

cell_change_threshold

user defined threshold on when the iterative cell-type assignment stops. The default value is 0.01, which means that if the percentage of additional assigned cells is smaller than 1% of the unassigned cells, then cell-type assignment will stop. The recommended range is 0.01 - 0.05. Note that the higher the cell change threshold, the more cells are left unassigned.

min_diff

user defined threshold on how much the largest cell-type probability needs to be higher than the second largest cell-type probability. The default value is 0. It is recommended to not change this value.

min_probability

user defined threshold on the maximum probability (i.e. a cell-type probability needs to be higher than this threshold for a cell to be assigned to that cell type). The default value is 0. It is recommended to not set this value higher than 0.5.

high_expression_threshold_anchor

the upper threshold for each cell type

low_expression_threshold_anchor

the lower threshold for each cell type

high_expression_threshold_index

user defined marker expression probability threshold for high expression for non-anchor cells

low_expression_threshold_index

user defined marker expression probability threshold for low expression for non-anchor cells

progress

progress object used for the Shiny app. Do not specify manually.

Value

a fully initialized Celesta object


plevritis-lab/CELESTA documentation built on Jan. 30, 2023, 3:32 p.m.