Learn R Programming

ade4 (version 1.7-19)

phylog: Phylogeny

Description

Create and use objects of class phylog.
phylog.extract returns objects of class phylog. It extracts sub-trees from a tree.
phylog.permut returns objects of class phylog. It creates the different representations compatible with tree topology.

Usage

# S3 method for phylog
print(x, ...)
phylog.extract(phylog, node, distance = TRUE)
phylog.permut(phylog, list.nodes = NULL, distance = TRUE)

Value

Returns a list of class phylog :

tre

: a character string of the phylogenetic tree in Newick format whithout branch length values

leaves

: a vector which names corresponds to leaves and values gives the distance between leaves and nodes closest to these leaves

nodes

: a vector which names corresponds to nodes and values gives the distance between nodes and nodes closest to these leaves

parts

: a list which elements gives the direct descendants of each nodes

paths

: a list which elements gives the path leading from the root to taxonomic units (leaves and nodes)

droot

: a vector which names corresponds to taxonomic units and values gives distance between taxonomic units and the root

call

: call

Wmat

: a phylogenetic link matrix, generally called the covariance matrix. Matrix values \(Wmat_{ij}\) correspond to path length that lead from root to the first common ancestor of the two leaves i and j

Wdist

: a phylogenetic distance matrix of class 'dist'. Matrix values \(Wdist_{ij}\) correspond to \(\sqrt{d_{ij}}\) where \(d_{ij}\) is the classical distance between two leaves i and j

Wvalues

: a vector with the eigen values of Wmat

Wscores

: a data frame with eigen vectors of Wmat. This data frame defines an orthobasis that could be used to calculate the orthonormal decomposition of a biological trait on a tree.

Amat

: a phylogenetic link matrix stemed from Abouheif's test and defined in Ollier et al. (submited)

Avalues

: a vector with the eigen values of Amat

Adim

: number of positive eigen values

Ascores

: a data frame with eigen vectors of Amat. This data frame defines an orthobasis that could be used to calculate the orthonormal decomposition of a biological trait on a tree.

Aparam

: a data frame with attributes associated to nodes.

Bindica

: a data frame giving for some taxonomic units the partition of leaves that is associated to its

Bscores

: a data frame giving an orthobasis defined by Ollier et al. (submited) that could be used to calculate the orthonormal decomposition of a biological trait on a tree.

Bvalues

: a vector giving the degree of phylogenetic autocorrelation for each vectors of Bscores (Moran's form calculated with the matrix Wmat)

Blabels

: a vector giving for each nodes the name of the vector of Bscores that is associated to its

Arguments

x, phylog

: an object of class phylog

...

: further arguments passed to or from other methods

node

: a string of characters giving a node name. The functions extracts the tree rooted at this node.

distance

: if TRUE, both functions retain branch lengths. If FALSE, they returns tree with arbitrary branch lengths (each branch length equals one)

list.nodes

: a list which elements are vectors of string of character corresponding to direct descendants of nodes. This list defines one representation compatible with tree topology among the set of possibilities.

Author

Daniel Chessel
Sébastien Ollier sebastien.ollier@u-psud.fr

References

Ollier, S., Couteron, P. and Chessel, D. (2006) Orthonormal transform to decompose the variance of a life-history trait across a phylogenetic tree. Biometrics Biometrics, 62, 2, 471--477.

See Also

newick2phylog, plot.phylog

Examples

Run this code
marthans.tre <- NULL
marthans.tre[1] <-"((((1:4,2:4)a:5,(3:7,4:7)b:2)c:2,5:11)d:2,"
marthans.tre[2] <- "((6:5,7:5)e:4,(8:4,9:4)f:5)g:4);"
marthans.phylog <- newick2phylog(marthans.tre)
marthans.phylog

if(requireNamespace("ape", quietly = TRUE)) {
  marthans.phylo <- ape::read.tree(text = marthans.tre)
  marthans.phylo

  par(mfrow = c(1, 2))
  plot(marthans.phylog, cnode = 3, f = 0.8, cle = 3)
  plot(marthans.phylo)
  par(mfrow = c(1, 1))
}

Run the code above in your browser using DataLab