plotOriginalTree: Display Original ctgPHYL Plots

Description Usage Arguments Value Examples

View source: R/plotOriginalTree.R

Description

Displays the original plots created by the ctgPHYL package and stored in the originalTrees slot of a ctgPHYLset object.

Usage

1
plotOriginalTree(dataSet, treeType)

Arguments

dataSet

a ctgPHYLset object

treeType

the type of tree to display. Must be one of names(originalTrees(dataSet))

Value

An object of class c(<tree type>, "htmlwidget").

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# load data for cellscape
cs_tree_edges <- read.csv(system.file("extdata", "cnv_tree_edges.csv",
                         package = "cellscape"))
cs_cnv_data <- read.csv(system.file("extdata", "cnv_data.csv",
                                     package = "cellscape"))
cs_sc_annot <- read.csv(system.file("extdata", "cnv_annots.tsv",
                                    package = "cellscape"), sep="\t")
cs_clone_colours <- data.frame(clone_id = c("1","2","3"),
                               colour = c("7fc97f", "beaed4", "fdc086"))
# create example ctgPHYLset and load data into it
ctgPHYLset <- ctgPHYLset()
cellscapeData(ctgPHYLset, "clone_colours") <- cs_clone_colours
cellscapeData(ctgPHYLset, "tree_edges") <- cs_tree_edges
cellscapeData(ctgPHYLset, "cnv_data") <- cs_cnv_data
cellscapeData(ctgPHYLset, "sc_annot") <- cs_sc_annot

# run generate_tree()
ctgPHYLset <- generate_tree(dataSet = ctgPHYLset, treeType = "cellscape")

# view names of original trees
names(originalTrees(ctgPHYLset))

# plot original trees
plotOriginalTree(ctgPHYLset, "cellscape")

bicbioeng/ctgPHYL documentation built on April 13, 2020, 12:38 a.m.