library(dplyr)
dataset <- wrap_data(cell_ids = letters)
backbone_cell_graph <- tibble::tibble(
from = letters[1:10],
to = letters[2:11],
length = 1,
directed = TRUE
)
leaves_cell_graph <- tibble::tibble(
from = letters[12:26],
to = sample(letters[1:11], 15, replace = TRUE),
length = 1,
directed = TRUE
)
cell_graph <- bind_rows(backbone_cell_graph, leaves_cell_graph)
cell_graph
to_keep <- letters[1:11]
to_keep
trajectory <- add_cell_graph(dataset, cell_graph, to_keep)
# for plotting the result, install dynplot
#- dynplot::plot_graph(trajectory)
Run the code above in your browser using DataLab