dynwrap (version 1.2.2)

label_milestones: Label milestones either manually (label_milestones) or using marker genes (label_milestones_markers)

Description

label_milestones can be used to manually assign labels to a milestone using their identifiers

Usage

label_milestones(trajectory, labelling)

label_milestones_markers( trajectory, markers, expression_source = "expression", n_nearest_cells = 20 )

is_wrapper_with_milestone_labelling(trajectory)

get_milestone_labelling(trajectory, label_milestones = NULL)

Arguments

trajectory

The trajectory as created by infer_trajectory() or add_trajectory()

labelling

Named character vector containing for a milestone a new label

markers

List containing for each label a list of marker genes

expression_source

The expression source

n_nearest_cells

The number of nearest cells to use for extracting milestone expression

label_milestones

How to label the milestones. Can be TRUE (in which case the labels within the trajectory will be used), "all" (in which case both given labels and milestone_ids will be used), a named character vector, or FALSE

Value

label_milestones: A trajectory object with milestone_labelling, a named vector where milestone identifiers are mapped to their labels

get_milestone_labelling: A named vector giving a mapping between milestones and their labels. If certain milestones were not given a label, this vector will give the identifiers themselves.

Details

label_milestones_markers will assign a label to a milestone if its marker profile most closely resembles a given profile

Examples

# NOT RUN {
trajectory <- example_trajectory

# manual labelling
trajectory <- label_milestones(
  trajectory,
  labelling = c("milestone_begin" = "Let's go")
)
get_milestone_labelling(trajectory)

# marker gene labelling
trajectory <- label_milestones_markers(
  trajectory,
  markers = list(A_high = "A")
)
get_milestone_labelling(trajectory)

is_wrapper_with_milestone_labelling(trajectory)

# }