plotExtremeTrees {treenomial} | R Documentation |
Plot the min/max distance trees from a target tree
Description
Plot the min/max distance trees from a target tree
Usage
plotExtremeTrees(
target,
trees,
n,
comparison = "min",
method = c("fraction", "logDiff", "wLogDiff", "pa", "ap"),
type = c("default", "yEvaluated", "tipLabel"),
y,
numThreads = -1
)
Arguments
target |
the phylo object of the tree to calculate the distances to |
trees |
a list of phylo objects to compare with the target |
n |
the number of trees to find and plot |
comparison |
whether to find the “min” or the “max” distance trees from the target |
method |
method to use when calculating coefficient distances:
|
type |
one of:
|
y |
the y value to evaluate the polynomial at when type is “yEvaluated”, ignored otherwise |
numThreads |
number of threads to be used, the default (-1) will use the number of cores in the machine and numThreads = 0 will only use the main thread |
Value
a list of lists containing the n min/max distance trees and their distances to target
Note
the substituted y coefficient vector only supports the “logDiff” method and the “fraction” method
-
“pa” and “ap” force symmetry in the output distance matrix
Examples
library(treenomial)
library(ape)
trees <- c(rmtree(1000, 50), rmtree(10, 9))
target <- rtree(50)
minTrees <- plotExtremeTrees(target, trees, 2, comparison = "min", numThreads = 0)