bodkan / slendr

Population genetic simulations in R 🌍
https://bodkan.net/slendr
Other
55 stars 6 forks source link

Add an option to add user-defined symbolic names to sampled individuals #114

Open bodkan opened 2 years ago

bodkan commented 2 years ago

The way things are now, each sampled individual gets a nice symbolic name which can be used for all functions for tree sequence analyses.

This means that if we record an individual in population "ancientHG", individuals sampled from this population will be named "ancientHG_1", "ancientHG_2", etc. This information, along with sampling times and -- optionally -- locations of sampling are accessible via ts_samples(ts).

It would be nice to make sampling even more customizable. If the user wants to represent a concrete individual, they should be able to do things like schedule_sampling(model, times = 45000, list(eur, 1, "Ust-Ishim") and later refer to the Ust-Ishim individual in tree sequence calculations such as ts_f3(ts, "EUR_1", "Ust-Ishim", "AFR") etc.