Wrappers for functions in "tqDist", which calculate triplet and quartet distances between pairs of trees.
# S3 method for phylo
TripletDistance(tree1, tree2 = NULL)# S3 method for list
TripletDistance(tree1, tree2 = NULL)
# S3 method for multiPhylo
TripletDistance(tree1, tree2 = NULL)
QuartetDistance(file1, file2)
QuartetAgreement(file1, file2)
PairsQuartetDistance(file1, file2)
OneToManyQuartetAgreement(file1, file2)
AllPairsQuartetDistance(file)
AllPairsQuartetAgreement(file)
TripletDistance(tree1, tree2 = NULL)
# S3 method for character
TripletDistance(tree1, tree2 = NULL)
PairsTripletDistance(file1, file2)
AllPairsTripletDistance(file)
...Distance() functions return the distance between the requested trees.
...Agreement() functions return the number of triplets or quartets that are:
A, resolved in the same fashion in both trees;
E, unresolved in both trees.
Comparing a tree against itself yields the totals (A+B+C) and (D+E)
referred to by Brodal2013;textualQuartet and
Holt2014;textualQuartet.
Arguments to TripletDistance: file paths
containing Newick trees, phylogenetic trees of class phylo,
or lists/multiPhylo of trees. If tree1 is a list and
tree2 = NULL, returns a distance matrix of all pairwise distances.
Paths to files containing a tree or trees in Newick
format, possibly created using TQFile().
TripletDistance(phylo): Triplet distance between two trees of class
phylo. Uses the CPDT algorithm
Jansson2017jcbQuartet.
TripletDistance(list): Triplet distance between each pair of trees in a list.
If tree2 is provided, returns pairwise distances between
corresponding trees in tree1 and tree2.
If tree2 = NULL, returns a distance matrix of all pairwise
distances within tree1.
TripletDistance(multiPhylo): Triplet distance between each pair of trees in a
multiPhylo object.
QuartetDistance(): Returns the quartet distance between the tree.
in file1 and the tree in file2.
QuartetAgreement(): Returns a vector of length two, listing [1]
the number of resolved quartets that agree (A);
[2] the number of quartets that are unresolved in both trees (E).
See Brodal2013;textualQuartet.
PairsQuartetDistance(): Quartet distance between the tree on each line of file1
and the tree on the corresponding line of file2.
OneToManyQuartetAgreement(): Quartet distance between the tree in
file1 and the tree on each line of file2.
AllPairsQuartetDistance(): Quartet distance between each tree listed in file and
each other tree therein.
AllPairsQuartetAgreement(): Quartet status for each pair of trees in file.
TripletDistance(): Triplet distance between trees.
tree1 and tree2 can be phylo objects,
file paths to Newick tree files, or lists/multiPhylo objects.
If tree1 is a list and tree2 = NULL, computes all pairwise
distances; if both are lists, computes distances between corresponding
pairs. Uses the CPDT algorithm
Jansson2017jcbQuartet.
TripletDistance(character): Triplet distance between single trees read from
Newick-format files tree1 and tree2.
PairsTripletDistance(): Triplet distance between the tree on each line of
file1 and the tree on the corresponding line of file2.
AllPairsTripletDistance(): Triplet distance between each tree listed in file
and each other tree therein.
Quartet algorithms: Brodal2013;textualQuartet; Holt2014;textualQuartet. C implementation: Sand2014;textualQuartet; modified for portability by Martin R. Smith.
Triplet algorithm: Jansson2017jcb;textualQuartet. C++ implementation by Ramesh Rajaby; R integration by Martin R. Smith.
QuartetStatus() takes trees, rather than files, as input.
TQFile() creates a temporary file containing specified trees.
Other TQDist functions:
TQDist()