congruify.phylo: ultrametricization of trees from a supplied timetree

Description Usage Arguments Details Author(s) References Examples

View source: R/congruify.R

Description

automagically generating secondary calibrations

Usage

1
2
congruify.phylo(reference, target, taxonomy = NULL, tol = 0,
  scale=c(NA, "PATHd8", "treePL"), ncores=NULL)

Arguments

reference

an ultrametric tree used to time-scale the target

target

a phylogram that is sought to be ultrametricized based on the reference phylogeny

taxonomy

a linkage table between tips of the phylogeny and clades represented in the tree; rownames of 'taxonomy' should be tips found in the phylogeny

tol

branching time in reference above which secondary constraints will be applied to target

scale

NA, "PATHd8" or "treePL" (if PATHd8 or "treePL" are available in the R PATH)

ncores

number of cores to be used

Details

This function uses the reference to inform secondary calibrations in the target. The primary output is a table of 'congruent' nodes between the reference and target with associated dates extracted from corresponding nodes in the reference.

If multiple trees are supplied as the reference, a 'congruification' table is generated for each.

If scale="PATHd8", the target will be smoothed by PATHd8 using the "d8 calculation" (see http://www2.math.su.se/PATHd8/PATHd8manual.pdf). This scaling method requires that PATHd8 is available on the user's PATH variable that can be accessed by Sys.getenv("PATH").

If scale="treePL", the target will be smoothed by treePL. This scaling method requires that treePL is available on the user's PATH variable that can be accessed by Sys.getenv("PATH").

Author(s)

JM Eastman

References

Eastman JM, LJ Harmon, and DC Tank. 2013. Congruification: support for time scaling large phylogenetic trees. Methods in Ecology and Evolution, in press.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
sal=get(data(caudata))
res=congruify.phylo(sal$fam, sal$phy, sal$tax, tol=0, scale=NA, ncores=2)
print(res$calibrations)
plot(ladderize(sal$phy,right=FALSE), cex=0.35, type="fan", label.offset=2.5)
plot(ladderize(sal$fam,right=FALSE), cex=0.5, type="fan", label.offset=2.5, no.margin=FALSE)

cat("\n\n\n*** If 'PATHd8' is installed ***, execute the following:
\n\tres=congruify.phylo(sal$fam, sal$phy, sal$tax, tol=0, scale=\"PATHd8\")
\tprint(res)
\n\tplot(res$phy, cex=0.35, type=\"fan\", label.offset=2.5)
\n\tprint(max(branching.times(res$phy)))
\tprint(max(branching.times(sal$fam)))
\tprint(max(branching.times(sal$phy)))\n\n\n")

geiger documentation built on Jan. 25, 2020, 5:06 p.m.