Calculate pairwise patristic distances in phytree object
D = pdist(
|String that specifies the nodes included in the computation.
Choices are |
|Controls the creation of a square matrix. Choices are |
|String that specifies the criteria used to relate pairs. Choices
D = pdist(
a vector containing the patristic distances between every possible
pair of leaf nodes of
Tree, a phylogenetic
tree object. The patristic distances are computed by following paths
through the branches of the tree and adding the patristic branch distances
originally created with the
The output vector
D is arranged in
((2,1), (3,1), ..., (M,1), (3,2), ..., (M,2), ...,
(M,M-1)) (the lower-left triangle of the full
matrix). To get the distance between the
(I > J), use the formula
the number of leaves.
[ returns in
the index of the closest common parent nodes for every possible pair
of query nodes.
pdist(..., ' calls
pdist with optional properties
that use property name/property value pairs. You can specify one or
more properties in any order. Each
be enclosed in single quotation marks and is case insensitive. These
property name/property value pairs are as follows:
specifies the nodes included in the computation. Choices
'leaves' (default) or
the output is ordered as before, but
M is the total
number of nodes in the tree (
pdist(..., 'Squareform', controls the creation of a square matrix. Choices
the output into a square-formatted matrix, so that
the distance between the
Ith and the
nodes. The output matrix is symmetric and has a zero diagonal.
pdist(..., 'Criteria', changes the criteria used to relate pairs.
'distance' (default) or
Read a phylogenetic tree file into a phytree object.
tr = phytreeread('pf00002.tree')
Calculate the tree distances between pairs of leaves.
dist = pdist(tr,'nodes','leaves','squareform',true)