Bootstrap an oncogenetic tree to assess stability

Share:

Description

bootstrap.oncotree provides a set of resampling based estimates of the oncogenetic tree. Both a parametric and non-parametric approach is available. The print and plot methods provide interfaces for printing a summary and plotting the resulting set of trees.

Usage

1
2
3
4
5
6
7
   bootstrap.oncotree(otree, R, type = c("nonparametric", "parametric"))
   ## S3 method for class 'boottree'
print(x, ...)
   ## S3 method for class 'boottree'
plot(x, minfreq=NULL, minprop=NULL, nboots=NULL, draw.orig=TRUE,
                           draw.consensus=TRUE, fix.nodes=FALSE, 
                           ask=(prod(par("mfrow"))<ntrees)&&dev.interactive(), ...)

Arguments

otree

An object of class oncotree.

R

The number of bootstrap replicates.

type

The type of bootstrap - see Details for explanations.

x

An object of class boottree - the output of bootstrap.oncotree

minfreq

A lower limit on the occurrence frequency of the tree in “boottree” for plotting. By default, all unique trees are plotted, which can lead to a large number of plots.

minprop

A lower limit on the occurrence proportion of the tree in “boottree” for plotting.

nboots

A lower limit on the number of bootstrapped trees plotted.

draw.orig

logical; if TRUE the original tree is plotted.

draw.consensus

logical; if TRUE the consensus tree is plotted (see Details).

fix.nodes

logical; if TRUE, the nodes for all trees are kept in the same position. If node.coords is passed as an argument to plot.oncotree, then those coordinates are used for all trees, otherwise the coordinates computed for the original tree are used.

ask

logical; if TRUE, the user is asked before each plot, see par(ask=.).

...

Ignored for print. Passed to plot.oncotree for the plot method.

Details

Parametric bootstrap: This approach assumes that the model is correct. Based on otree, a random data set is generated R times using generate.data. An oncogenetic tree is fitted to each of these random data sets.

Non-parametric bootstrap: The samples (rows) from the data associated with the tree are resampled with replacement R times, each time obtaining a data set with the same sample size. An oncogenetic tree is fitted to each of these resampled data sets.

For both approaches, a consensus tree that assigns to each vertex the parent that occurs most frequently in the bootstrapped trees, is also computed.

Value

For bootstrap.oncotree: an object of class boottree with the following components:

original

The parent component of the original tree (otree).

consensus

A numeric vector with the parent$parent.num component of the consesus tree - this defines the tree structure uniquely.

parent.freq

A matrix giving the number of trees with each possible child-parent edge. The rows correspond to children while the column to parents.

tree.list

A data frame with each row representing a unique tree obtained during the bootstrap. The ‘Tree’ variable contains the parent$parent.num component of the tree (each pasted into one dot-separated string), while the ‘Freq’ variable gives the frequency of the tree among the R bootstrap replicates.

type

A character value with the type of the bootstrap performed.

For print.boottree: the original object is returned invisibly. It prints a summary showing the number of replicates, the number of unique trees found, and the number of times that the original tree was obtained.

For plot.oncotree: nothing is returned. It is used for its side effect of producing a sequence of plots of the bootstrapped trees. Specifically, it plots the original tree (if draw.orig=TRUE), the consensus tree (if draw.consensus=TRUE), and then the other trees by frequency of occurrence. To limit the number of bootstrapped trees plotted, specify exactly one of minfreq, minprop or nboots. By default, if the session is interactive, the user is asked for confirmation before each new tree is drawn. To avoid this, either use ask=FALSE in the function call, or set up a layout that fits all the trees.

Author(s)

Lisa Pappas, Aniko Szabo

See Also

oncotree.fit

Examples

1
2
3
4
5
6
7
8
9
   data(ov.cgh)
   ov.tree <- oncotree.fit(ov.cgh)
   set.seed(43636)
   ov.b1 <- bootstrap.oncotree(ov.tree, R=100, type="parametric")
   ov.b1
   opar <- par(mfrow=c(3,2), mar=c(2,0,0,0))
   plot(ov.b1, nboots=4)
   plot(ov.b1, nboots=4, fix.nodes=TRUE)
   par(opar)