Beginning with the concept of near-optimal sequence alignments, we can assi
gn a probability that each element in one sequence is paired in an alignmen
t with each element in another sequence. This involves a sum over the set o
f all possible pairwise alignments, The method employs a designed hidden Ma
rkov model (HMM) and the rigorous forward and forward-backward algorithms o
f Rabiner. The approach can use any standard sequence-element-to-element pr
obabilistic similarity measures and affine gap penalty functions. This allo
ws the positional alignment statistical significance to be obtained as a fu
nction of such variables. A measure of the probabilistic relationship betwe
en any single sequence and a set of sequences can be directly obtained. In
addition, the employed HMM with the Viterbi algorithm provides a simple lin
k to the standard dynamic programming optimal alignment algorithms.