# Calculate the frequencies of each clone in 10 samples taken from a tumor represented by the B
# matrix B_mat, with global clone proportions clone_proportions, spatial distribution
# density_coords, and spatial coordinates x
# Create random topology
B <- create_B(20, 3)
# Assign proportions to each clone following a neutral evolution model
clone_proportions <- calc_clone_proportions(B, "neutral")
# Place clones in 1D space
clones_space <- place_clones_space(B)
density_coords <- clones_space$spatial_coords
domain <- clones_space$x
# Create U matrix with parameter m=4
U <- create_U(B = B, clone_proportions = clone_proportions,
density_coords = density_coords, m = 4, x = domain)
Run the code above in your browser using DataLab