Add Hommola cospeciation test

Here, we have added a statistical test for host:parasite cospeciation derived from Hommola et al (2009, Molecular Biology and Evolution). This is added as a new module called evolve under math.stats.

We are looking for feedback on the organization and naming of the evolve module. We're not quite sure what to add to the top level description for this module, so any other ideas would be appreciated. 

Note: the test itself is using numpy arrays rather than distance matrix objects because we are using the positional relationships between host, parasite, and an interaction matrix rather than the labels. 
Sounds great! We'll make the modification. —
Sent from Mailbox

On Thu, Aug 7, 2014 at 8:50 AM, Yoshiki Vázquez Baeza
<notifications@github.com> wrote:

>> +
>> +    p_val = (below + 1) / (permutations + 1)
>> +
>> +    return p_val, r, perm_stats
>> +
>> +
>> +def _get_dist(labels, dists, index):
>> +    """Function for picking a subset of pairwise distances from a distance
>> +    matrix according to a set of (randomizable) indices.
>> +    Derived from Hommola et al R code
>> +
>> +    Parameters
>> +    ----------
>> +    labels : list of strings
>> +        names associated with pairwise distance matrix
>> +    dists : numpy.array
> This sounds like a good idea, do you agree with this @tanaes?
> On (Aug-06-14|20:27), Jai Ram Rideout wrote:
>> > +
>> > +    p_val = (below + 1) / (permutations + 1)
>> > +
>> > +    return p_val, r, perm_stats
>> > +
>> > +
>> > +def _get_dist(labels, dists, index):
>> > +    """Function for picking a subset of pairwise distances from a distance
>> > +    matrix according to a set of (randomizable) indices.
>> > +    Derived from Hommola et al R code
>> > +
>> > +    Parameters
>> > +    ----------
>> > +    labels : list of strings
>> > +        names associated with pairwise distance matrix
>> > +    dists : numpy.array
>> 
>> It'd be nice to use `DistanceMatrix` here for sanity-checking: when a `DistanceMatrix` is instantiated, it ensures that the matrix is hollow and symmetric, among other things.
>> 
>> A `DistanceMatrix` is easy to instantiate from a numpy array or a native Python nested list, and `ids` are optional:
>> 
>> ```python
>> import numpy as np
>> from skbio import DistanceMatrix
>> data = np.asarray([[0, 2], [2, 0]])
>> dm = DistanceMatrix(data)
>> dm.ids # ids should be ('0', '1')
>> dm.data # retrieve the underlying numpy array
>> ```
>> 
>> If you wanted to, you could easily support both types of input (numpy arrays or `DistanceMatrix` instances). For an example of this in scikit-bio, see `skbio.stats.distance.mantel`.
>> 
>> ---
>> Reply to this email directly or view it on GitHub:
>> https://github.com/biocore/scikit-bio/pull/557/files#r15917073
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/biocore/scikit-bio/pull/557/files#r15933006