dataset <- wrap_data(cell_ids = letters)
branch_network <- tibble::tibble(from = c("A", "A"), to = c("B", "C"))
branch_network
branches <- tibble::tibble(branch_id = c("A", "B", "C"), length = 1, directed = TRUE)
branches
branch_progressions <- tibble::tibble(
cell_id = dataset$cell_ids,
branch_id = sample(branches$branch_id, length(dataset$cell_ids), replace = TRUE),
percentage = runif(length(dataset$cell_ids))
)
branch_progressions
trajectory <- add_branch_trajectory(
dataset,
branch_network,
branches,
branch_progressions
)
# for plotting the result, install dynplot
#- dynplot::plot_graph(trajectory)
Run the code above in your browser using DataLab