treescape: Phylogenetic tree exploration

Description Usage Arguments Author(s) Examples

View source: R/treescape.R

Description

Compares phylogenetic trees and maps them into a small number of dimensions for easy visualisation and identification of clusters.

Usage

1
2
treescape(x, method = "treeVec", nf = NULL, return.tree.vectors = FALSE,
  ...)

Arguments

x

an object of the class multiPhylo

method

the method for summarising the tree as a vector. Choose from: treeVec (default) the Kendall Colijn metric vector BHV the Billera, Holmes Vogtmann metric using dist.multiPhylo from package distory KF the Kuhner Felsenstein metric (branch score distance) using KF.dist from package phangorn (Note: this considers the trees as unrooted) RF the Robinson Foulds metric using RF.dist from package phangorn (Note: this considers the trees as unrooted and issues a corresponding warning) wRF the weighted Robinson Foulds metric using wRF.dist from package phangorn (Note: this considers the trees as unrooted and issues a corresponding warning) nNodes the Steel & Penny tip-tip path difference metric, (topological, ignoring branch lengths), using path.dist from package phangorn (Note: this considers the trees as unrooted) patristic the Steel & Penny tip-tip path difference metric, using branch lengths, calling path.dist from package phangorn (Note: this considers the trees as unrooted) others inherited from distTips in adephylo:

  • Abouheif: performs Abouheif's test. See Pavoine et al. (2008) and adephylo.

  • sumDD: sum of direct descendants of all nodes on the path, related to Abouheif's test. See adephylo.

nf

the number of principal components to retain

return.tree.vectors

option to also return the tree vectors. Note that this can use a lot of memory so defaults to FALSE.

...

further arguments to be passed to method.

Author(s)

Thibaut Jombart thibautjombart@gmail.com

Michelle Kendall michelle.louise.kendall@gmail.com

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
25
26
27
28
## generate list of trees
x <- rmtree(10, 20)
names(x) <- paste("tree", 1:10, sep = "")

## use treescape
res <- treescape(x, nf=3)
table.paint(as.matrix(res$D))
scatter(res$pco)

data(woodmiceTrees)
woodmiceDists <- treescape(woodmiceTrees,nf=3)
plot(woodmiceDists$pco$li[,1],woodmiceDists$pco$li[,2])
woodmicedf <- woodmiceDists$pco$li
if(require(ggplot2)){
woodmiceplot <- ggplot(woodmicedf, aes(x=A1, y=A2)) # create plot
woodmiceplot + geom_density2d(colour="gray80") + # contour lines
geom_point(size=6, shape=1, colour="gray50") + # grey edges
geom_point(size=6, alpha=0.2, colour="navy") + # transparent blue points
xlab("") + ylab("") + theme_bw(base_family="") # remove axis labels and grey background
}

## Not run: 
if(require(rgl)){
plot3d(woodmicedf[,1], woodmicedf[,2], woodmicedf[,3], type="s", size=1.5,
col="navy", alpha=0.5, xlab="", ylab="", zlab="")
}

## End(Not run)

treescape documentation built on May 19, 2017, 3:32 p.m.