Hello Vinn,
Apologies for the delay in answering. I talking to another person here, and there are a couple of things here.
make_distance_boxplots.py compares the distributions of within and
between distances for a variety of different groupings of samples, and
IIRC, it uses a non parametric test to assess differences between these
distributions.
ANOSIM, uses a different approach, it computes the R statistic, that
takes the differences of the "between group mean distance" and the
"within group mean distance", and then divides this by n(n - 1), where n
is the number of samples being compared. Then permutes the labels and
asks if there is a "random" permutation that makes up for a better R
statistic.
I would also note that there are not multiple comparison corrections for permanova and ANOSIM, so you'd want to consider that when looking at your p-values (and it might be worth increasing the number of permutations being used on those calculations).
-Tony
And thanks Yoshiiki.