Main Content

seqlinkage

Construct phylogenetic tree from pairwise distances

Description

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

example

PhyloTree = seqlinkage(Distances, Method) creates a phylogenetic tree object using a specified patristic distance method.

example

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

example

Examples

collapse all

Create an array of structures representing a multiple alignment of amino acids:

seqs = fastaread('pf00002.fa');

Measure the Jukes-Cantor pairwise distances between sequences:

distances = seqpdist(seqs,'method','jukes-cantor','indels','pair');

Build the phylogenetic tree for the multiple sequence alignment from calculated pairwise distances. Specify the method to compute the distances of the new nodes to all other nodes. Provide leaf names:

phylotree = seqlinkage(distances,'single',seqs)
    Phylogenetic tree object with 32 leaves (31 branches)

View the phylogenetic tree:

view(phylotree)

Figure Phylogenetic Tree 1 contains an axes object. The axes object contains 70 objects of type line. One or more of the lines displays its values using only markers

Input Arguments

collapse all

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

Character vector or string that specifies a distance method. Choices are:

  • 'single'

  • 'complete'

  • 'average' (default)

  • 'weighted'

  • 'centroid'

  • 'median'

'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)

Specifies alternative labels for leaf nodes. Choices are:

  • Vector of structures, each with a Header or Name field

  • Cell array of character vectors or string vector

The elements must be unique. The number of elements must comply with the number of samples used to generate the pairwise distances in Dist.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | char | string | struct | table | cell | function_handle | categorical | datetime | duration | calendarDuration | fi
Complex Number Support: Yes

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: phylotree = seqlinkage(distances,'single',seqs)

Character vector or string that specifies a distance method..

Example: phylotree = seqlinkage(distances,'single',seqs)

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | char | string | struct | table | cell | function_handle | categorical | datetime | duration | calendarDuration | fi
Complex Number Support: Yes

Version History

Introduced before R2006a

expand all