assign_cells_to_clones: Assign cells to clones from cardelino results

View source: R/clone_id.R

assign_cells_to_clonesR Documentation

Assign cells to clones from cardelino results

Description

Assign cells to clones from cardelino results

Usage

assign_cells_to_clones(prob_mat, threshold = 0.5)

Arguments

prob_mat

numeric matrix (cells x clones) of clone posterior probabilities as output by clone_id

threshold

numeric(1), posterior probability threshold for cell-clone assignment: if posterior probability is above threshold, assign cell to clone, otherwise leave cell "unassigned"

Value

a data.frame with cell ID, assigned clone label and maximum posterior probability across clones.

Author(s)

Davis McCarthy

Examples

data(example_donor)
assignments <- clone_id(A_clone, D_clone, Config = tree$Z, inference = "EM")
df <- assign_cells_to_clones(assignments$prob)
head(df)
table(df$clone)

davismcc/cardelino documentation built on Nov. 19, 2022, 2:44 a.m.