tskit-dev / pyslim

Tools for dealing with tree sequences coming to and from SLiM.
MIT License
27 stars 23 forks source link

tutorial feature: spatial analysis #122

Open bhaller opened 3 years ago

bhaller commented 3 years ago

This would go well with the new "retain" feature that @hyanwong has done. The idea would be to give a simple example of how to run a 2D spatial model, have the spatial positions of all relevant ancestors be kept in the tree sequence, and do some kind of interesting spatial analysis at the end using that information on the python side. Maybe a nice 3D (x/y/time) dendritic plot of how neutral versus selected mutations move across the landscape through time, or something? I'd love to see plots like that. :-> Anyway, the point would be to demonstrate how to save the spatial info and access it on the python side.

hyanwong commented 3 years ago

Lovely idea. Graham Coop had some nice illustrations of spatial trees in the PopGroup talk. I wonder if @mmosmond would like to help with this? If he does the SLiM side, I can have a go at the viz.

mmosmond commented 3 years ago

Would be happy to help with this. Could be a tutorial feature, could also be an addition to the spatial vignette?

petrelharp commented 3 years ago

This would be wonderful! I'd lean towards making a new vignette, rather than extending the already long-ish spatial vignette, but either way.