Description Usage Arguments Details Examples
MapScape is a visualization tool for spatial clonal evolution. MapScape displays a cropped anatomical image surrounded by two representations of each tumour sample representing the distribution of clones throughout anatomic space. The first, a cellular aggregate or donut view, displays the prevalence of each clone. The second shows a skeleton of the patient<e2><80><99>s clonal phylogeny while highlighting only those clones present in the sample. Note: the cellular aggregate does not accurately represent the positions of clones within a sample. We therefore provide the alternative donut chart view as a less artistic representation of the tumour sample. See the Interactivity section below for instructions to switch between views.
1 2 3 4 5 6 | mapscape(clonal_prev, tree_edges, sample_locations, img_ref,
clone_colours = "NA", mutations = "NA", sample_ids = c("NA"),
n_cells = 100, show_low_prev_gtypes = FALSE,
phylogeny_title = "Clonal Phylogeny", anatomy_title = "Anatomy",
classification_title = "Phylogenetic Classification",
show_warnings = TRUE, width = 960, height = 960)
|
clonal_prev |
|
tree_edges |
|
sample_locations |
|
img_ref |
|
clone_colours |
|
mutations |
|
sample_ids |
|
n_cells |
|
show_low_prev_gtypes |
|
phylogeny_title |
|
anatomy_title |
|
classification_title |
|
show_warnings |
|
width |
|
height |
|
Interactive components in the top toolbar:
Click the download buttons to download the current view as PNG or SVG.
Click the reset button to exit a clone or mutation selection.
Click the view switch button to switch between cellular
Interactive components in main view:
Reorder samples by grabbing the sample name or cellular aggregate / donut and dragging it radially.
Hover over anatomic location of interest to view the anatomic location name and the patient data associated with that location.
Hover over a tree node of a particular sample to view cellular prevalence of that clone in that particular sample.
Interactive components in legend:
Hover over legend tree node to view the clone ID as well as the clone's prevalence at each tumour sample. Any anatomic locations expressing that clone will be highlighted.
Hover over legend tree branch to view tumour samples expressing all descendant clones.
Click on legend tree node(s) to view (a) updated mutations table showing novel mutations at that clone(s), and (b) tumour samples expressing the novel mutations at that clone(s).
Hover over a mixture class (e.g. "pure", "polyphyletic", "monophyletic") to view corresponding tumour samples, and the participating phylogeny in each tumour sample.
Interactive components in mutation table:
Search for any chromosome, coordinate, gene, etc.
Click on a row in the table, and the view will update to show the tumour samples with that mutation, and the variant allele frequency for that mutation in each tumour sample.
Sort the table by a column (all columns sortable except the Clone column).
Note: Click on the reset button to exit a selection. Click the download
buttons to download a PNG or SVG of the view.
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 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | library("mapscape")
# EXAMPLE 1 - Patient A21, Gundem et al., 2015
# clonal prevalences
clonal_prev <- read.csv(system.file("extdata", "A21_clonal_prev.csv",
package = "mapscape"))
# mutations
mutations <- read.csv(system.file("extdata", "A21_mutations.csv",
package = "mapscape"))
# locations of each tumour sample on user-provided image
sample_locations <- read.csv(system.file("extdata",
"A21_sample_locations.csv", package = "mapscape"))
# genotype tree edges
tree_edges <- read.csv(system.file("extdata", "A21_tree.csv", package
= "mapscape"))
# image reference
img_ref <- system.file("extdata", "A21_anatomical_image.png", package
= "mapscape")
# radial order of samples
sample_ids <- c("H","F","J","D","A","I","C","E","G")
# run mapscape
mapscape(clonal_prev = clonal_prev, tree_edges = tree_edges,
sample_locations = sample_locations, mutations = mutations,
img_ref = img_ref, sample_ids = sample_ids)
# EXAMPLE 2 - Patient 1, McPherson and Roth et al., 2016
# clonal prevalences
clonal_prev <- read.csv(system.file("extdata", "px1_clonal_prev.csv",
package = "mapscape"))
# mutations
mutations <- read.csv(system.file("extdata", "px1_mutations.csv",
package = "mapscape"))
# locations of each tumour sample on user-provided image
sample_locations <- read.csv(system.file("extdata",
"px1_sample_locations.csv", package = "mapscape"))
# genotype tree edges
tree_edges <- read.csv(system.file("extdata", "px1_tree.csv",
package = "mapscape"))
# image reference
img_ref <- system.file("extdata", "px1_anatomical_image.png",
package = "mapscape")
# colours for each clone
clone_colours <- data.frame(
clone_id = c("A","B","C","D","E","F","G","H","I"),
colour = c("d0ced0", "2CD0AB", "7FE9D1", "FFD94B", "FD8EE5",
"F8766D", "4FD8FF", "B09AF5", "D4C7FC"))
# radial order of samples
sample_ids <- c("LFTB4", "LOvB2", "ApC1", "ROvA4", "ROv4", "ROv3",
"ROv2", "ROv1", "RFTA16", "Om1", "SBwl", "SBwlE4")
# run mapscape
mapscape(clonal_prev = clonal_prev, tree_edges = tree_edges,
sample_locations = sample_locations, mutations = mutations,
img_ref = img_ref, clone_colours = clone_colours,
sample_ids = sample_ids)
# EXAMPLE 3 - Patient 7, McPherson and Roth et al., 2016
# clonal prevalences
clonal_prev <- read.csv(system.file("extdata", "px7_clonal_prev.csv",
package = "mapscape"))
# mutations
mutations <- read.csv(system.file("extdata", "px7_mutations.csv",
package = "mapscape"))
# locations of each tumour sample on user-provided image
sample_locations <- read.csv(system.file("extdata",
"px7_sample_locations.csv", package = "mapscape"))
# genotype tree edges
tree_edges <- read.csv(system.file("extdata", "px7_tree.csv",
package = "mapscape"))
# image reference
img_ref <- system.file("extdata", "px7_anatomical_image.png",
package = "mapscape")
# colours for each clone
clone_colours <- data.frame(clone_id = c("A","B","C","D","E"),
colour = c("d0ced0", "2CD0AB", "FFD94B",
"FD8EE5", "F8766D"))
# radial order of samples
sample_ids <- c("BwlA6", "RPvM", "RUtD1", "RUtD2", "RUtD3", "ROvC4",
"ROvC5", "ROvC6", "LOv1","LOvA10","LOvA4","BrnM", "BrnMA1")
# run mapscape
mapscape(clonal_prev = clonal_prev, tree_edges = tree_edges,
sample_locations = sample_locations, mutations = mutations,
img_ref = img_ref, clone_colours = clone_colours, sample_ids = sample_ids)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.