help hamming

Title

hamming -- Calculate inter-sequence distances using Hamming distance

Syntax

hamming varlist , options [option]

options

Cost structure
subsmat(matname) use matname as the substitution cost matrix

Distances
pwdist(matname) store the pairwise distances in matname, as a symmetric matrix. Will be created or overwritten.

Normalisation
STAndard (Optional) If "longer", normalise by the length of the sequences, if "none" do no normalisation. Defaults to "longer".

Description

hamming calculates Hamming distances between all pairs
of sequences in the data, where varlist is a consecutive set
of variables describing the elements of the sequence. Hamming
distances compare sequences element by element such that the
inter-sequence distance is the sum of the element-wise distances.
The element-wise distances are given in the subsmat()
substitution matrix.

States must be numbered as consecutive integers from 1 up, and the
substitution cost matrix must be square, with dimension equal to the
number of states. States must not be missing.

Author

Brendan Halpin, brendan.halpin@ul.ie

Examples

. matrix scost = (0,1,2,3\1,0,1,2\2,1,0,1\3,2,1,0)

. hamming mon1-mon36, subsmat(scost) pwdist(dist)

. matrix list dist

. hamming mon1-mon72, subsmat(scost) pwdist(dist)

. matrix list dist