cesaraustralia / Dispersal.jl

Tools for simulating organism dispersal
Other
21 stars 3 forks source link

Clarify genetic methods to add to Dispersal.jl #70

Open rafaqz opened 3 years ago

rafaqz commented 3 years ago

@virgile-baudrot @jamesmaino

As we move towards getting Dispersal.jl registered, we will need to clarify what the plan is for the new genetic methods.

I think it would be great if at least some of them were, but I'm not sure what the intent is here.

There are a bunch of things I would like to simplify at some stage, but I also don't want to get in the way of virgile getting work done - I can refactor things once the methods are all finalised.

virgile-baudrot commented 3 years ago

I work with my fork so you can start changing anything you want, so as I finish what we engage for this month.

About methods to keep.

For now:

From what I've done maybe the two files discrete_growth.jl, survival.jl can be add to the release, because they are classical functions like those of allee.jl and so.

While files allele_frequency.jl and selection_gradient.jl are not generic enough (refering only to the survival functions I defined). The genericity of these two would benefit from a generic Population.

Long term plan:

I'm starting to think about implementing structure to define a generic Population with a tree like:

AbstractPopulation
|_ PhenotypePopulation
|_ GenotypePopulation
|_ AlleleFreqPopulation
| ...

and then having operation +, -, * , ..., zero() define on it to say what is to add, mix, divide ... 2 populations and more. And as you said, methods of dispersal would work straightfoward, but also other population methods of growth, breeding, predation, ... would be quite generic too. What do you think about it? Maybe a package would be interesting, because there could be difficulties like when population is a size one, so an individual, statistics would changes.

jamesmaino commented 3 years ago

I am okay with leaving them in Dispersal if they are sufficiently generic. Perhaps the evolution functions will be more generic than just for Dispersal but they were designed principally with this paradigm in mind so it might make sense to include them here as if you were to make another separate package called QuantGen or something, then you would need to make a bunch of other canonical functions.

rafaqz commented 3 years ago

I like the AbstractPopulation idea. Adding a dot method to AbstractPopulation would also let them all work in dot-product dispersal kernels without modification. @jamesmaino I think that could all be in Dispersal.jl too. It seems very powerful that all the other methods will just work on any kind of population.

virgile-baudrot commented 3 years ago

cool