This function assigns a date (in generations) to each node in an admixture graph and is used in msprime_sim
and msprime_genome
.
The date of the node will correspond to the y-coordinate of that node used for plotting in plotly_graph
,
unless the fix_leaf
option is set to TRUE
, in which case the dates of all leaf nodes returned by get_leafnames
will be set to 0.
pseudo_dates(graph, time = 1000, fix_leaf = FALSE)
An admixture graph
A scalar by which y-coordinate values will be multiplied to get dates
A boolean specifying if the dates of the leaf nodes will be fixed at time 0 (i.e., at the most recent time).
If TRUE
, all samples will be drawn at the end of the simulation (i.e., from "today"). The default is FALSE
A named vector with pseudo dates for each graph node