Description Usage Arguments Details Value Examples
timescape
is a tool for visualizing temporal clonal evolution data.
1 2 3 4 5 | timescape(clonal_prev, tree_edges, mutations = "NA", clone_colours = "NA",
xaxis_title = "Time Point", yaxis_title = "Clonal Prevalence",
phylogeny_title = "Clonal Phylogeny", alpha = 50,
genotype_position = "stack", perturbations = "NA", sort = FALSE,
show_warnings = TRUE, width = 900, height = NULL)
|
clonal_prev |
|
tree_edges |
|
mutations |
Any additional field will be shown in the mutation table. |
clone_colours |
|
xaxis_title |
|
yaxis_title |
|
phylogeny_title |
|
alpha |
|
genotype_position |
|
perturbations |
|
sort |
|
show_warnings |
|
width |
|
height |
|
Interactive components:
Mouseover any clone to view its (i) clone ID and (ii) clonal prevalence at each time point.
Click the view switch button to switch from the traditional timescape view to the clonal trajectory view, where each clone changes prevalence on its own track.
Click the download buttons to download a PNG or SVG of the view.
None
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | # EXAMPLE 1 - Acute myeloid leukemia patient, Ding et al., 2012
# genotype tree edges
tree_edges <- read.csv(system.file("extdata", "AML_tree_edges.csv",
package = "timescape"))
# clonal prevalences
clonal_prev <- read.csv(system.file("extdata", "AML_clonal_prev.csv",
package = "timescape"))
# targeted mutations
mutations <- read.csv(system.file("extdata", "AML_mutations.csv",
package = "timescape"))
# perturbations
perturbations <- data.frame( pert_name = c("Chemotherapy"),
prev_tp = c("Diagnosis"))
# run timescape
timescape(clonal_prev = clonal_prev, tree_edges = tree_edges,
perturbations = perturbations, mutations = mutations)
# EXAMPLE 2 - Patient 7, McPherson and Roth et al., 2016
# genotype tree edges
tree_edges <- read.csv(system.file("extdata", "px7_tree_edges.csv",
package = "timescape"))
# clonal prevalences
clonal_prev <- read.csv(system.file("extdata", "px7_clonal_prev.csv",
package = "timescape"))
# clone colours
clone_colours <- data.frame(clone_id = c("A","B","C","D","E"),
colour = c("d0ced0", "2CD0AB", "FFD94B",
"FD8EE5", "F8766D"))
# run timescape
timescape(clonal_prev = clonal_prev, tree_edges = tree_edges,
clone_colours = clone_colours, height=260, alpha=15)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.