viewSim: visualize simulated scenario

Description Usage Arguments Value Examples

Description

viewSim is to visualize the output from the function simData.

Usage

1
2
3
4
viewSim(obj, layout = "rectangular", zoomScale = 1/20,
  legend.theme = list(legend.position = c(0.15, 0.6), legend.background =
  element_rect(fill = "transparent")), tip.label = FALSE,
  legend.title = "Abundance", ...)

Arguments

obj

The output from simData

layout

The tree layout. Select one from 'rectangular', 'slanted', 'fan', 'circular', 'radial', 'equal_angle' and 'daylight'. The default is "rectangular".

zoomScale

A positive numeric value. If it is above one, branches with fold change equal to one (non-signal branch) will be zoomed in; If below one, they will be shrinked. Default is 0.05

legend.theme

A list of arguments used for the theme in ggplot2 package (see theme ) and starting with "legend."

tip.label

TRUE or FALSE. Default is FALSE. If TRUE, the leaves with fold change above or below 1 will be labelled.

legend.title

The title of the legend. The default is "Abundance"

Value

a figure

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
set.seed(1)
y <- matrix(rnbinom(100,size=1,mu=10),nrow=10)
colnames(y) <- paste("S", 1:10, sep = "")
rownames(y) <- tinyTree$tip.label


toy_lse <- leafSummarizedExperiment(tree = tinyTree,
                                    assays = list(y))
res <- parEstimate(data = toy_lse)

set.seed(1122)
dat1 <- simData(obj = res)
viewSim(obj = dat1 )

markrobinsonuzh/treeAGG documentation built on May 26, 2019, 9:32 a.m.