cell_assignment_from_dendrogram: Assign cells to cell sets from dendrogram

View source: R/required_scripts.R

cell_assignment_from_dendrogramR Documentation

Assign cells to cell sets from dendrogram

Description

Automatically link each cell to each cell set that is available in the dendrogram to produce a table of the probabilities of each cell mapping to each cell type. In this case we define hard probabilities (0 = unassigned to cell set; 1 = assigned to cell set) but this could be adapted to reflect real probabilities calculated elsewhere.

Usage

cell_assignment_from_dendrogram(
  dend,
  samples,
  cell_id,
  mapping = data.frame(sample_name = samples),
  continue = TRUE
)

Arguments

dend

dendrogram of annotated cell types

samples

a character vector of unique sample (e.g., cell or nucleus) names

cell_id

a character vector of cell_set_accession_ids that corresponds to each sample

mapping

do not set this parameter

continue

do not set this parameter

Value

A data frame where the first columns corresponds to the cell sample_name and the remaining columns correspond to cell sets from the dendrogram. Entries are either 0 = cell unassigned to cell set or 1 = cell assigned to cell set.


AllenInstitute/CCN documentation built on April 15, 2023, 10:48 p.m.