Closed rosemckeon closed 5 years ago
@bradduthie I can't seem to export the diagram I've made very easily. But it previews nicely in RStudio! When you have a moment can you take a look at assets/timestep-sequence.mmd, click preview and let me know what you think?
@rozeykex This looks great overall! I like the flow of the model -- a couple minimal comments in the MMD file pushed here.
Is there anything important happening between step 1 and step 5? In other words, are there key biological processes that you want to understand and model inbetween the stage of early death (at the germination, seedling, or juvenile stage) and the creation of female and male gametes with potential full genome duplication? If this is effectively a set of filters to survival, it might make sense to combine them in the code. E.g.,
You might even limite dispersal of either pollen or seeds to keep things simple (e.g., only seeds disperse -- pollination happens only among plants within a cell).
There are two paths to genome duplication (step 5 and step 9)? Here too, is there any reason, biologically, why having the genome duplication at step 5 versus step 9 will affect the results (e.g., because duplication affects pollen dispersal or fertilisation probability)? I think this could be interesting, but I think you will eventually want to focus on one type of genome duplication at a time when simulating (perhaps starting with the most common in nature, if this is known?).
I agree that plants should be both male and female (this makes things easier overall). I wouldn't worry about the exact number and variance of gamete production too much, especially if this is a theoretical model that does not represent a particular system. I think it's actually entirely reasonable to have all plants create the same number of gametes as a simplifying assumption, but since it's easy to generate some variation with rnorm
, then coding in the option for the variation could be a good idea.
King dispersal sounds good; should be easy to vary the range too if need be.
Thanks @bradduthie, I wondered if the life stages complicated things a bit. The only added benefit I can see to having them is that if plants only die after reproducing, then by having younger plants on the landscape, there are actually individuals to kill with a disturbance. Otherwise, what does disturbance actually do? If all the plants die at the end of every generation there is nothing to disturb.
I wasn't sure how else to express disturbance on the flowchart other than Landscape -> Landscape, but I think the answer to your question is yes - I imagine it as affecting mortality for any plants on the disturbed cells. So, we can adjust levels of disturbance by changing the survival chances, or perhaps polyploids will have an emergent property that increases survival chances? I'm also not really sure how best it should work yet. Like: Should it happen every generation? Or more sporadically? Should it be random single cells, or one larger area?
I like the idea of pollination sidestepping dispersal by acting inside the landscape cell. We'll definitely need N > 1 per cell then though to get anything other than selfing. Also good to know the number of gametes can be simple too. I'm wondering if the clonal dispersal is needed at all as well. Maybe stationary plants are perfectly fine, with just seeds dispersing.
I was imagining fertilisation as a lottery too. From all pollen released in a cell, a random grain is matched with a random adult, and then to a random ova belonging to that adult. Until either ova or pollen runs out. But if this happened sequentially, would that bias the odds? Maybe it could work like:
I will have a think about the routes to duplication to see if both are needed. I was planning to leave that part till last anyway so I have some time to decide on the best way about it. Making them optional so we can do them one at a time should be simple enough too, but I'm not sure we need to test that to answer our question. Unless the routes affect traits differently?
All sounds good @rozeykex -- I agree that having younger plants to die during disturbance is good, though it might not be necessary to distinguish between seedlings, juveniles, etc. Perhaps at the start of the generation, disturbance kills some plants prior to gamete production (doesn't matter whether you call it a seedling or juvenile). Alternatively, having multiple stages could be a useful hook if you want to have some biological process of interest modelled that depends on a distinction between a seedling and juvenile stage.
Disturbance effect could be tricky -- you could have it happen every generation on a fixed number of cells. Alternatively, and perhaps more realistically, maybe you could have it happen in each time step with some probability and size? E.g., pull a random uniform to see if disturbance happens, then find the cell on which the disturbance centres and the area around the central cell affected? Or perhaps easier would be just to have disturbance on each landscape cell with some probability in each generation -- I think it depends on what kind of disturbance you want to model and what the scale of the landscape is meant to be.
If you go with multiple plants per cell, self-fertilisation could be interesting. If, e.g., the carrying capacity on a cell is 100, you can imagine a disturbance event making self-fertilisation more likely due to low density on disturbed cells (I'm not sure if you need clonal reproduction then either -- probably not to difficult ot slip into the code later as a way to reproduce though, if you decide it's worth modelling). Maybe in the recovery time, polyploids have some sort of advantage. I think it would be ideal to have the selective advantage of polyploidy to be an emergent property, assuming this is possible. E.g., if an extra set of alleles makes loss of function mutations less likely to decrease fitness due to redundancy in the genome? I could imagine an advantage to being polyploid in disturbed areas then (either due to the luck of being one of the few plants surviving the disturbed cells, or in being the offspring colonising a disturbed area), where sexual reproduction isn't going to be very useful.
Regarding the fertilisation lottery, I think the lottery as you describe it is fine. A sequential algorithm in the code should be fine as long as the order of pollen is randomised before going through the sequence (in this case, you don't even need to state that the process is sequential when you write up -- you're effectively just using a sequential process in the algorithm to get the effect of the lottery). I think pollen that don't land on any ova are fine, but it might also be worth thinking about the reverse -- ova that don't receive pollen despite there being some pollen in the cell. In nature, a lot of pollen is wasted and never reaches an ovule, so can imagine that if the within-cell density is very low, it might make sense to have some ova go completely unfertilised (or, perhaps only self-fertilised). Intuitively, I suspect that fertilisation probability should probably asymptote to 1 as number of pollen grains increases. Or, if you want to consider it from the perspective of the pollen taking a random flight on a landscape and bumping into an ovule, the probability should be described by an incomplete gamma function (see equation 2 here: https://bradduthie.github.io/DuthieEtAl2014.pdf -- coded here: https://github.com/bradduthie/Duthie_et_al_2014/blob/master/waspibm.c#L145 -- I can help with the function if you want to go this route). Else you could always just have each pollen grain fertilise each ovule with some probability (and stop if it finds one, removing the both pollen and the ovule from the loop).
Sorry, the above might be a bit more mechanistic than necessary, but I do think it's probably a good idea to have some sort of density effect so that even if there are a very small number of ova and pollen grains, they won't necessarily find one another (unless selfing).
@bradduthie I'm happy to make the fertilisation part more mechanistic. I think having pollen and ova that go unused should be included, so the mechanics of how that happens is probably important to get right - that's a vital part that influences what new plants appear. I'll have a look over what you've linked, but I will probably need some help and a chat with you when I come to do that part.
I've just been updating the flowchart, so it has the pollen lottery I described yesterday in for now, but also now only has 1 intermediate life stage, (I can't think of anything specific I want to include that depends on having more life stages, especially as we can have size as a factor). I've also tried to incorporate some density dependence more explicitly, and make it all a bit clearer.
I'm thinking that life stages should mimic some of the simple examples we used in plant ecology this year of monocarpic/semelparous plants. I'll have a go at creating a flowchart to add to the repo.
Plant gender and gamete number - I think all individuals should be male and female, and the number of respective gametes they create should be sampled from a distribution with rnorm(). Will any number and sd do, or should this be based on data?
Dispersal Pollen and seeds will all disperse in the same way as we have done clonal growth #4, like kings with a max range of 1.