help oma

Title

oma -- Calculate inter-sequence distances using Needleman--Wunsch algorithm

Syntax

oma varlist , options [option]

options

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

indel(#) use # as the indel cost

Sequence length length(var) sequence
length, a variable or a constant if sequence length is fixed

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

ref(integer) (Optional) compare all sequences to the first N sequences, instead of calculating all pairwise distances.

Work-space workspace (Optional) Causes the internal
workspace matrices to be shown for each sequence comparison.

Duplicates DUps (Optional) Force calculation of duplicate distances.

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

Description

oma calculates Optimal Matching distances between all
pairs of sequences in the data, where varlist is a consecutive
set of variables describing the elements of the sequence. It uses a
Stata plugin implementation of the Needleman--Wunsch algorithm.

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)

. oma mon1-mon36, subsmat(scost) indel(2) pwdist(dist) len(36)

. matrix list dist

. oma mon1-mon72, subsmat(scost) indel(2) pwdist(dist) len(dur)

. matrix list dist