seqlinkage - Construct phylogenetic tree from pairwise distances

Syntax

Tree = seqlinkage(Dist)
Tree = seqlinkage(Dist, Method)
Tree = seqlinkage(Dist, Method, Names)

Arguments

Dist

Matrix or vector of pairwise distances, such as returned by the seqpdist function.

Method

String that specifies a distance method. Choices are:

  • 'single'

  • 'complete'

  • 'average' (default)

  • 'weighted'

  • 'centroid'

  • 'median'

Names

Property to use alternative labels for leaf nodes. Enter a vector of structures, with the fields 'Header' or 'Name', or a cell array of strings. In both cases the number of elements you provide must comply with the number of samples used to generate the pairwise distances in Dist.

Description

Tree = seqlinkage(Dist) returns a phylogenetic tree object from the pairwise distances, Dist, between the species or products. Dist is a matrix or vector of pairwise distances, such as returned by the seqpdist function.

Tree = seqlinkage(Dist, Method) creates a phylogenetic tree object using a specified patristic distance method. The available methods are:

'single'

Nearest distance (single linkage method)

'complete'

Furthest distance (complete linkage method)

'average' (default)

Unweighted Pair Group Method Average (UPGMA, group average).

'weighted'

Weighted Pair Group Method Average (WPGMA)

'centroid'

Unweighted Pair Group Method Centroid (UPGMC)

'median'

Weighted Pair Group Method Centroid (WPGMC)

Tree = seqlinkage(Dist, Method, Names) passes a list of names to label the leaf nodes (for example, species or products) in a phylogenetic tree object.

Examples

% Load a multiple alignment of amino acids:
seqs = fastaread('pf00002.fa');
% Measure the 'Jukes-Cantor' pairwise distances:
dist = seqpdist(seqs,'method','jukes-cantor',...
                              'indels','pair');
% Build the phylogenetic tree with the single linkage 
% method and pass the names of the sequences:
tree = seqlinkage(dist,'single',seqs)
view(tree) 

See Also

Bioinformatics Toolbox functions: phytree (object constructor), phytreewrite, seqpdist, seqneighjoin

Bioinformatics Toolbox methods of phytree object: plot, view

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS