For each branch B do:
a b
\ /
>-------------<
/ B \
c d
exchange a with b ( or a with d ) and count all columns in the alignment
with a greater/smaller/equal minimal number of mutations
than the original tree.
result: n_plus, n_minus, n_equal
freq_n_plus = n_plus/ (seq_len)
...
Bootstrap value = sum of
for all i = 1.. seqlen do
for all combinations of np, nm,ne with np - nm == i do
sum += freq_n_plus ^ np *
freq_n_minus ^ nm *
freq_n_equal ^ ne *
seq_len! / np! /nm! /ne!
done
done
|