Description Usage Arguments Details Examples
cellscape
explores single cell copy number profiles in the
context of a single cell phylogeny.
1 2 3 4 5 6 7 8 | cellscape(cnv_data = NULL, mut_data = NULL, mut_data_matrix = NULL,
mut_order = NULL, tree_edges, gtype_tree_edges = NULL, sc_annot = NULL,
clone_colours = "NA", timepoint_title = "Timepoint",
clone_title = "Clone", xaxis_title = "Time Point",
yaxis_title = "Clonal Prevalence", phylogeny_title = "Clonal Phylogeny",
value_type = NULL, node_type = "Cell", display_node_ids = FALSE,
prop_of_clone_threshold = 0.2, vaf_threshold = 0.05,
show_warnings = TRUE, width = 900, height = 800)
|
cnv_data |
|
mut_data |
|
mut_data_matrix |
|
mut_order |
|
tree_edges |
Optional columns are:
|
gtype_tree_edges |
|
sc_annot |
Optional columns are:
|
clone_colours |
|
timepoint_title |
|
clone_title |
|
xaxis_title |
|
yaxis_title |
|
phylogeny_title |
|
value_type |
|
node_type |
|
display_node_ids |
|
prop_of_clone_threshold |
|
vaf_threshold |
|
show_warnings |
|
width |
|
height |
|
Interactive components:
Mouseover any single cell in the phylogeny to view its corresponding genomic profile in the heatmap, and vice versa.
Mouseover any part of the heatmap to view the CNV or VAF value for that copy number segment or mutation site, respectively.
Mouseover any branch of the phylogeny to view downstream single cells, both in the phylogeny and heatmap.
Mouseover any clone to view its corresponding single cells in the phylogeny and heatmap.
Click any node in the phylogeny to flip the order of its descendant branches.
Use the selection tool in the tool bar to select single cell genomic profiles and view their corresponding single cells in the phylogeny.
Use the tree trimming tool in the tool bar to remove any branch of the phylogeny by clicking it.
Use the switch view tool in the tool bar to change the phylogeny view from force-directed to unidirectional, and vice versa.
Use the re-root phylogeny tool to root the phylogeny at a clicked node.
Use the flip branch tool to vertically rotate any branch by clicking its root node.
If present, use the scale tree/graph tool in the tool bar to scale the phylogeny by the provided edge distances.
If time-series information is present such that the TimeScape is displayed below the CellScape, clones and time points are interactively linked in both views on mouseover.
Click the download buttons to download a PNG or SVG of the view.
Note:
See TimeScape repo (https://bitbucket.org/MO_BCCRC/timescape) for more information about TimeScape.
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 | library("cellscape")
# EXAMPLE 1 - TARGETED MUTATION DATA
# single cell tree edges
tree_edges <- read.csv(system.file("extdata", "targeted_tree_edges.csv",
package = "cellscape"))
# targeted mutations
targeted_data <- read.csv(system.file("extdata", "targeted_muts.csv",
package = "cellscape"))
# genotype tree edges
gtype_tree_edges <- data.frame("source"=c("Ancestral", "Ancestral", "B",
"C", "D"), "target"=c("A", "B", "C", "D", "E"))
# annotations
sc_annot <- read.csv(system.file("extdata", "targeted_annots.csv",
package = "cellscape"))
# mutation order
mut_order <- scan(system.file("extdata", "targeted_mut_order.txt",
package = "cellscape"), what=character())
# run cellscape
cellscape(mut_data=targeted_data, tree_edges=tree_edges, sc_annot =
sc_annot, gtype_tree_edges=gtype_tree_edges, mut_order=mut_order)
# EXAMPLE 2 - COPY NUMBER DATA
# single cell tree edges
tree_edges <- read.csv(system.file("extdata", "cnv_tree_edges.csv",
package = "cellscape"))
# cnv segments data
cnv_data <- read.csv(system.file("extdata", "cnv_data.csv", package =
"cellscape"))
# annotations
sc_annot <- read.csv(system.file("extdata", "cnv_annots.tsv", package =
"cellscape"), sep="\t")
# custom clone colours
clone_colours <- data.frame( clone_id = c("1","2","3"),
colour = c("7fc97f", "beaed4", "fdc086"))
# run cellscape
cellscape(cnv_data=cnv_data, tree_edges=tree_edges, sc_annot=sc_annot,
width=800, height=475, show_warnings=FALSE,
clone_colours = clone_colours)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.